Partially reverting r29721, this causes a massive flaw in the userCan hook -- breakin...
authorRobert Leverington <roberthl@users.mediawiki.org>
Sat, 22 Mar 2008 09:14:20 +0000 (09:14 +0000)
committerRobert Leverington <roberthl@users.mediawiki.org>
Sat, 22 Mar 2008 09:14:20 +0000 (09:14 +0000)
circumvention of logic. Reccomend backport to 1.12 branch.

includes/Title.php

index c07d971..827ae1e 100644 (file)
@@ -1113,6 +1113,7 @@ class Title {
 
                // Use getUserPermissionsErrors instead
                if ( !wfRunHooks( 'userCan', array( &$this, &$user, $action, &$result ) ) ) {
+                       var_dump( $result );
                        return $result ? array() : array( array( 'badaccess-group0' ) );
                }
 
@@ -1389,10 +1390,6 @@ class Title {
        public function userCanRead() {
                global $wgUser, $wgGroupPermissions;
 
-               # Shortcut for public wikis, allows skipping quite a bit of code path
-               if ($wgGroupPermissions['*']['read'])
-                       return true;
-
                $result = null;
                wfRunHooks( 'userCan', array( &$this, &$wgUser, 'read', &$result ) );
                if ( $result !== null ) {