Add $wgEnableParserLimitReporting to control whether the NewPP limit
authorReedy <reedy@wikimedia.org>
Mon, 14 Oct 2013 23:33:34 +0000 (00:33 +0100)
committerReedy <reedy@wikimedia.org>
Thu, 17 Oct 2013 22:13:34 +0000 (23:13 +0100)
report is included as a HTML comment.

Bug: 26792
Change-Id: I2b2b3c9d76487168243b733c1154c4c26c7de3d6

RELEASE-NOTES-1.22
includes/DefaultSettings.php
includes/content/ContentHandler.php

index 289f008..b988294 100644 (file)
@@ -244,6 +244,8 @@ production.
   the output of the API query meta=siteinfo&siprop=statistics
 * Primary keys have been added to both the archive table and the externallinks
   tables.
+* Added $wgEnableParserLimitReporting to control whether the NewPP limit report is
+  output in a HTML comment.
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
index ab03be3..a0a1b3e 100644 (file)
@@ -5936,6 +5936,11 @@ $wgExtensionEntryPointListFiles = array();
  */
 $wgParserOutputHooks = array();
 
+/**
+ * Whether to include the NewPP limit report as a HTML comment
+ */
+$wgEnableParserLimitReporting = true;
+
 /**
  * List of valid skin names.
  * The key should be the name in all lower case, the value should be a properly
index a8fa9ed..2a92e23 100644 (file)
@@ -938,7 +938,7 @@ abstract class ContentHandler {
         * @return ParserOptions
         */
        public function makeParserOptions( $context ) {
-               global $wgContLang;
+               global $wgContLang, $wgEnableParserLimitReporting;
 
                if ( $context instanceof IContextSource ) {
                        $options = ParserOptions::newFromContext( $context );
@@ -950,7 +950,7 @@ abstract class ContentHandler {
                        throw new MWException( "Bad context for parser options: $context" );
                }
 
-               $options->enableLimitReport(); // show inclusion/loop reports
+               $options->enableLimitReport( $wgEnableParserLimitReporting ); // show inclusion/loop reports
                $options->setTidy( true ); // fix bad HTML
 
                return $options;