Browse Source

Prevent hooks from being called multiple times.

pull/203/head
Nigel Banks 12 years ago
parent
commit
dd01783050
  1. 5
      includes/utilities.inc

5
includes/utilities.inc

@ -126,8 +126,9 @@ function islandora_describe_repository($url = NULL) {
function islandora_build_hook_list($hook, $pids = array()) { function islandora_build_hook_list($hook, $pids = array()) {
$hooks = array(); $hooks = array();
foreach ($pids as $model) { $pids = array_unique($pids);
$hooks[] = islandora_escape_pid_for_function($model) . '_' . $hook; foreach ($pids as $pid) {
$hooks[] = islandora_escape_pid_for_function($pid) . '_' . $hook;
} }
$hooks[] = $hook; $hooks[] = $hook;

Loading…
Cancel
Save