Drop 'comma' value for wgArticleCountMethod
[lhc/web/wiklou.git] / includes / content / WikitextContent.php
index bc20aa0..5beef31 100644 (file)
@@ -270,28 +270,22 @@ class WikitextContent extends TextContent {
                        return false;
                }
 
-               switch ( $wgArticleCountMethod ) {
-                       case 'any':
-                               return true;
-                       case 'comma':
-                               $text = $this->getNativeData();
-                               return strpos( $text, ',' ) !== false;
-                       case 'link':
-                               if ( $hasLinks === null ) { # not known, find out
-                                       if ( !$title ) {
-                                               $context = RequestContext::getMain();
-                                               $title = $context->getTitle();
-                                       }
-
-                                       $po = $this->getParserOutput( $title, null, null, false );
-                                       $links = $po->getLinks();
-                                       $hasLinks = !empty( $links );
+               if ( $wgArticleCountMethod === 'link' ) {
+                       if ( $hasLinks === null ) { # not known, find out
+                               if ( !$title ) {
+                                       $context = RequestContext::getMain();
+                                       $title = $context->getTitle();
                                }
 
-                               return $hasLinks;
+                               $po = $this->getParserOutput( $title, null, null, false );
+                               $links = $po->getLinks();
+                               $hasLinks = !empty( $links );
+                       }
+
+                       return $hasLinks;
                }
 
-               return false;
+               return true;
        }
 
        /**