Index: branches/5.0.x/core/kernel/utility/http_query.php =================================================================== diff -u -r12368 -r12401 --- branches/5.0.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 12368) +++ branches/5.0.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 12401) @@ -1,6 +1,6 @@ Get; $unset_vars = Array (ENV_VAR_NAME, 'rewrite', '_mod_rw_url_', 'Action'); if (!$this->_sidInQueryString) { $unset_vars[] = 'sid'; } - $ret = $this->Get; + // remove system variables foreach ($unset_vars as $var_name) { - if( isset($ret[$var_name]) ) { - unset( $ret[$var_name] ); + if (array_key_exists($var_name, $vars)) { + unset($vars[$var_name]); } } if ($access_error) { - $ret = $this->_removePassThroughVariables($ret); + $vars = $this->_removePassThroughVariables($vars); if ($this->Application->IsAdmin()) { // place 1 of 2 (also in UsersEventHandler::OnSessionExpire) - $ret['m_cat_id'] = 0; // category means nothing on admin login screen - $ret['m_wid'] = ''; // remove wid, otherwise parent window may add wid to its name breaking all the frameset (for targets) - $ret['pass'] = 'm'; // don't pass any other (except "m") prefixes to admin login template + $vars['m_cat_id'] = 0; // category means nothing on admin login screen + $vars['m_wid'] = ''; // remove wid, otherwise parent window may add wid to its name breaking all the frameset (for targets) + $vars['pass'] = 'm'; // don't pass any other (except "m") prefixes to admin login template } } - return $ret; + // transform arrays + return $this->_transformArrays($vars); } /** @@ -631,6 +633,23 @@ return $url_params; } + function _transformArrays($array, $level_prefix = '') + { + $ret = Array (); + foreach ($array as $var_name => $var_value) { + $new_var_name = $level_prefix ? $level_prefix . '[' . $var_name . ']' : $var_name; + + if (is_array($var_value)) { + $ret = array_merge($ret, $this->_transformArrays($var_value, $new_var_name)); + } + else { + $ret[$new_var_name] = $var_value; + } + } + + return $ret; + } + function writeRequestLog($filename) { $folder_path = dirname(FULL_PATH.'/'.$filename);