mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-25 04:23:38 +01:00
Merge pull request #1543 from nickvergessen/ticket/11685
[ticket/11685] Remove logout confirmation page
This commit is contained in:
commit
b6c3939c32
@ -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'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect_url . '">', '</a>'));
|
||||
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
|
||||
}
|
||||
|
||||
if (!confirm_box(true))
|
||||
|
@ -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"));
|
||||
|
||||
$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);
|
||||
}
|
||||
|
||||
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
|
||||
break;
|
||||
|
||||
case 'terms':
|
||||
|
@ -39,7 +39,6 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
|
||||
|
||||
// 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
|
||||
$crawler = self::request('GET', 'index.php');
|
||||
|
@ -629,7 +629,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
$this->add_lang('ucp');
|
||||
|
||||
$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);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user