From c6c422cfd10f44661ef27d7a191b0b2e62b5773d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 5 Jul 2019 23:26:17 -0700 Subject: [PATCH] Avoid using deprecated SiteStatsUpdate constructor Change-Id: I7eb02d1b91ee08049777c203502a4959dfa8f20f --- maintenance/createAndPromote.php | 2 +- maintenance/nukePage.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index 93614e0a77..5ff3af13ce 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -149,7 +149,7 @@ class CreateAndPromote extends Maintenance { if ( !$exists ) { # Increment site_stats.ss_users - $ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 ); + $ssu = SiteStatsUpdate::factory( [ 'users' => 1 ] ); $ssu->doUpdate(); } diff --git a/maintenance/nukePage.php b/maintenance/nukePage.php index ba0fe5da5d..9e0971a524 100644 --- a/maintenance/nukePage.php +++ b/maintenance/nukePage.php @@ -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" ); } -- 2.20.1