diff options
author | Nils Adermann <naderman@naderman.de> | 2007-05-26 14:23:00 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2007-05-26 14:23:00 +0000 |
commit | a69e12e3ab9e549adb7a33faee6c72b080167454 (patch) | |
tree | 0060f3d0597362d1efe7b0cdb6673db12d984b1a /phpBB/includes/functions.php | |
parent | 62be0ed93ae02260d96dffa3f0fe82bf0dde6ffd (diff) | |
download | forums-a69e12e3ab9e549adb7a33faee6c72b080167454.tar forums-a69e12e3ab9e549adb7a33faee6c72b080167454.tar.gz forums-a69e12e3ab9e549adb7a33faee6c72b080167454.tar.bz2 forums-a69e12e3ab9e549adb7a33faee6c72b080167454.tar.xz forums-a69e12e3ab9e549adb7a33faee6c72b080167454.zip |
- 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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b4d954c908..8ac603fb11 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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); } } |