class NukePage extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Remove a page record from the database";
+ $this->addDescription( 'Remove a page record from the database' );
$this->addOption( 'delete', "Actually delete the page" );
$this->addArg( 'title', 'Title to delete' );
}
# Get corresponding revisions
$this->output( "Searching for revisions..." );
$res = $dbw->query( "SELECT rev_id FROM $tbl_rev WHERE rev_page = $id" );
- $revs = array();
+ $revs = [];
foreach ( $res as $row ) {
$revs[] = $row->rev_id;
}