Merge "Do not output numberofviews, if $wgDisableCounters = true"
authorParent5446 <tylerromeo@gmail.com>
Mon, 17 Jun 2013 19:22:23 +0000 (19:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 17 Jun 2013 19:22:23 +0000 (19:22 +0000)
includes/parser/CoreParserFunctions.php

index a7820d4..2cdfc6e 100644 (file)
@@ -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 );