r32326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32325‎ | r32326 | r32327 >
Date:09:51, 22 March 2008
Author:midom
Status:old
Tags:
Comment:
I actually quite liked that shortcut.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1389,6 +1389,10 @@
13901390 public function userCanRead() {
13911391 global $wgUser, $wgGroupPermissions;
13921392
 1393+ # Shortcut for public wikis, allows skipping quite a bit of code path
 1394+ if ($wgGroupPermissions['*']['read'])
 1395+ return true;
 1396+
13931397 $result = null;
13941398 wfRunHooks( 'userCan', array( &$this, &$wgUser, 'read', &$result ) );
13951399 if ( $result !== null ) {

Status & tagging log