From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/profiler/ProfilerSimpleText.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'includes/profiler/ProfilerSimpleText.php') diff --git a/includes/profiler/ProfilerSimpleText.php b/includes/profiler/ProfilerSimpleText.php index 3e7d6fa4..37350bf3 100644 --- a/includes/profiler/ProfilerSimpleText.php +++ b/includes/profiler/ProfilerSimpleText.php @@ -48,12 +48,20 @@ class ProfilerSimpleText extends ProfilerSimple { $totalReal = isset( $this->mCollated['-total'] ) ? $this->mCollated['-total']['real'] : 0; // profiling mismatch error? - uasort( $this->mCollated, array('self','sort') ); - array_walk( $this->mCollated, array('self','format'), $totalReal ); - if ( $this->visible ) { - print '
'.self::$out.'
'; - } else { + uasort( $this->mCollated, array( 'self', 'sort' ) ); + array_walk( $this->mCollated, array( 'self', 'format' ), $totalReal ); + if ( PHP_SAPI === 'cli' ) { print "\n"; + } elseif ( $this->getContentType() === 'text/html' ) { + if ( $this->visible ) { + print '
'.self::$out.'
'; + } else { + print "\n"; + } + } elseif ( $this->getContentType() === 'text/javascript' ) { + print "\n/*\n".self::$out."*/\n"; + } elseif ( $this->getContentType() === 'text/css' ) { + print "\n/*\n".self::$out."*/\n"; } } } -- cgit v1.2.2