X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FnukePage.php;h=9e0971a524e3d261f14e72489364ccb4fdac0eb5;hb=7afced64454ad30d688540f7626448ac2faefebb;hp=e27324a7588bc822904364238584d01bfa4c91bd;hpb=ac8e303eb5cd5c3897adad480676ccca0cdc28e4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/nukePage.php b/maintenance/nukePage.php index e27324a758..9e0971a524 100644 --- a/maintenance/nukePage.php +++ b/maintenance/nukePage.php @@ -39,7 +39,7 @@ class NukePage extends Maintenance { } public function execute() { - $name = $this->getArg(); + $name = $this->getArg( 0 ); $delete = $this->hasOption( 'delete' ); $dbw = $this->getDB( DB_MASTER ); @@ -92,7 +92,11 @@ class NukePage extends Maintenance { if ( $delete ) { $this->output( "Updating site stats..." ); $ga = $isGoodArticle ? -1 : 0; // if it was good, decrement that too - $stats = new SiteStatsUpdate( 0, -$count, $ga, -1 ); + $stats = SiteStatsUpdate::factory( [ + 'edits' => -$count, + 'articles' => $ga, + 'pages' => -1 + ] ); $stats->doUpdate(); $this->output( "done.\n" ); } @@ -115,5 +119,5 @@ class NukePage extends Maintenance { } } -$maintClass = "NukePage"; +$maintClass = NukePage::class; require_once RUN_MAINTENANCE_IF_MAIN;