From: Aryeh Gregor Date: Sun, 23 Mar 2008 15:35:05 +0000 (+0000) Subject: There's no reason to put the shortcut above wfRunHooks(). If it's an extension that... X-Git-Tag: 1.31.0-rc.0~48864 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=d9cfc8117434c71f33eb31d906e24c7ea9b0897e;p=lhc%2Fweb%2Fwiklou.git There's no reason to put the shortcut above wfRunHooks(). If it's an extension that's the problem, fix the extension. --- diff --git a/includes/Title.php b/includes/Title.php index c07d971f76..0c91eab141 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1389,16 +1389,16 @@ 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 ) { return $result; } + # Shortcut for public wikis, allows skipping quite a bit of code + if ($wgGroupPermissions['*']['read']) + return true; + if( $wgUser->isAllowed( 'read' ) ) { return true; } else {