Deprecating: Consolidating `progressive` & `constructive` buttons
[lhc/web/wiklou.git] / maintenance / deleteOrphanedRevisions.php
index 776d345..5f08b5a 100644 (file)
@@ -34,7 +34,8 @@ require_once __DIR__ . '/Maintenance.php';
 class DeleteOrphanedRevisions extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Maintenance script to delete revisions which refer to a nonexisting page";
+               $this->addDescription(
+                       'Maintenance script to delete revisions which refer to a nonexisting page' );
                $this->addOption( 'report', 'Prints out a count of affected revisions but doesn\'t delete them' );
        }
 
@@ -43,7 +44,7 @@ class DeleteOrphanedRevisions extends Maintenance {
 
                $report = $this->hasOption( 'report' );
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $this->beginTransaction( $dbw, __METHOD__ );
                list( $page, $revision ) = $dbw->tableNamesN( 'page', 'revision' );