From d6cbf3ff43ab9a5f3612d8cc46e19281821db2fa Mon Sep 17 00:00:00 2001 From: Eddie Greiner-Petter Date: Fri, 16 Feb 2018 22:18:48 +0100 Subject: [PATCH] site_stats: Unbreak counting newly created pages Fixes a bug introduced on 331c9f9e2e that stopped newly created pages from incrementing the counter of ss_total_pages in site_stats. The array accepted by SiteStatsUpdate::factory is not meant to take a value with the key 'total'. What's meant here is 'pages'. Let's change the variable name as well to avoid confusion in the future. Change-Id: I9c82d926206d9b46f333c6f6cb9d3c7d41db3a53 --- includes/page/WikiPage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index c7bb8ecc62..a47b00147f 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2269,10 +2269,10 @@ class WikiPage implements Page, IDBAccessObject { $good = 0; } $edits = $options['changed'] ? 1 : 0; - $total = $options['created'] ? 1 : 0; + $pages = $options['created'] ? 1 : 0; DeferredUpdates::addUpdate( SiteStatsUpdate::factory( - [ 'edits' => $edits, 'articles' => $good, 'total' => $total ] + [ 'edits' => $edits, 'articles' => $good, 'pages' => $pages ] ) ); DeferredUpdates::addUpdate( new SearchUpdate( $id, $title, $content ) ); -- 2.20.1