Fix meta alert datatable order

This commit is contained in:
Calvo 2022-09-16 15:01:52 +02:00
parent 56c5f324b0
commit c177ee2e2e
1 changed files with 2 additions and 2 deletions

View File

@ -900,13 +900,13 @@ if ($get_agent_alerts_datatable === true) {
return function ($a, $b) use ($sort, $sortField) {
if ($sort === 'asc') {
if (is_string($a[$sortField]) === true) {
return strnatcmp($a[$sortField], $b[$sortField]);
return strcmp($a[$sortField], $b[$sortField]);
} else {
return ($a[$sortField] - $b[$sortField]);
}
} else {
if (is_string($a[$sortField]) === true) {
return strnatcmp($b[$sortField], $a[$sortField]);
return strcmp($b[$sortField], $a[$sortField]);
} else {
return ($a[$sortField] + $b[$sortField]);
}