From: Aaron Schulz Date: Thu, 21 May 2015 06:56:25 +0000 (-0700) Subject: Avoid pointless getNativeData() call in isCountable() X-Git-Tag: 1.31.0-rc.0~11341^2 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=c3e76a5966d44cd666d044e4de79bfe723f155bb;p=lhc%2Fweb%2Fwiklou.git Avoid pointless getNativeData() call in isCountable() Change-Id: I40ed1972a8815de645d11217b35c1060d5007e5a --- 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