diff options
Diffstat (limited to 'includes/BlockCache.php')
-rw-r--r-- | includes/BlockCache.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/BlockCache.php b/includes/BlockCache.php index 5b65bdc20a56..8b49a0142c13 100644 --- a/includes/BlockCache.php +++ b/includes/BlockCache.php @@ -7,15 +7,15 @@ class BlockCache { var $mData = false, $mMemcKey; - function BlockCache( $deferLoad = false, $dbName = "" ) + function BlockCache( $deferLoad = false, $dbName = '' ) { global $wgDBname; - if ( $dbName == "" ) { + if ( $dbName == '' ) { $dbName = $wgDBname; } - $this->mMemcKey = "$dbName:ipblocks"; + $this->mMemcKey = $dbName.':ipblocks'; if ( !$deferLoad ) { $this->load(); @@ -36,10 +36,10 @@ class BlockCache } } - if ( $this->mData === false || is_null( $this->mData ) ) { + if ( !is_array( $this->mData ) ) { # Load from DB $this->mData = array(); - Block::enumBlocks( "wfBlockCacheInsert", "" ); # Calls $this->insert() + Block::enumBlocks( 'wfBlockCacheInsert', '' ); # Calls $this->insert() } if ( $saveMemc ) { @@ -78,7 +78,7 @@ class BlockCache if ( $blocked ) { # Clear low order bits if ( $networkBits != 32 ) { - $ip .= "/$networkBits"; + $ip .= '/'.$networkBits; $ip = Block::normaliseRange( $ip ); } $block = new Block(); |