X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FnukeNS.php;h=ee1f59c1243e617ce423936198946d8ed968f37e;hb=c99e9beff7d7c1a5a48f8d6f869a42425021c62b;hp=0326e02308426cea7079e0075363d84c60c4fe85;hpb=a85d1b9d0cd7f02111d3a647d5b91e3b1f334563;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;