mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Fix r8929 and #35275
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9004 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
213773e368
commit
b588a36a22
1 changed files with 12 additions and 6 deletions
|
@ -945,10 +945,13 @@ switch ($mode)
|
||||||
$field = request_var('field', '');
|
$field = request_var('field', '');
|
||||||
$select_single = request_var('select_single', false);
|
$select_single = request_var('select_single', false);
|
||||||
|
|
||||||
|
// Search URL parameters, if any of these are in the URL we do a search
|
||||||
|
$search_params = array('username', 'email', 'icq', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
|
||||||
|
|
||||||
// We validate form and field here, only id/class allowed
|
// We validate form and field here, only id/class allowed
|
||||||
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
|
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
|
||||||
$field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field;
|
$field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field;
|
||||||
if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
|
if (($mode == 'searchuser' || sizeof(array_intersect(array_keys($_GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_')))
|
||||||
{
|
{
|
||||||
$username = request_var('username', '', true);
|
$username = request_var('username', '', true);
|
||||||
$email = strtolower(request_var('email', ''));
|
$email = strtolower(request_var('email', ''));
|
||||||
|
@ -1253,14 +1256,17 @@ switch ($mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$u_hide_find_member = append_sid("{$phpbb_root_path}memberlist.$phpEx", "start=$start" . implode('&', $params));
|
$u_hide_find_member = append_sid("{$phpbb_root_path}memberlist.$phpEx", "start=$start" . (!empty($params) ? '&' . implode('&', $params) : ''));
|
||||||
|
|
||||||
|
if ($mode)
|
||||||
|
{
|
||||||
$params[] = "mode=$mode";
|
$params[] = "mode=$mode";
|
||||||
$sort_params[] = "mode=$mode";
|
$sort_params[] = "mode=$mode";
|
||||||
|
}
|
||||||
$pagination_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $params));
|
$pagination_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $params));
|
||||||
$sort_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $sort_params));
|
$sort_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", implode('&', $sort_params));
|
||||||
|
|
||||||
unset($params, $sort_params);
|
unset($search_params, $sort_params);
|
||||||
|
|
||||||
// Some search user specific data
|
// Some search user specific data
|
||||||
if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
|
if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
|
||||||
|
@ -1468,7 +1474,7 @@ switch ($mode)
|
||||||
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
|
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
|
||||||
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
|
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
|
||||||
|
|
||||||
'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&start=$start" : '')) : '',
|
'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&start=$start" : '') . (!empty($params) ? '&' . implode('&', $params) : '')) : '',
|
||||||
'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser') ? $u_hide_find_member : '',
|
'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser') ? $u_hide_find_member : '',
|
||||||
'U_SORT_USERNAME' => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
|
'U_SORT_USERNAME' => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||||
'U_SORT_FROM' => $sort_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
|
'U_SORT_FROM' => $sort_url . '&sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue