Localisation updates for core and extension messages from translatewiki.net (2011...
[lhc/web/wiklou.git] / includes / Block.php
index bc4c552..f1b3e7f 100644 (file)
@@ -889,15 +889,8 @@ class Block {
         * Purge expired blocks from the ipblocks table
         */
        public static function purgeExpired() {
-               // https://bugzilla.wikimedia.org/show_bug.cgi?id=28485
-               // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;"
-               $lb = wfGetLBFactory()->newMainLB();
-               $dbw = $lb->getConnection( DB_MASTER );
-
+               $dbw = wfGetDB( DB_MASTER );
                $dbw->delete( 'ipblocks', array( 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ), __METHOD__ );
-
-               $lb->commitMasterChanges();
-               $lb->closeAll();
        }
 
        /**