User: Fix loading of user_touched
[lhc/web/wiklou.git] / maintenance / deleteOldRevisions.php
index 114aefd..f411148 100644 (file)
@@ -22,7 +22,7 @@
  * @author Rob Church <robchur@gmail.com>
  */
 
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
 
 /**
  * Maintenance script that deletes old (non-current) revisions from the database.
@@ -45,8 +45,8 @@ class DeleteOldRevisions extends Maintenance {
        function doDelete( $delete = false, $args = array() ) {
 
                # Data should come off the master, wrapped in a transaction
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw = $this->getDB( DB_MASTER );
+               $this->beginTransaction( $dbw, __METHOD__ );
 
                $pageConds = array();
                $revConds = array();
@@ -92,7 +92,7 @@ class DeleteOldRevisions extends Maintenance {
 
                # This bit's done
                # Purge redundant text records
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
                if ( $delete ) {
                        $this->purgeRedundantText( true );
                }
@@ -100,4 +100,4 @@ class DeleteOldRevisions extends Maintenance {
 }
 
 $maintClass = "DeleteOldRevisions";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;