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

Loading…
Cancel
Save