diff --git a/modules/statistics/www/showstats.php b/modules/statistics/www/showstats.php index 04381128eec59d48e5e3c4622a691cfcbdefaa44..af907cac34431253d36142fc93c7502beb075961 100644 --- a/modules/statistics/www/showstats.php +++ b/modules/statistics/www/showstats.php @@ -112,7 +112,6 @@ $max = sspmod_statistics_Graph_GoogleCharts::roof($maxvalue); */ $summaryDataset = array(); foreach($results AS $slot => $res) { - foreach ($res AS $key => $value) { if (array_key_exists($key, $summaryDataset)) { $summaryDataset[$key] += $value; @@ -120,10 +119,9 @@ foreach($results AS $slot => $res) { $summaryDataset[$key] = $value; } } - } - - +asort($summaryDataset); +$summaryDataset = array_reverse($summaryDataset, TRUE); #echo '<pre>'; print_r($summaryDataset); exit;