mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-01 19:14:57 +02:00
Fix meta alert datatable order
This commit is contained in:
parent
56c5f324b0
commit
c177ee2e2e
@ -900,13 +900,13 @@ if ($get_agent_alerts_datatable === true) {
|
|||||||
return function ($a, $b) use ($sort, $sortField) {
|
return function ($a, $b) use ($sort, $sortField) {
|
||||||
if ($sort === 'asc') {
|
if ($sort === 'asc') {
|
||||||
if (is_string($a[$sortField]) === true) {
|
if (is_string($a[$sortField]) === true) {
|
||||||
return strnatcmp($a[$sortField], $b[$sortField]);
|
return strcmp($a[$sortField], $b[$sortField]);
|
||||||
} else {
|
} else {
|
||||||
return ($a[$sortField] - $b[$sortField]);
|
return ($a[$sortField] - $b[$sortField]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (is_string($a[$sortField]) === true) {
|
if (is_string($a[$sortField]) === true) {
|
||||||
return strnatcmp($b[$sortField], $a[$sortField]);
|
return strcmp($b[$sortField], $a[$sortField]);
|
||||||
} else {
|
} else {
|
||||||
return ($a[$sortField] + $b[$sortField]);
|
return ($a[$sortField] + $b[$sortField]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user