X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FWikitextContent.php;h=5beef31b8c6b522f01bbb65f30e11e2bb084098d;hb=395462b7d5e1384f8c8c8df4c1ef7ec6e9fdc573;hp=bc20aa002031b24a1c632c9aa8f74c61f844d9a3;hpb=9a6b2a4fffb82840d0bf780eb4ecb873ad64fa54;p=lhc%2Fweb%2Fwiklou.git 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; } /**