Some redesign
This commit is contained in:
parent
4a59a7ae7f
commit
033bf65f2c
1 changed files with 5 additions and 5 deletions
|
@ -137,20 +137,20 @@ class Hook extends BaseObject
|
||||||
if (array_key_exists($name, self::$hooks)) {
|
if (array_key_exists($name, self::$hooks)) {
|
||||||
foreach (self::$hooks[$name] as $hook) {
|
foreach (self::$hooks[$name] as $hook) {
|
||||||
// Call a hook to check if this hook call needs to be forked
|
// Call a hook to check if this hook call needs to be forked
|
||||||
|
if (array_key_exists('hook_fork', self::$hooks)) {
|
||||||
$hookdata = ['name' => $name, 'data' => $data, 'execute' => true];
|
$hookdata = ['name' => $name, 'data' => $data, 'execute' => true];
|
||||||
|
|
||||||
if (array_key_exists('hook_fork', self::$hooks)) {
|
|
||||||
foreach (self::$hooks['hook_fork'] as $fork_hook) {
|
foreach (self::$hooks['hook_fork'] as $fork_hook) {
|
||||||
if ($hook[0] != $fork_hook[0]) {
|
if ($hook[0] != $fork_hook[0]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
self::callSingle(self::getApp(), 'hook_fork', $fork_hook, $hookdata);
|
self::callSingle(self::getApp(), 'hook_fork', $fork_hook, $hookdata);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!$hookdata['execute']) {
|
if (!$hookdata['execute']) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Worker::add($priority, 'ForkHook', $name, $hook, $data);
|
Worker::add($priority, 'ForkHook', $name, $hook, $data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue