1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

Fixes #1006 - Fix for menus, shortcodes etc using e_SELF and e_QUERY while SEF URLS active.

This commit is contained in:
Cameron 2015-05-20 11:45:52 -07:00
parent 715d99f48c
commit 17b60d0bd5
2 changed files with 28 additions and 13 deletions

View File

@ -3386,19 +3386,7 @@ class e107
$eSelf = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME'];
$_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
@ -3459,6 +3447,29 @@ class e107
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_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);
// END request uri/url detection, XSS protection
@ -3566,6 +3577,10 @@ class e107
define('e_QUERY', $e_QUERY);
$_SERVER['QUERY_STRING'] = e_QUERY;
}
else
{
define('e_QUERY', '');
}
define('e_TBQS', $_SERVER['QUERY_STRING']);

View File

@ -1572,7 +1572,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
if(E107_DBG_PATH)
{
e107::getMessage()->addDebug("db=".$dbLink);
// e107::getMessage()->addDebug("db=".$dbLink);
}
if($exactMatch)