From: Ævar Arnfjörð Bjarmason Date: Sat, 29 Oct 2005 01:54:37 +0000 (+0000) Subject: * If the user is at Special:Preferences and logs out, returnto them to the X-Git-Tag: 1.6.0~1280 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=ff3856aeb4eff5efbca044906f2d651d166e67cf;p=lhc%2Fweb%2Fwiklou.git * 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 --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 4098d5f57d..1496e20404 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -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")] ) ) {