diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-08-30 21:21:16 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-08-30 21:21:16 +0000 |
commit | 1d004b925f9e858fcdc491da63efefb52173042c (patch) | |
tree | 77002d3de006a681097d976766116cba70cbd0fe /phpBB/memberlist.php | |
parent | 6f1d6e92460316e9d602fdf1b7466d4ad886564b (diff) | |
download | forums-1d004b925f9e858fcdc491da63efefb52173042c.tar forums-1d004b925f9e858fcdc491da63efefb52173042c.tar.gz forums-1d004b925f9e858fcdc491da63efefb52173042c.tar.bz2 forums-1d004b925f9e858fcdc491da63efefb52173042c.tar.xz forums-1d004b925f9e858fcdc491da63efefb52173042c.zip |
necessary changes...
git-svn-id: file:///svn/phpbb/trunk@8072 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r-- | phpBB/memberlist.php | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index bcacdc9156..1d885ddc59 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1154,27 +1154,47 @@ switch ($mode) // Build a relevant pagination_url $params = $sort_params = array(); - foreach (array('_POST', '_GET') as $global_var) + + // We do not use request_var() here directly to save some calls (not all variables are set) + $check_params = array( + 'g' => array('g', 0), + 'sk' => array('sk', $default_key), + 'sd' => array('sd', 'a'), + 'form' => array('form', ''), + 'field' => array('field', ''), + 'select_single' => array('select_single', 0), + 'username' => array('username', '', true), + 'email' => array('email', ''), + 'icq' => array('icq', ''), + 'aim' => array('aim', ''), + 'yahoo' => array('yahoo', ''), + 'msn' => array('msn', ''), + 'jabber' => array('jabber', ''), + 'search_group_id' => array('search_group_id', 0), + 'joined_select' => array('joined_select', 'lt'), + 'active_select' => array('active_select', 'lt'), + 'count_select' => array('count_select', 'eq'), + 'joined' => array('joined', ''), + 'active' => array('active', ''), + 'count' => ($count !== '') ? array('count', 0) : array('count', ''), + 'ipdomain' => array('ip', ''), + 'first_char' => array('first_char', ''), + ); + + foreach ($check_params as $key => $call) { - foreach ($$global_var as $key => $var) + if (!isset($_REQUEST[$key])) { - if ($global_var == '_POST') - { - unset($_GET[$key]); - } - - if (in_array($key, array('submit', 'start', 'mode', 'char')) || empty($var)) - { - continue; - } + continue; + } - $param = urlencode($key) . '=' . urlencode(htmlspecialchars($var)); - $params[] = $param; + $param = call_user_func_array('request_var', $call); + $param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : $param); + $params[] = $param; - if (!in_array($key, array('sk', 'sd'))) - { - $sort_params[] = $param; - } + if ($key != 'sk' && $key != 'sd') + { + $sort_params[] = $param; } } @@ -1405,7 +1425,7 @@ switch ($mode) 'S_MODE_SELECT' => $s_sort_key, 'S_ORDER_SELECT' => $s_sort_dir, 'S_CHAR_OPTIONS' => $s_char_options, - 'S_MODE_ACTION' => $pagination_url . "&form=$form") + 'S_MODE_ACTION' => $pagination_url) ); } |