Browse Source

updated to islandora_invoke_hook_list

pull/386/head
Alan Stanley 11 years ago
parent
commit
2b912d36cb
  1. 7
      includes/manage_deleted_objects.inc

7
includes/manage_deleted_objects.inc

@ -162,7 +162,7 @@ function islandora_deleted_objects_manage_form($form, $form_state, $serialized_c
'#value' => t('Restore selected objects'),
'#attributes' => array('source' => 'restore'),
);
if (user_access(FEDORA_PURGE)) {
if (user_access(ISLANDORA_PURGE)) {
$form['purge'] = array(
'#type' => 'submit',
'#value' => t('Irrevocably purge selected objects'),
@ -200,15 +200,12 @@ function islandora_deleted_objects_manage_form_submit($form, $form_state) {
if ($form_state['values']['propogate']) {
foreach ($objects_to_process as $pid) {
$fedora_object = islandora_object_load($pid);
$hooks = islandora_build_hook_list(ISLANDORA_UPDATE_RELATED_OBJECTS_PROPERTIES_HOOK, $fedora_object->models);
foreach ($hooks as $hook) {
$temp = module_invoke_all($hook, $fedora_object);
$temp = islandora_invoke_hook_list(ISLANDORA_UPDATE_RELATED_OBJECTS_PROPERTIES_HOOK, $fedora_object->models, array($fedora_object));
if (!empty($temp)) {
$pids_to_restore = array_merge_recursive($pids_to_restore, $temp);
}
}
}
}
$batch = array(
'title' => t('@descriptor selected objects', array('@descriptor' => $descriptor)),
'file' => drupal_get_path('module', 'islandora') . '/includes/manage_deleted_objects.inc',

Loading…
Cancel
Save