Fix autoblocks in r92480
authorAndrew Garrett <werdna@users.mediawiki.org>
Mon, 18 Jul 2011 21:56:59 +0000 (21:56 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Mon, 18 Jul 2011 21:56:59 +0000 (21:56 +0000)
includes/Block.php

index c88ece7..1e535d8 100644 (file)
@@ -643,8 +643,8 @@ class Block {
                $autoblock->mHideName = $this->mHideName;
                $autoblock->prevents( 'editownusertalk', $this->prevents( 'editownusertalk' ) );
 
-               $dbr = wfGetDB( DB_SLAVE );
-               if ( $this->mExpiry == $dbr->getInfinity() ) {
+                $dbr = wfGetDB( DB_SLAVE );
+               if ( $timestamp == 'infinity' ) {
                        # Original block was indefinite, start an autoblock now
                        $autoblock->mExpiry = Block::getAutoblockExpiry( $timestamp );
                } else {