public function execute() {
$ns = $this->getOption( 'ns', NS_MEDIAWIKI );
- $delete = $this->getOption( 'delete', false );
- $all = $this->getOption( 'all', false );
+ $delete = $this->hasOption( 'delete' );
+ $all = $this->hasOption( 'all' );
$dbw = $this->getDB( DB_MASTER );
$this->beginTransaction( $dbw, __METHOD__ );
$dbw->query( "DELETE FROM $tbl_pag WHERE page_id = $id" );
$this->commitTransaction( $dbw, __METHOD__ );
// Delete revisions as appropriate
- $child = $this->runChild( 'NukePage', 'nukePage.php' );
+ $child = $this->runChild( NukePage::class, 'nukePage.php' );
$child->deleteRevisions( $revs );
$this->purgeRedundantText( true );
$n_deleted++;
}
}
-$maintClass = "NukeNS";
+$maintClass = NukeNS::class;
require_once RUN_MAINTENANCE_IF_MAIN;