From 8f95ef55a65cbf58e74840957cf9acfaf9e16d31 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 13 Jul 2013 12:27:00 -0400 Subject: [ticket/11685] Remove logout confirmation page PHPBB3-11685 --- phpBB/includes/acp/acp_main.php | 4 +--- phpBB/ucp.php | 13 ++++++------- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index c44bc1b8a6..2eaea392bf 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -63,9 +63,7 @@ class acp_main if ($action === 'admlogout') { $user->unset_admin(); - $redirect_url = append_sid("{$phpbb_root_path}index.$phpEx"); - meta_refresh(3, $redirect_url); - trigger_error($user->lang['ADM_LOGGED_OUT'] . '

' . sprintf($user->lang['RETURN_INDEX'], '', '')); + redirect(append_sid("{$phpbb_root_path}index.$phpEx")); } if (!confirm_box(true)) diff --git a/phpBB/ucp.php b/phpBB/ucp.php index a7e75f76c4..7180c54de6 100644 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -85,17 +85,16 @@ switch ($mode) { $user->session_kill(); $user->session_begin(); - $message = $user->lang['LOGOUT_REDIRECT']; } - else + else if ($user->data['user_id'] != ANONYMOUS) { - $message = ($user->data['user_id'] == ANONYMOUS) ? $user->lang['LOGOUT_REDIRECT'] : $user->lang['LOGOUT_FAILED']; - } - meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); + meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); - $message = $message . '

' . sprintf($user->lang['RETURN_INDEX'], '', ' '); - trigger_error($message); + $message = $user->lang['LOGOUT_FAILED'] . '

' . sprintf($user->lang['RETURN_INDEX'], '', ' '); + trigger_error($message); + } + redirect(append_sid("{$phpbb_root_path}index.$phpEx")); break; case 'terms': -- cgit v1.2.1