mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11685] Remove logout confirmation page
PHPBB3-11685
This commit is contained in:
parent
fd10d97cb1
commit
8f95ef55a6
4 changed files with 8 additions and 12 deletions
|
@ -63,9 +63,7 @@ class acp_main
|
||||||
if ($action === 'admlogout')
|
if ($action === 'admlogout')
|
||||||
{
|
{
|
||||||
$user->unset_admin();
|
$user->unset_admin();
|
||||||
$redirect_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
|
||||||
meta_refresh(3, $redirect_url);
|
|
||||||
trigger_error($user->lang['ADM_LOGGED_OUT'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect_url . '">', '</a>'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!confirm_box(true))
|
if (!confirm_box(true))
|
||||||
|
|
|
@ -85,17 +85,16 @@ switch ($mode)
|
||||||
{
|
{
|
||||||
$user->session_kill();
|
$user->session_kill();
|
||||||
$user->session_begin();
|
$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 . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> ');
|
$message = $user->lang['LOGOUT_FAILED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> ');
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'terms':
|
case 'terms':
|
||||||
|
|
|
@ -39,7 +39,6 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
|
||||||
|
|
||||||
// logout
|
// logout
|
||||||
$crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
|
$crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
|
||||||
$this->assertContains($this->lang('LOGOUT_REDIRECT'), $crawler->filter('#message')->text());
|
|
||||||
|
|
||||||
// look for a register link, which should be visible only when logged out
|
// look for a register link, which should be visible only when logged out
|
||||||
$crawler = self::request('GET', 'index.php');
|
$crawler = self::request('GET', 'index.php');
|
||||||
|
|
|
@ -629,7 +629,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
$this->add_lang('ucp');
|
$this->add_lang('ucp');
|
||||||
|
|
||||||
$crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
|
$crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
|
||||||
$this->assertContains($this->lang('LOGOUT_REDIRECT'), $crawler->filter('#message')->text());
|
$this->assertContains($this->lang('REGISTER'), $crawler->filter('.navbar')->text());
|
||||||
unset($this->sid);
|
unset($this->sid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue