Change "DOCUMENT_URI" to "PHP_SELF"

DOCUMENT_URI works with Apache. To be compliant with Nginx and probably some others, use PHP_SELF
This commit is contained in:
Vaadasch 2019-07-28 00:32:29 +02:00 committed by Laurent Destailleur
parent 1600ecc9ec
commit 23bca6f4cd

View File

@ -1411,7 +1411,7 @@ class ExtraFields
// current object id can be use into filter
if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) {
$InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]);
} elseif (preg_match("#^.*list.php$#", $_SERVER["DOCUMENT_URI"])) {
} elseif (preg_match("#^.*list.php$#", $_SERVER["PHP_SELF"])) {
// Pattern for word=$ID$
$word = '\b[a-zA-Z0-9-\.-_]+\b=\$ID\$';