Fixed a sorting bug in the disk logstream, which removed numeric values within the charts

This commit is contained in:
unknown 2008-09-16 15:58:49 +02:00
parent 746d7843cb
commit b8c9cdf9eb

View File

@ -606,7 +606,6 @@ class LogStreamDisk extends LogStream {
else // Just copy the value! else // Just copy the value!
$myFieldData = $logArray[$szFieldId]; $myFieldData = $logArray[$szFieldId];
if ( isset($aResult[ $myFieldData ]) ) if ( isset($aResult[ $myFieldData ]) )
$aResult[ $myFieldData ]++; $aResult[ $myFieldData ]++;
else else
@ -627,7 +626,8 @@ class LogStreamDisk extends LogStream {
} while ( ($ret = $this->ReadNext($uID, $logArray)) == SUCCESS ); } while ( ($ret = $this->ReadNext($uID, $logArray)) == SUCCESS );
// Sort Array, so the highest count comes first! // Sort Array, so the highest count comes first!
array_multisort($aResult, SORT_NUMERIC, SORT_DESC); arsort($aResult);
// array_multisort($aResult, SORT_NUMERIC, SORT_DESC);
if ( isset($aResult[ $content['LN_STATS_OTHERS'] ]) ) if ( isset($aResult[ $content['LN_STATS_OTHERS'] ]) )
{ {