diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 091379061c..ebc1757810 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 ((($mode == '' || $mode == '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 (($mode == '' || $mode == 'searchuser') && ($config['load_search'] || $auth->acl_get('a_'))) { $group_selected = request_var('search_group_id', 0); $s_group_select = ''; @@ -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)), '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'), diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 8583fb565c..6ce3b38981 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -192,6 +192,21 @@ $('#quick-mod-select').change(function () { $('#quickmodform').submit(); }); - +/** +* Toggle the member search panel in memberlist.php. +* +* If user returns to search page after viewing results the search panel is automatically displayed. +* In any case the link will toggle the display status of the search panel and link text will be +* appropriately changed based on the status of the search panel. +*/ +$('#member_search').click(function () { + $('#memberlist_search').slideToggle('fast'); + phpbb.ajax_callbacks['alt_text'].call(this); + // Focus on the username textbox if it's available and displayed + if ($('#memberlist_search').is(':visible')) { + $('#username').focus(); + } + return false; +}); })(jQuery); // Avoid conflicts with other libraries diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index 4ba0c5cb2a..17dc2c33c0 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -3,13 +3,11 @@
- - - - - + @@ -32,8 +30,7 @@