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