From: Domas Mituzas Date: Sat, 22 Mar 2008 09:51:36 +0000 (+0000) Subject: I actually quite liked that shortcut. X-Git-Tag: 1.31.0-rc.0~48879 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=4955b7b8fb658f9f2956f98f242eff396313875e;p=lhc%2Fweb%2Fwiklou.git I actually quite liked that shortcut. --- diff --git a/includes/Title.php b/includes/Title.php index 674fc053e6..c07d971f76 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1389,6 +1389,10 @@ 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 ) {