function prod_check_menu_alter in Production check & Production monitor 6
Implementation of hook_menu_alter()
File
- ./
prod_check.module, line 180
Code
function prod_check_menu_alter(&$items) {
if (variable_get('prod_check_enable_nagios', 0) && isset($items['nagios'])) {
// Change callback.
if (variable_get('prod_check_nagios_unique', 'default') != 'default') {
$items['nagios']['page callback'] = 'prod_check_nagios_status_page';
}
// Change the path.
$new_path = variable_get('prod_check_nagios_takeover', '');
if (!empty($new_path)) {
// Create custom Nagios path.
$items[$new_path] = $items['nagios'];
// Drop old Nagios path.
unset($items['nagios']);
}
}
}