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 );
}
function doDelete( $delete = false, $args = array() ) {
# Data should come off the master, wrapped in a transaction
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
$this->beginTransaction( $dbw, __METHOD__ );
$pageConds = array();