Module: check_mk
Branch: master
Commit: 5ffc35426d046930fb1f5784368fd7c03ed52ba9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ffc35426d0469…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 30 12:10:24 2012 +0200
FIX: Fixed double hook execution when using localized multisite
---
ChangeLog | 1 +
web/htdocs/wato.py | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2940eb1..b74e9dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -67,6 +67,7 @@
* parent scan: new option "ping probes", that allows skipping
unreachable gateways.
* FIX: Removed double collect_hosts() call in activate changes hook
+ * FIX: Fixed double hook execution when using localized multisite
BI:
* Great speed up of rule compilation in large environments
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 579c849..f21cf5c 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -11034,8 +11034,6 @@ def mode_pattern_editor(phase):
# Inform plugins about changes of hosts. the_thing can be:
# a folder, a file or a host
-g_hooks = {}
-
class API:
def register_hook(self, name, func):
g_hooks.setdefault(name, []).append(func)
@@ -11642,6 +11640,9 @@ def load_plugins():
g_rulespec_group = {}
g_rulespec_groups = []
+ global g_hooks
+ g_hooks = {}
+
# Declare WATO-specific permissions
config.declare_permission_section("wato", _("WATO - Check_MK's Web
Administration Tool"))