From: jenkins-bot Date: Tue, 18 Nov 2014 20:02:06 +0000 (+0000) Subject: Merge "ProfilerOutput: Remove logStandardData() and make log() abstract" X-Git-Tag: 1.31.0-rc.0~13262 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=c5cdba22fa9067b33c197208472dbabd4271c26d;p=lhc%2Fweb%2Fwiklou.git Merge "ProfilerOutput: Remove logStandardData() and make log() abstract" --- c5cdba22fa9067b33c197208472dbabd4271c26d diff --cc includes/profiler/Profiler.php index d23c77771b,cd20311eee..0df3468aa6 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@@ -157,15 -147,10 +157,15 @@@ abstract class Profiler } foreach ( $output as $outType ) { - $class = 'ProfilerOutput' . ucfirst( strtolower( $outType ) ); + if ( isset( self::$outputTypes[$outType] ) ) { + $class = self::$outputTypes[$outType]; + } else { + throw new MWException( "'$outType' is an invalid output type" ); + } + /** @var ProfilerOutput $profileOut */ $profileOut = new $class( $this, $this->params ); if ( $profileOut->canUse() ) { - $profileOut->log(); + $profileOut->log( $this->getFunctionStats() ); } } }