If $wgShowHostnames is true, add parsed by to NewPP limit report
authorReedy <reedy@wikimedia.org>
Mon, 14 Oct 2013 22:15:31 +0000 (23:15 +0100)
committerReedy <reedy@wikimedia.org>
Mon, 14 Oct 2013 22:16:37 +0000 (23:16 +0100)
Change-Id: I89d6588d77864598ddc5f23e7befc5d46e9035d2

includes/parser/Parser.php

index 0603a9b..221a630 100644 (file)
@@ -355,7 +355,7 @@ class Parser {
                 * to internalParse() which does all the real work.
                 */
 
-               global $wgUseTidy, $wgAlwaysUseTidy;
+               global $wgUseTidy, $wgAlwaysUseTidy, $wgShowHostnames;
                $fname = __METHOD__ . '-' . wfGetCaller();
                wfProfileIn( __METHOD__ );
                wfProfileIn( $fname );
@@ -532,6 +532,9 @@ class Parser {
                        wfRunHooks( 'ParserLimitReportPrepare', array( $this, $this->mOutput ) );
 
                        $limitReport = "NewPP limit report\n";
+                       if ( $wgShowHostnames ) {
+                               $limitReport .= 'Parsed by ' . wfHostname() . "\n";
+                       }
                        foreach ( $this->mOutput->getLimitReportData() as $key => $value ) {
                                if ( wfRunHooks( 'ParserLimitReportFormat',
                                        array( $key, $value, &$limitReport, false, false )