Before we run these checks, lets see if the checks for this module are enabled otherwise, break out of the loop:
diff --git a/nagios.module b/nagios.module
index 2c85466..a5b7651 100644
--- a/nagios.module
+++ b/nagios.module
@@ -314,6 +314,11 @@ function nagios_invoke_all($hook = 'nagios') {
$return = array();
$args = func_get_args();
foreach (module_implements($hook) as $module) {
+ // before we run the checks, lets see if the checks for this module are enabled
+ // otherwise, break out of the loop
+ if ($hook == 'nagios' && !variable_get('nagios_enable_' . $module, 0)) {
+ continue;
+ }
$function = $module . '_' . $hook;
$result = call_user_func_array($function, $args);
$return[$module] = $result;
Comments
Comment #0.0
bryanhirsch commentedclarify
Comment #1
greg.harveyThanks for the patch. This was already fixed by someone else, it seems - I went to apply it and the exact same code (with a different comment) is already there!