From 36ffad985564fb3eded0d3e086aa6b6921ce79f0 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 28 Apr 2014 20:46:16 -0700 Subject: [PATCH] Do not increment the total site edit count on null edits Change-Id: I0d8d7bcbbd7783cd9845cb5ec2704e854a083e19 --- includes/WikiPage.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 42dc13414a..d53acd0d1a 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -2173,19 +2173,17 @@ class WikiPage implements Page, IDBAccessObject { if ( !$options['changed'] ) { $good = 0; - $total = 0; } elseif ( $options['created'] ) { $good = (int)$this->isCountable( $editInfo ); - $total = 1; } elseif ( $options['oldcountable'] !== null ) { $good = (int)$this->isCountable( $editInfo ) - (int)$options['oldcountable']; - $total = 0; } else { $good = 0; - $total = 0; } + $edits = $options['changed'] ? 1 : 0; + $total = $options['created'] ? 1 : 0; - DeferredUpdates::addUpdate( new SiteStatsUpdate( 0, 1, $good, $total ) ); + DeferredUpdates::addUpdate( new SiteStatsUpdate( 0, $edits, $good, $total ) ); DeferredUpdates::addUpdate( new SearchUpdate( $id, $title, $content ) ); // If this is another user's talk page, update newtalk. -- 2.20.1