From c3e76a5966d44cd666d044e4de79bfe723f155bb Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 20 May 2015 23:56:25 -0700 Subject: [PATCH] Avoid pointless getNativeData() call in isCountable() Change-Id: I40ed1972a8815de645d11217b35c1060d5007e5a --- includes/content/WikitextContent.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/content/WikitextContent.php b/includes/content/WikitextContent.php index dbe09f91c9..3b449b6319 100644 --- a/includes/content/WikitextContent.php +++ b/includes/content/WikitextContent.php @@ -273,12 +273,11 @@ class WikitextContent extends TextContent { return false; } - $text = $this->getNativeData(); - switch ( $wgArticleCountMethod ) { case 'any': return true; case 'comma': + $text = $this->getNativeData(); return strpos( $text, ',' ) !== false; case 'link': if ( $hasLinks === null ) { # not known, find out -- 2.20.1