From efcf646a03f60f9c23466306f26364566f493b9d Mon Sep 17 00:00:00 2001 From: umherirrender Date: Mon, 17 Jun 2013 21:09:06 +0200 Subject: [PATCH] Do not output numberofviews, if $wgDisableCounters = true Follow up I9975dceedeffafadf560ed71238c51b94eb8c3ad But now for the parser function Change-Id: I18261b884b7f3be57a42c0b10594384fab6f9c9a --- includes/parser/CoreParserFunctions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); -- 2.20.1