Merge "Do not raise a PHP warning when session write fails"
[lhc/web/wiklou.git] / maintenance / deleteSelfExternals.php
index a097622..f9bb416 100644 (file)
@@ -39,10 +39,10 @@ class DeleteSelfExternals extends Maintenance {
        public function execute() {
                global $wgServer;
                $this->output( "Deleting self externals from $wgServer\n" );
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
                while ( 1 ) {
                        wfWaitForSlaves();
-                       $db->commit( __METHOD__ );
+                       $this->commitTransaction( $db, __METHOD__ );
                        $q = $db->limitResult( "DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to"
                                . $db->buildLike( $wgServer . '/', $db->anyString() ), $this->mBatchSize );
                        $this->output( "Deleting a batch\n" );