X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FnukeNS.php;h=ee1f59c1243e617ce423936198946d8ed968f37e;hb=3193c0fb28256c9fa69f1bb24a3c01c87b9cab3c;hp=0326e02308426cea7079e0075363d84c60c4fe85;hpb=d42754e47722436ef52218f21a8e544a05ee9ad7;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/nukeNS.php b/maintenance/nukeNS.php index 0326e02308..ee1f59c124 100644 --- a/maintenance/nukeNS.php +++ b/maintenance/nukeNS.php @@ -52,8 +52,8 @@ class NukeNS extends Maintenance { 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__ ); @@ -88,7 +88,7 @@ class NukeNS extends Maintenance { $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++; @@ -118,5 +118,5 @@ class NukeNS extends Maintenance { } } -$maintClass = "NukeNS"; +$maintClass = NukeNS::class; require_once RUN_MAINTENANCE_IF_MAIN;