Fix SpecialPage::isRestricted()
authorTim Starling <tstarling@wikimedia.org>
Tue, 23 Oct 2012 05:00:37 +0000 (16:00 +1100)
committerTim Starling <tstarling@wikimedia.org>
Tue, 23 Oct 2012 05:08:58 +0000 (16:08 +1100)
Fix SpecialPage::isRestricted(), broken by I41edb091 (22dd67e) which
inverted the group permission check. Seems to only affect
Special:SpecialPages. Bug 41294.

Change-Id: I8685eaeb4a688cc8e205afdb1639c08e4a2bd3da

includes/SpecialPage.php

index a72c1af..9442869 100644 (file)
@@ -522,7 +522,7 @@ class SpecialPage {
         */
        public function isRestricted() {
                // DWIM: If all anons can do something, then it is not restricted
-               return $this->mRestriction != '' && User::groupHasPermission( '*', $this->mRestriction );
+               return $this->mRestriction != '' && !User::groupHasPermission( '*', $this->mRestriction );
        }
 
        /**