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
  2. 2
      islandora.module

5
includes/utilities.inc

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

2
islandora.module

@ -515,7 +515,7 @@ function islandora_object_load($object_id) {
function islandora_datastream_load($datastream_id, $object_id) {
$object = islandora_object_load($object_id);
if(!$object) {
if (!$object) {
return NULL;
}

Loading…
Cancel
Save