mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Fix warning
This commit is contained in:
@@ -267,7 +267,7 @@ class FormProjets
|
|||||||
'value' => $obj->ref,
|
'value' => $obj->ref,
|
||||||
'ref' => $obj->ref,
|
'ref' => $obj->ref,
|
||||||
'labelx' => $labeltoshow,
|
'labelx' => $labeltoshow,
|
||||||
'label' => ((bool) $disabled) ? '<span class="opacitymedium">'.$labeltoshow.'</span>' : $labeltoshow,
|
'label' => ($disabled ? '<span class="opacitymedium">'.$labeltoshow.'</span>' : $labeltoshow),
|
||||||
'disabled' => (bool) $disabled
|
'disabled' => (bool) $disabled
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2661,12 +2661,8 @@ if ($action == 'generatesitemaps' && $usercanedit) {
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the entry Sitemap: into the robot file.
|
// Add the entry Sitemap: into the robot.txt file.
|
||||||
$robotcontent = @file_get_contents($filerobot);
|
$robotcontent = @file_get_contents($filerobot);
|
||||||
$result = preg_replace('/<?php // BEGIN PHP[^?]END PHP ?>\n/ims', '', $robotcontent);
|
|
||||||
if ($result) {
|
|
||||||
$robotcontent = $result;
|
|
||||||
}
|
|
||||||
$robotsitemap = "Sitemap: ".$domainname."/".$xmlname;
|
$robotsitemap = "Sitemap: ".$domainname."/".$xmlname;
|
||||||
$result = strpos($robotcontent, 'Sitemap: ');
|
$result = strpos($robotcontent, 'Sitemap: ');
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
|||||||
@@ -25,4 +25,11 @@ exclude:
|
|||||||
- name: PhpUnnecessaryLocalVariableInspection
|
- name: PhpUnnecessaryLocalVariableInspection
|
||||||
- name: PhpUnusedParameterInspection
|
- name: PhpUnusedParameterInspection
|
||||||
- name: PhpUnusedLocalVariableInspection
|
- name: PhpUnusedLocalVariableInspection
|
||||||
|
- name: PhpTernaryExpressionCanBeReplacedWithConditionInspection
|
||||||
|
- name: PhpSwitchStatementWitSingleBranchInspection
|
||||||
|
- name: PhpArrayAccessCanBeReplacedWithForeachValueInspection
|
||||||
|
- name: PhpArrayPushWithOneElementInspection
|
||||||
|
- name: PhpCastIsUnnecessaryInspection
|
||||||
|
- name: PhpDeprecationInspection
|
||||||
|
- name: PhpConditionAlreadyCheckedInspection
|
||||||
|
|
||||||
Reference in New Issue
Block a user