From 8eeef128b495af69cb67fc3df39eb6102a41812b Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 29 Apr 2006 23:30:46 +0000 Subject: [PATCH] (bug 5516) Show appropriate "return to" link on blocked page --- RELEASE-NOTES | 1 + includes/DefaultSettings.php | 2 ++ includes/OutputPage.php | 7 +++++-- 3 files changed, 8 insertions(+), 2 deletions(-) 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 ); } /** -- 2.20.1