* If the user is at Special:Preferences and logs out, returnto them to the
default return location rather than to Special:Preferences which they can't access when logged out
This commit is contained in:
parent
af47b8260c
commit
ff3856aeb4
1 changed files with 4 additions and 2 deletions
|
|
@ -438,7 +438,7 @@ class SkinTemplate extends Skin {
|
|||
* @access private
|
||||
*/
|
||||
function buildPersonalUrls() {
|
||||
global $wgTitle, $wgShowIPinHeader;
|
||||
global $wgTitle, $wgShowIPinHeader, $wgContLang;
|
||||
|
||||
$fname = 'SkinTemplate::buildPersonalUrls';
|
||||
$pageurl = $wgTitle->getLocalURL();
|
||||
|
|
@ -480,7 +480,9 @@ class SkinTemplate extends Skin {
|
|||
);
|
||||
$personal_urls['logout'] = array(
|
||||
'text' => wfMsg('userlogout'),
|
||||
'href' => $this->makeSpecialUrl('Userlogout','returnto=' . $this->thisurl )
|
||||
'href' => $this->makeSpecialUrl( 'Userlogout',
|
||||
$this->thisurl === $wgContLang->getNsText( NS_SPECIAL ) . ':' . 'Preferences' ? '' : "returnto={$this->thisurl}"
|
||||
)
|
||||
);
|
||||
} else {
|
||||
if( $wgShowIPinHeader && isset( $_COOKIE[ini_get("session.name")] ) ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue