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' );
}
$report = $this->hasOption( 'report' );
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
$this->beginTransaction( $dbw, __METHOD__ );
list( $page, $revision ) = $dbw->tableNamesN( 'page', 'revision' );