mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Fixes #1006 - Fix for menus, shortcodes etc using e_SELF and e_QUERY while SEF URLS active.
This commit is contained in:
@@ -3386,19 +3386,7 @@ class e107
|
|||||||
|
|
||||||
$eSelf = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME'];
|
$eSelf = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME'];
|
||||||
$_self = $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST'].$eSelf;
|
$_self = $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST'].$eSelf;
|
||||||
if(!deftrue('e_SINGLE_ENTRY'))
|
|
||||||
{
|
|
||||||
$page = substr(strrchr($_SERVER['PHP_SELF'], '/'), 1);
|
|
||||||
|
|
||||||
if(self::isCli() && !empty($_SERVER['_']))
|
|
||||||
{
|
|
||||||
$page = basename($_SERVER['_']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
define('e_PAGE', $page);
|
|
||||||
define('e_SELF', $_self);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// START New - request uri/url detection, XSS protection
|
// START New - request uri/url detection, XSS protection
|
||||||
@@ -3459,6 +3447,29 @@ class e107
|
|||||||
define('e_REQUEST_SELF', $requestSelf); // full URL without the QUERY string
|
define('e_REQUEST_SELF', $requestSelf); // full URL without the QUERY string
|
||||||
define('e_REQUEST_URI', str_replace(array("'", '"'), array('%27', '%22'), $requestUri)); // absolute http path + query string
|
define('e_REQUEST_URI', str_replace(array("'", '"'), array('%27', '%22'), $requestUri)); // absolute http path + query string
|
||||||
define('e_REQUEST_HTTP', array_shift(explode('?', e_REQUEST_URI))); // SELF URL without the QUERY string and leading domain part
|
define('e_REQUEST_HTTP', array_shift(explode('?', e_REQUEST_URI))); // SELF URL without the QUERY string and leading domain part
|
||||||
|
|
||||||
|
if(!deftrue('e_SINGLE_ENTRY'))
|
||||||
|
{
|
||||||
|
$page = substr(strrchr($_SERVER['PHP_SELF'], '/'), 1);
|
||||||
|
|
||||||
|
if(self::isCli() && !empty($_SERVER['_']))
|
||||||
|
{
|
||||||
|
$page = basename($_SERVER['_']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define('e_PAGE', $page);
|
||||||
|
define('e_SELF', $_self);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
define('e_SELF', e_REQUEST_SELF);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unset($requestUrl, $requestUri);
|
unset($requestUrl, $requestUri);
|
||||||
// END request uri/url detection, XSS protection
|
// END request uri/url detection, XSS protection
|
||||||
|
|
||||||
@@ -3566,6 +3577,10 @@ class e107
|
|||||||
define('e_QUERY', $e_QUERY);
|
define('e_QUERY', $e_QUERY);
|
||||||
$_SERVER['QUERY_STRING'] = e_QUERY;
|
$_SERVER['QUERY_STRING'] = e_QUERY;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
define('e_QUERY', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
define('e_TBQS', $_SERVER['QUERY_STRING']);
|
define('e_TBQS', $_SERVER['QUERY_STRING']);
|
||||||
|
@@ -1572,7 +1572,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
|||||||
|
|
||||||
if(E107_DBG_PATH)
|
if(E107_DBG_PATH)
|
||||||
{
|
{
|
||||||
e107::getMessage()->addDebug("db=".$dbLink);
|
// e107::getMessage()->addDebug("db=".$dbLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($exactMatch)
|
if($exactMatch)
|
||||||
|
Reference in New Issue
Block a user