From: umherirrender Date: Mon, 17 Jun 2013 19:09:06 +0000 (+0200) Subject: Do not output numberofviews, if $wgDisableCounters = true X-Git-Tag: 1.31.0-rc.0~19411^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=efcf646a03f60f9c23466306f26364566f493b9d;p=lhc%2Fweb%2Fwiklou.git Do not output numberofviews, if $wgDisableCounters = true Follow up I9975dceedeffafadf560ed71238c51b94eb8c3ad But now for the parser function Change-Id: I18261b884b7f3be57a42c0b10594384fab6f9c9a --- diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index a7820d4b6a..2cdfc6e934 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -456,7 +456,8 @@ class CoreParserFunctions { return self::formatRaw( SiteStats::edits(), $raw ); } static function numberofviews( $parser, $raw = null ) { - return self::formatRaw( SiteStats::views(), $raw ); + global $wgDisableCounters; + return !$wgDisableCounters ? self::formatRaw( SiteStats::views(), $raw ) : ''; } static function pagesinnamespace( $parser, $namespace = 0, $raw = null ) { return self::formatRaw( SiteStats::pagesInNs( intval( $namespace ) ), $raw );