diff options
author | David Colón <david@davidiq.com> | 2012-04-20 00:19:50 -0400 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-01-15 23:28:45 -0600 |
commit | de541ac13b44d1f52e1ba4bb626b9ec4e124557f (patch) | |
tree | a3c619943d2fba0f4518d83c67cb153ad10aedde /phpBB/memberlist.php | |
parent | 28e0520fe4af03d3378010f1ef62b6f03c61532d (diff) | |
download | forums-de541ac13b44d1f52e1ba4bb626b9ec4e124557f.tar forums-de541ac13b44d1f52e1ba4bb626b9ec4e124557f.tar.gz forums-de541ac13b44d1f52e1ba4bb626b9ec4e124557f.tar.bz2 forums-de541ac13b44d1f52e1ba4bb626b9ec4e124557f.tar.xz forums-de541ac13b44d1f52e1ba4bb626b9ec4e124557f.zip |
[ticket/10786] Javascript toggle member search panel in memberlist.php
PHPBB3-10786
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r-- | phpBB/memberlist.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 091379061c..681e51e3fd 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1025,7 +1025,7 @@ switch ($mode) // We validate form and field here, only id/class allowed $form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form; $field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field; - if (($mode == 'searchuser' || sizeof(array_intersect($request->variable_names(phpbb_request_interface::GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_'))) + if ((in_array($mode, array('', 'searchuser')) || sizeof(array_intersect($request->variable_names(phpbb_request_interface::GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_'))) { $username = request_var('username', '', true); $email = strtolower(request_var('email', '')); @@ -1377,7 +1377,7 @@ switch ($mode) } // Some search user specific data - if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_'))) + if (in_array($mode, array('', 'searchuser')) && ($config['load_search'] || $auth->acl_get('a_'))) { $group_selected = request_var('search_group_id', 0); $s_group_select = '<option value="0"' . ((!$group_selected) ? ' selected="selected"' : '') . '> </option>'; @@ -1447,7 +1447,7 @@ switch ($mode) 'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false, 'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false, 'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false, - 'S_SEARCH_USER' => true, + 'S_SEARCH_USER' => ($mode == 'searchuser' || ($mode == '' && $submit)) ? true : false, 'S_FORM_NAME' => $form, 'S_FIELD_NAME' => $field, 'S_SELECT_SINGLE' => $select_single, @@ -1598,7 +1598,7 @@ switch ($mode) '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" : '') . (!empty($params) ? '&' . implode('&', $params) : '')) : '', - 'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser') ? $u_hide_find_member : '', + 'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser' || ($mode == '' && $submit)) ? $u_hide_find_member : '', '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_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), |