Avoid direct access to $wgGroupPermissions
[lhc/web/wiklou.git] / includes / SpecialPage.php
index 5b5d0a4..09683a2 100644 (file)
@@ -519,9 +519,8 @@ class SpecialPage {
         *   pages?
         */
        public function isRestricted() {
-               global $wgGroupPermissions;
                // DWIM: If all anons can do something, then it is not restricted
-               return $this->mRestriction != '' && empty( $wgGroupPermissions['*'][$this->mRestriction] );
+               return $this->mRestriction != '' && User::groupHasPermission( '*', $this->mRestriction );
        }
 
        /**