Merge "New hook for filters on Special:Contributions form"
[lhc/web/wiklou.git] / maintenance / populateRevisionLength.php
index b73ac7f..297bed2 100644 (file)
@@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php';
 class PopulateRevisionLength extends LoggedUpdateMaintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Populates the rev_len and ar_len fields";
+               $this->addDescription( 'Populates the rev_len and ar_len fields' );
                $this->setBatchSize( 200 );
        }
 
@@ -100,14 +100,14 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance {
                                __METHOD__
                        );
 
-                       $db->begin( __METHOD__ );
+                       $this->beginTransaction( $db, __METHOD__ );
                        # Go through and update rev_len from these rows.
                        foreach ( $res as $row ) {
                                if ( $this->upgradeRow( $row, $table, $idCol, $prefix ) ) {
                                        $count++;
                                }
                        }
-                       $db->commit( __METHOD__ );
+                       $this->commitTransaction( $db, __METHOD__ );
 
                        $blockStart += $this->mBatchSize;
                        $blockEnd += $this->mBatchSize;