mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-02 12:34:59 +02:00
ok... now i remember. Added more precise comments
git-svn-id: file:///svn/phpbb/trunk@9159 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
9ef743ba7d
commit
16e8b8271b
@ -147,7 +147,7 @@ class request
|
|||||||
{
|
{
|
||||||
self::$input[$const] = $GLOBALS[$super_global];
|
self::$input[$const] = $GLOBALS[$super_global];
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$initialised = true;
|
self::$initialised = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ class request
|
|||||||
{
|
{
|
||||||
$GLOBALS[$super_global] = self::$input[$const];
|
$GLOBALS[$super_global] = self::$input[$const];
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$super_globals_disabled = false;
|
self::$super_globals_disabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -347,7 +347,7 @@ class request
|
|||||||
|
|
||||||
$_var = $var;
|
$_var = $var;
|
||||||
$var = array();
|
$var = array();
|
||||||
|
|
||||||
foreach ($_var as $k => $v)
|
foreach ($_var as $k => $v)
|
||||||
{
|
{
|
||||||
set_var($k, $k, $key_type, $multibyte);
|
set_var($k, $k, $key_type, $multibyte);
|
||||||
@ -2125,14 +2125,15 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
|||||||
global $_SID, $_EXTRA_URL, $phpbb_hook;
|
global $_SID, $_EXTRA_URL, $phpbb_hook;
|
||||||
static $parsed_urls = array();
|
static $parsed_urls = array();
|
||||||
|
|
||||||
// Adjust internal url before calling the hook - we are able to just leave out any path and extension.
|
// The following code is used to make sure such calls like append_sid('viewtopic') (ommitting phpbb_root_path and php_ext) work as intended
|
||||||
// In this case the root path and extension are added before going through this function.
|
|
||||||
if (isset($parsed_urls[$url]))
|
if (isset($parsed_urls[$url]))
|
||||||
{
|
{
|
||||||
|
// Set an url like 'viewtopic' to PHPBB_ROOT_PATH . 'viewtopic.' . PHP_EXT
|
||||||
$url = $parsed_urls[$url];
|
$url = $parsed_urls[$url];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// If we detect an url without root path and extension, and also not a relative or absolute path, we add it and put it to the parsed urls
|
||||||
if (strpos($url, '.' . PHP_EXT) === false && $url[0] != '.' && $url[0] != '/')
|
if (strpos($url, '.' . PHP_EXT) === false && $url[0] != '.' && $url[0] != '/')
|
||||||
{
|
{
|
||||||
$parsed_urls[$url] = $url = PHPBB_ROOT_PATH . $url . '.' . PHP_EXT;
|
$parsed_urls[$url] = $url = PHPBB_ROOT_PATH . $url . '.' . PHP_EXT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user