mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
ACP logout
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8580 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
25be384d43
commit
8039c37b51
6 changed files with 27 additions and 2 deletions
|
@ -116,6 +116,7 @@ function adm_page_header($page_title)
|
|||
'ROOT_PATH' => $phpbb_admin_path,
|
||||
|
||||
'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
|
||||
'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),
|
||||
'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"),
|
||||
'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
|
||||
|
||||
|
|
|
@ -181,11 +181,11 @@ function switch_menu()
|
|||
<span class="corners-top"><span></span></span>
|
||||
<div id="content">
|
||||
<!-- IF not S_USER_NOTICE -->
|
||||
<div id="toggle">
|
||||
<div id="toggle">
|
||||
<a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
|
||||
<!-- ENDIF -->
|
||||
<div id="menu">
|
||||
<p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [ <a href="{U_LOGOUT}">{L_LOGOUT}</a> ]</p>
|
||||
<p><!-- IF S_USER_LOGGED_IN --> {L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [ <a href="{U_LOGOUT}">{L_LOGOUT}</a> ]<!-- ENDIF --><!-- IF S_USER_ADMIN -->[ <a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a> ]<!-- ENDIF --></p>
|
||||
<ul>
|
||||
<!-- BEGIN l_block1 -->
|
||||
<!-- IF l_block1.S_SELECTED -->
|
||||
|
|
|
@ -109,6 +109,8 @@
|
|||
<li>[Fix] Do not remove whitespace in front of url containing the boards url and no relative path appended (Bug #27355)</li>
|
||||
<li>[Change] Show email ban reason on registration. Additionally allow custom errors properly returned if using validate_data(). (Bug #26885)</li>
|
||||
<li>[Feature] Streamlined banning via the MCP by adding a ban link to the user profile. Also pre-fills ban fields as far as possible.</li>
|
||||
<li>[Feature] Added ACP logout to reset an admin session.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v300"></a><h3>1.ii. Changes since 3.0.0</h3>
|
||||
|
|
|
@ -61,6 +61,14 @@ class acp_main
|
|||
|
||||
if ($action)
|
||||
{
|
||||
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>'));
|
||||
}
|
||||
|
||||
if (!confirm_box(true))
|
||||
{
|
||||
switch ($action)
|
||||
|
@ -108,6 +116,7 @@ class acp_main
|
|||
{
|
||||
switch ($action)
|
||||
{
|
||||
|
||||
case 'online':
|
||||
if (!$auth->acl_get('a_board'))
|
||||
{
|
||||
|
|
|
@ -1332,6 +1332,16 @@ class session
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function unset_admin()
|
||||
{
|
||||
global $db;
|
||||
$sql = 'UPDATE ' . SESSIONS_TABLE . '
|
||||
SET session_admin = 0
|
||||
WHERE session_id = \'' . $db->sql_escape($this->session_id) . '\'';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -201,6 +201,9 @@ $lang = array_merge($lang, array(
|
|||
'ADMIN_INDEX' => 'Admin index',
|
||||
'ADMIN_PANEL' => 'Administration Control Panel',
|
||||
|
||||
'ADM_LOGOUT' => 'ACP Logout',
|
||||
'ADM_LOGGED_OUT' => 'Successfully logged out from Administration Control Panel',
|
||||
|
||||
'BACK' => 'Back',
|
||||
|
||||
'COLOUR_SWATCH' => 'Web-safe colour swatch',
|
||||
|
|
Loading…
Add table
Reference in a new issue