diff options
author | Joas Schilling <coding@schilljs.com> | 2016-10-18 15:34:04 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-10-18 15:34:04 +0300 |
commit | 7599f2eea2885bd50d55c22ca8151ca12f433d1d (patch) | |
tree | 18cdfebf49da53ac440b112cf446d784e7cc241e /lib | |
parent | d647c10d9c0413b69091f9612f4130d4bb21e6fd (diff) |
Sort the stats by numbers
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/BackgroundJobs/ComputeStatistics.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/BackgroundJobs/ComputeStatistics.php b/lib/BackgroundJobs/ComputeStatistics.php index 38381ff..b9d8485 100644 --- a/lib/BackgroundJobs/ComputeStatistics.php +++ b/lib/BackgroundJobs/ComputeStatistics.php @@ -130,6 +130,7 @@ class ComputeStatistics extends TimedJob { } } + arsort($statistics, SORT_NUMERIC); return $statistics; } @@ -142,6 +143,10 @@ class ComputeStatistics extends TimedJob { $version = explode('.', $value); $majorMinorVersion = $version[0] . '.' . (int) $version[1]; + if ($category === 'server') { + return $majorMinorVersion . '.' . $version[2]; + } + if ($category === 'database') { switch ($version[0]) { case '2': @@ -161,7 +166,11 @@ class ComputeStatistics extends TimedJob { return $majorMinorVersion; } - return $value; + if ($key === 'max_execution_time') { + return $value . 's'; + } + + return (string) $value; } private function getNumericalEvaluatedStatistics($category, $key) { |