X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fcontent%2FWikitextContent.php;h=5beef31b8c6b522f01bbb65f30e11e2bb084098d;hp=bc20aa002031b24a1c632c9aa8f74c61f844d9a3;hb=326d655fc9309f55112538b387ed8c201158a27d;hpb=58858df842f91d9ea1c9f9b6f3c767d8b204886b diff --git a/includes/content/WikitextContent.php b/includes/content/WikitextContent.php index bc20aa0020..5beef31b8c 100644 --- a/includes/content/WikitextContent.php +++ b/includes/content/WikitextContent.php @@ -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; } /**