Clean up transactions in maintenance scripts
[lhc/web/wiklou.git] / maintenance / updateCollation.php
index 342ffba..bb75314 100644 (file)
@@ -24,8 +24,6 @@
  * @author Aryeh Gregor (Simetrical)
  */
 
-#$optionsWithArgs = array( 'begin', 'max-slave-lag' );
-
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -143,7 +141,7 @@ TEXT;
                        $this->output( " processing..." );
 
                        if ( !$dryRun ) {
-                               $dbw->begin( __METHOD__ );
+                               $this->beginTransaction( $dbw, __METHOD__ );
                        }
                        foreach ( $res as $row ) {
                                $title = Title::newFromRow( $row );
@@ -195,7 +193,7 @@ TEXT;
                                }
                        }
                        if ( !$dryRun ) {
-                               $dbw->commit( __METHOD__ );
+                               $this->commitTransaction( $dbw, __METHOD__ );
                        }
 
                        $count += $res->numRows();