Skip to content

Commit

Permalink
Remove useless usages of $_SERVER['PHP_SELF']
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Jan 7, 2025
1 parent 9ea22bb commit cdc4a3f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion front/documenttype.list.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

$params = Search::manageParams('DocumentType', $_GET);

$params['target'] = $_SERVER['PHP_SELF'];
Search::showList('DocumentType', $params);

Html::popFooter();
5 changes: 1 addition & 4 deletions src/Infocom.php
Original file line number Diff line number Diff line change
Expand Up @@ -1378,10 +1378,7 @@ public static function showForItem(CommonDBTM $item, $withtemplate = 0)
$dev_ID = $item->getField('id');
$ic = new self();

if (
!strpos($_SERVER['PHP_SELF'], "infocoms-show")
&& in_array($item->getType(), self::getExcludedTypes())
) {
if (in_array($item->getType(), self::getExcludedTypes())) {
echo "<div class='firstbloc center'>" .
__('For this type of item, the financial and administrative information are only a model for the items which you should add.') .
"</div>";
Expand Down
1 change: 0 additions & 1 deletion src/KnowbaseItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,6 @@ public static function showList($options, $type = 'search')
$params["start"] = "0";
$params["knowbaseitemcategories_id"] = null;
$params["contains"] = "";
$params["target"] = $_SERVER['PHP_SELF'];

if (is_array($options) && count($options)) {
foreach ($options as $key => $val) {
Expand Down

0 comments on commit cdc4a3f

Please sign in to comment.