From: Tim Starling Date: Sun, 27 Mar 2005 16:30:00 +0000 (+0000) Subject: moved call to spreadBlock() to getBlockedStatus(). This means one less query per... X-Git-Tag: 1.5.0alpha1~485 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=f21b45c57e85efd1c440093a17ba4efc7eaf0623;p=lhc%2Fweb%2Fwiklou.git moved call to spreadBlock() to getBlockedStatus(). This means one less query per logged-in page view. It also means blocked users will only have their IP address blocked if they edit, rather than just viewing pages. --- diff --git a/includes/User.php b/includes/User.php index 8f51b13ecd..9fb1fd0bdd 100644 --- a/includes/User.php +++ b/includes/User.php @@ -265,6 +265,7 @@ class User { if ( $block->load( $wgIP , $this->mId ) ) { $this->mBlockedby = $block->mBy; $this->mBlockreason = $block->mReason; + $this->spreadBlock(); } } @@ -392,7 +393,6 @@ class User { else wfDebug( "User::loadFromSession() unable to save to memcached\n" ); } - $user->spreadBlock(); return $user; } return new User(); # Can't log in from session