X-Git-Url: http://git.cyclocoop.org//%27http:/ie7-js.googlecode.com/svn/test/index.html/%27?a=blobdiff_plain;f=includes%2Fprofiler%2FProfilerSectionOnly.php;h=504859d225bb480e8791c8bb86ab6bd5b7cc4c5a;hb=e8f31f6255c3fdfbb1d7ff818be96e0333372e9e;hp=41260a83882cdd94866c32dca4bb2641e35e8842;hpb=598a250b71aee0ca14eb8661b139bb23cf8e5f40;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/ProfilerSectionOnly.php b/includes/profiler/ProfilerSectionOnly.php index 41260a8388..504859d225 100644 --- a/includes/profiler/ProfilerSectionOnly.php +++ b/includes/profiler/ProfilerSectionOnly.php @@ -22,7 +22,7 @@ * Profiler that only tracks explicit profiling sections * * @code - * $wgProfiler['class'] = 'ProfilerSectionOnly'; + * $wgProfiler['class'] = ProfilerSectionOnly::class; * $wgProfiler['output'] = 'text'; * $wgProfiler['visible'] = true; * @endcode @@ -73,10 +73,7 @@ class ProfilerSectionOnly extends Profiler { protected function getFunctionReport() { $data = $this->getFunctionStats(); usort( $data, function ( $a, $b ) { - if ( $a['real'] === $b['real'] ) { - return 0; - } - return ( $a['real'] > $b['real'] ) ? -1 : 1; // descending + return $b['real'] <=> $a['real']; // descending } ); $width = 140;