Parent5446 has submitted this change and it was merged.

Change subject: Do not output numberofviews, if $wgDisableCounters = true
......................................................................


Do not output numberofviews, if $wgDisableCounters = true

Follow up I9975dceedeffafadf560ed71238c51b94eb8c3ad
But now for the parser function

Change-Id: I18261b884b7f3be57a42c0b10594384fab6f9c9a
---
M includes/parser/CoreParserFunctions.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Parent5446: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index a7820d4..2cdfc6e 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -456,7 +456,8 @@
                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 );

-- 
To view, visit https://gerrit.wikimedia.org/r/69143
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I18261b884b7f3be57a42c0b10594384fab6f9c9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to