mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
- Send stylesheet in style.php even without a valid session id [Bug #11531]
- request_var should strictly return the requested number of dimensions - corrected a character mapping in the search indexing character list, people might want to reindex after this change if they use fulltext_native git-svn-id: file:///svn/phpbb/trunk@7685 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -78,6 +78,14 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
|
||||
list($key_type, $type) = each($default);
|
||||
$type = gettype($type);
|
||||
$key_type = gettype($key_type);
|
||||
if ($type == 'array')
|
||||
{
|
||||
reset($default);
|
||||
list($sub_key_type, $sub_type) = each(current($default));
|
||||
$sub_type = gettype($sub_type);
|
||||
$sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;
|
||||
$sub_key_type = gettype($sub_key_type);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($var))
|
||||
@@ -87,18 +95,25 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
|
||||
|
||||
foreach ($_var as $k => $v)
|
||||
{
|
||||
if (is_array($v))
|
||||
set_var($k, $k, $key_type);
|
||||
if ($type == 'array' && is_array($v))
|
||||
{
|
||||
foreach ($v as $_k => $_v)
|
||||
{
|
||||
set_var($k, $k, $key_type);
|
||||
set_var($_k, $_k, $key_type);
|
||||
set_var($var[$k][$_k], $_v, $type, $multibyte);
|
||||
if (is_array($_v))
|
||||
{
|
||||
$_v = null;
|
||||
}
|
||||
set_var($_k, $_k, $sub_key_type);
|
||||
set_var($var[$k][$_k], $_v, $sub_type, $multibyte);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
set_var($k, $k, $key_type);
|
||||
if ($type == 'array' || is_array($v))
|
||||
{
|
||||
$v = null;
|
||||
}
|
||||
set_var($var[$k], $v, $type, $multibyte);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user