From bb480a638087a69c7c96eba75eac82110870d330 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 7 Apr 2006 04:20:16 +0000 Subject: [PATCH] Fix counter drift when articles are created with {{subst:}} --- includes/Article.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 33ffc7630c..f844149ed0 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1179,9 +1179,6 @@ class Article { return false; } - $this->mGoodAdjustment = (int)$this->isCountable( $text ); - $this->mTotalAdjustment = 1; - $ns = $this->mTitle->getNamespace(); $ttl = $this->mTitle->getDBkey(); @@ -1191,6 +1188,13 @@ class Article { } $text = $this->preSaveTransform( $text ); + + # Set statistics members + # We work out if it's countable after PST to avoid counter drift + # when articles are created with {{subst:}} + $this->mGoodAdjustment = (int)$this->isCountable( $text ); + $this->mTotalAdjustment = 1; + /* Silently ignore minoredit if not allowed */ $isminor = $isminor && $wgUser->isAllowed('minoredit'); $now = wfTimestampNow(); -- 2.20.1