From: Eddie Greiner-Petter Date: Fri, 16 Feb 2018 21:18:48 +0000 (+0100) Subject: site_stats: Unbreak counting newly created pages X-Git-Tag: 1.31.0-rc.0~583^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=d6cbf3ff43ab9a5f3612d8cc46e19281821db2fa;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) );