Dont connect hooks twice
This commit is contained in:
parent
0b2ae314c7
commit
46f70aabfd
|
@ -31,6 +31,12 @@ class OC_Hook{
|
||||||
self::$registered[$signalclass][$signalname] = array();
|
self::$registered[$signalclass][$signalname] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dont connect hooks twice
|
||||||
|
foreach (self::$registered[$signalclass][$signalname] as $hook) {
|
||||||
|
if ($hook['class'] === $slotclass and $hook['name'] === $slotname) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Connect the hook handler to the requested emitter
|
// Connect the hook handler to the requested emitter
|
||||||
self::$registered[$signalclass][$signalname][] = array(
|
self::$registered[$signalclass][$signalname][] = array(
|
||||||
"class" => $slotclass,
|
"class" => $slotclass,
|
||||||
|
|
Loading…
Reference in New Issue