Merge "Avoid pointless getNativeData() call in isCountable()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 21 May 2015 10:23:49 +0000 (10:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 21 May 2015 10:23:49 +0000 (10:23 +0000)
includes/content/WikitextContent.php

index dbe09f9..3b449b6 100644 (file)
@@ -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