diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/adm/index.php | 1 | ||||
-rw-r--r-- | phpBB/adm/style/overall_header.html | 4 | ||||
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_main.php | 9 | ||||
-rw-r--r-- | phpBB/includes/session.php | 10 | ||||
-rw-r--r-- | phpBB/language/en/acp/common.php | 3 |
6 files changed, 27 insertions, 2 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index a4496c14e2..c0fa2fdddb 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -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"), diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index e883e66d80..5294a101f9 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -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 --> diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index de46bb1232..e0fb51610b 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -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> diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index be337a20f3..7498ab2aef 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -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')) { diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 435618f7ff..828739115f 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -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); + } } diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 85c57fb1c3..9ed92bfcfb 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -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', |