From: jenkins-bot Date: Thu, 11 Jul 2019 22:42:44 +0000 (+0000) Subject: Merge "Avoid using deprecated SiteStatsUpdate constructor" X-Git-Tag: 1.34.0-rc.0~1049 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=5f3ca358fed2e59ee33f1134dbee247495c0f09a;hp=7bdfadde3fe1b14ff633ff740f77d74585b8e00a;p=lhc%2Fweb%2Fwiklou.git Merge "Avoid using deprecated SiteStatsUpdate constructor" --- 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" ); }