Merge "New hook for filters on Special:Contributions form"
[lhc/web/wiklou.git] / maintenance / deleteArchivedFiles.php
index bd8ca10..92f1a91 100644 (file)
@@ -34,7 +34,7 @@ require_once __DIR__ . '/Maintenance.php';
 class DeleteArchivedFiles extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Deletes all archived images.";
+               $this->addDescription( 'Deletes all archived images.' );
                $this->addOption( 'delete', 'Perform the deletion' );
                $this->addOption( 'force', 'Force deletion of rows from filearchive' );
        }
@@ -47,7 +47,7 @@ class DeleteArchivedFiles extends Maintenance {
 
                # Data should come off the master, wrapped in a transaction
                $dbw = $this->getDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $this->beginTransaction( $dbw, __METHOD__ );
                $repo = RepoGroup::singleton()->getLocalRepo();
 
                # Get "active" revisions from the filearchive table
@@ -113,7 +113,7 @@ class DeleteArchivedFiles extends Maintenance {
                        $dbw->delete( 'filearchive', array( 'fa_id' => $id ), __METHOD__ );
                }
 
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
                $this->output( "Done! [$count file(s)]\n" );
        }
 }