Browse Source

Avoid watchdogging "Cache rebuild lock hit: event_islandora_*" stuff.

pull/580/head
Adam Vessey 10 years ago
parent
commit
8641c469e3
  1. 13
      includes/utilities.inc

13
includes/utilities.inc

@ -197,11 +197,14 @@ function islandora_invoke_hook_list($hook, array $refinements, array $args) {
$return = array_merge_recursive($return, $result); $return = array_merge_recursive($return, $result);
array_shift($args); array_shift($args);
} }
if (module_exists('rules') && $event = rules_get_cache("event_$hook")) { if (module_exists('rules')) {
$parameters = $event->parameterInfo(); $event_info = rules_get_event_info($hook);
$rule_args = array_slice($args, 0, count($parameters)); if (isset($event_info['module'])) {
array_unshift($rule_args, $hook); $parameters = $event_info['variables'];
$result = call_user_func_array('rules_invoke_event', $rule_args); $rule_args = array_slice($args, 0, count($parameters));
array_unshift($rule_args, $hook);
$result = call_user_func_array('rules_invoke_event', $rule_args);
}
} }
return $return; return $return;
} }

Loading…
Cancel
Save