function _nagios_updates_sort_by_severity in Nagios Monitoring 8
Same name and namespace in other branches
- 6 nagios.module \_nagios_updates_sort_by_severity()
- 7 nagios.module \_nagios_updates_sort_by_severity()
Helper function to sort modules by severity with usort().
Parameters
array $a module data:
array $b module data:
Return value
int
1 string reference to '_nagios_updates_sort_by_severity'
- RequirementsController::collectRequirements in src/
Controller/ RequirementsController.php
File
- ./
nagios.module, line 881 - Main file for Nagios service monitoring.
Code
function _nagios_updates_sort_by_severity($a, $b) {
if (isset($a['severity'], $b['severity'])) {
if ($a['severity'] == $b['severity']) {
return 0;
}
return $a['severity'] < $b['severity'] ? -1 : 1;
}
return 0;
}