X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeleteOldRevisions.php;h=123163fb2b2286f1452c9cefde0da2568595d6fe;hb=cf9fc81e9669b6c016c044de57ad2bdd5113d167;hp=847d863412662f4996edb5b076fed3d1087ce84b;hpb=b65669ff7adbbde55872a8ddd93214a9e1df75c6;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteOldRevisions.php b/maintenance/deleteOldRevisions.php index 847d863412..123163fb2b 100644 --- a/maintenance/deleteOldRevisions.php +++ b/maintenance/deleteOldRevisions.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class DeleteOldRevisions extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Delete old (non-current) revisions from the database"; + $this->addDescription( 'Delete old (non-current) revisions from the database' ); $this->addOption( 'delete', 'Actually perform the deletion' ); $this->addOption( 'page_id', 'List of page ids to work on', false ); } @@ -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 ); }