Fix bug reported by Slowking_Man where retroactive autoblocks take effect even if...
authorAndrew Garrett <werdna@users.mediawiki.org>
Mon, 20 Nov 2006 06:01:45 +0000 (06:01 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Mon, 20 Nov 2006 06:01:45 +0000 (06:01 +0000)
includes/Block.php

index a6646fc..39ebe04 100644 (file)
@@ -400,7 +400,8 @@ class Block
                $affected = $dbw->affectedRows();
                $dbw->commit();
 
-               $this->doRetroactiveAutoblock();
+               if ($affected)
+                       $this->doRetroactiveAutoblock();
 
                return $affected;
        }