From: Rob Church Date: Sat, 29 Apr 2006 23:30:46 +0000 (+0000) Subject: (bug 5516) Show appropriate "return to" link on blocked page X-Git-Tag: 1.31.0-rc.0~57320 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=8eeef128b495af69cb67fc3df39eb6102a41812b;p=lhc%2Fweb%2Fwiklou.git (bug 5516) Show appropriate "return to" link on blocked page --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3e7cd4123b..ee66cde0a3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -150,6 +150,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * "lang=xx" option for parser test cases to set content language * (bug 5764) Friulian translation updated * (bug 5757) Fix premature cutoff in LanguageConverter with extra end markers +* (bug 5516) Show appropriate "return to" link on blocked page == Compatibility == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index ecf82424fb..d26a400b1d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -863,6 +863,8 @@ $wgGroupPermissions['sysop']['reupload'] = true; $wgGroupPermissions['sysop']['reupload-shared'] = true; $wgGroupPermissions['sysop']['unwatchedpages'] = true; $wgGroupPermissions['sysop']['autoconfirmed'] = true; +$wgGroupPermissions['sysop']['rangeblock'] = true; +$wgGroupPermissions['sysop']['userblock'] = true; // Permission to change users' group assignments $wgGroupPermissions['bureaucrat']['userrights'] = true; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 3062e1f834..f432f7754b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -634,7 +634,7 @@ class OutputPage { * Produce a "user is blocked" page */ function blockedPage() { - global $wgUser, $wgContLang; + global $wgUser, $wgContLang, $wgTitle; $this->setPageTitle( wfMsg( 'blockedtitle' ) ); $this->setRobotpolicy( 'noindex,nofollow' ); @@ -652,7 +652,10 @@ class OutputPage { $link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]"; $this->addWikiText( wfMsg( 'blockedtext', $link, $reason, $ip, $name ) ); - $this->returnToMain( false ); + + # Don't auto-return to special pages + $return = $wgTitle->getNamespace() > -1 ? $wgTitle->getPrefixedText() : NULL; + $this->returnToMain( false, $return ); } /**