mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
- added delete cookies link
- fixed global announcement links in viewforum - do not display redirects in link forums as posts in forum overview git-svn-id: file:///svn/phpbb/trunk@4904 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -295,6 +295,30 @@ switch ($mode)
|
||||
$message = $user->lang['LOGOUT_REDIRECT'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a> ');
|
||||
trigger_error($message);
|
||||
break;
|
||||
|
||||
case 'delete_cookies':
|
||||
// Delete Cookies with dynamic names (do NOT delete poll cookies)
|
||||
$set_time = time() - 31536000;
|
||||
foreach ($_COOKIE as $cookie_name => $cookie_data)
|
||||
{
|
||||
$cookie_name = str_replace($config['cookie_name'] . '_', '', $cookie_name);
|
||||
if (!strstr($cookie_name, '_poll'))
|
||||
{
|
||||
$user->set_cookie($cookie_name, '', $set_time);
|
||||
}
|
||||
}
|
||||
$user->set_cookie('track', '', $set_time);
|
||||
$user->set_cookie('data', '', $set_time);
|
||||
$user->set_cookie('sid', '', $set_time);
|
||||
|
||||
// We destroy the session here, the user will be logged out nevertheless
|
||||
$user->destroy();
|
||||
|
||||
meta_refresh(3, "{$phpbb_root_path}index.$phpEx");
|
||||
|
||||
$message = $user->lang['COOKIES_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], "<a href=\"{$phpbb_root_path}index.$phpEx\">", '</a>');
|
||||
trigger_error($message);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user