From 76558fbce536a9d09dbd3a594510b3616d09fc84 Mon Sep 17 00:00:00 2001 From: Crizzo Date: Sun, 23 Mar 2014 16:41:14 +0100 Subject: [PATCH 1/4] [ticket/11336] Changes "leaders"-mode to "team"-mode and so in test-file PHPBB3-11336 --- phpBB/includes/functions.php | 2 +- phpBB/memberlist.php | 6 +++--- .../{memberlist_leaders.html => memberlist_team.html} | 0 .../{memberlist_leaders.html => memberlist_team.html} | 0 tests/functional/memberlist_test.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename phpBB/styles/prosilver/template/{memberlist_leaders.html => memberlist_team.html} (100%) rename phpBB/styles/subsilver2/template/{memberlist_leaders.html => memberlist_team.html} (100%) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4d962db308..aa868c5431 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4883,7 +4883,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'U_SEARCH_UNREAD' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unreadposts'), 'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'), 'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'), - 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=leaders'), + 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'), 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index ba4a4372a5..af177da2e0 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -30,7 +30,7 @@ $group_id = request_var('g', 0); $topic_id = request_var('t', 0); // Check our mode... -if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'leaders'))) +if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'team'))) { trigger_error('NO_MODE'); } @@ -64,12 +64,12 @@ $sort_dir = request_var('sd', 'a'); // What do you want to do today? ... oops, I think that line is taken ... switch ($mode) { - case 'leaders': + case 'team': // Display a listing of board admins, moderators include($phpbb_root_path . 'includes/functions_user.' . $phpEx); $page_title = $user->lang['THE_TEAM']; - $template_html = 'memberlist_leaders.html'; + $template_html = 'memberlist_team.html'; $sql = 'SELECT * FROM ' . TEAMPAGE_TABLE . ' diff --git a/phpBB/styles/prosilver/template/memberlist_leaders.html b/phpBB/styles/prosilver/template/memberlist_team.html similarity index 100% rename from phpBB/styles/prosilver/template/memberlist_leaders.html rename to phpBB/styles/prosilver/template/memberlist_team.html diff --git a/phpBB/styles/subsilver2/template/memberlist_leaders.html b/phpBB/styles/subsilver2/template/memberlist_team.html similarity index 100% rename from phpBB/styles/subsilver2/template/memberlist_leaders.html rename to phpBB/styles/subsilver2/template/memberlist_team.html diff --git a/tests/functional/memberlist_test.php b/tests/functional/memberlist_test.php index 738ec4f9dd..b7f7a1823d 100644 --- a/tests/functional/memberlist_test.php +++ b/tests/functional/memberlist_test.php @@ -39,7 +39,7 @@ class phpbb_functional_memberlist_test extends phpbb_functional_test_case protected function get_memberlist_leaders_table_crawler() { - $crawler = self::request('GET', 'memberlist.php?mode=leaders&sid=' . $this->sid); + $crawler = self::request('GET', 'memberlist.php?mode=team&sid=' . $this->sid); return $crawler->filter('.forumbg-table'); } From c5eccedfb6c9ae26ec8bc6a3897454c1f5cb5b00 Mon Sep 17 00:00:00 2001 From: Crizzo Date: Sun, 23 Mar 2014 17:14:03 +0100 Subject: [PATCH 2/4] [ticket/11336] Changes language variabel LOGIN_EXPLAIN_LEADERS to _TEAM PHPBB3-11336 --- phpBB/language/en/memberlist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index c7f301fb8c..95efe35b7d 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -90,7 +90,7 @@ $lang = array_merge($lang, array( 1 => '%d user', 2 => '%d users', ), - 'LOGIN_EXPLAIN_LEADERS' => 'The board requires you to be registered and logged in to view the team listing.', + 'LOGIN_EXPLAIN_TEAM' => 'The board requires you to be registered and logged in to view the team listing.', 'LOGIN_EXPLAIN_MEMBERLIST' => 'The board requires you to be registered and logged in to access the memberlist.', 'LOGIN_EXPLAIN_SEARCHUSER' => 'The board requires you to be registered and logged in to search users.', 'LOGIN_EXPLAIN_VIEWPROFILE' => 'The board requires you to be registered and logged in to view profiles.', From 38d2efe829e3cc98796eacf37f62e05d7b3dc5db Mon Sep 17 00:00:00 2001 From: Crizzo Date: Mon, 24 Mar 2014 21:05:11 +0100 Subject: [PATCH 3/4] [ticket/11336] Adds redirect for old "leaders" mode PHPBB3-11336 --- phpBB/memberlist.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index af177da2e0..8fdb7f0a07 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -29,6 +29,12 @@ $username = request_var('un', '', true); $group_id = request_var('g', 0); $topic_id = request_var('t', 0); +// Redirect when old mode is used +if ($mode == 'leaders') +{ + redirect(append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team')); +} + // Check our mode... if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'team'))) { From 28f17897b48f7ec06958eda30cbceafaec907002 Mon Sep 17 00:00:00 2001 From: Crizzo Date: Mon, 24 Mar 2014 21:43:30 +0100 Subject: [PATCH 4/4] [ticket/11336] Adds 301 info to redirect PHPBB3-11336 --- phpBB/memberlist.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 8fdb7f0a07..df47fd2f4b 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -32,7 +32,8 @@ $topic_id = request_var('t', 0); // Redirect when old mode is used if ($mode == 'leaders') { - redirect(append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team')); + send_status_line(301, 'Moved Permanently'); + redirect(append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team')); } // Check our mode...