|
|
@ -769,10 +769,16 @@ function islandora_ingest_form_submit(array $form, array &$form_state) { |
|
|
|
islandora_ingest_form_execute_consecutive_callback_steps($form, $form_state, $step); |
|
|
|
islandora_ingest_form_execute_consecutive_callback_steps($form, $form_state, $step); |
|
|
|
} |
|
|
|
} |
|
|
|
// Ingest the objects. |
|
|
|
// Ingest the objects. |
|
|
|
|
|
|
|
$set_redirect = TRUE; |
|
|
|
foreach ($form_state['islandora']['objects'] as &$object) { |
|
|
|
foreach ($form_state['islandora']['objects'] as &$object) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
islandora_add_object($object); |
|
|
|
islandora_add_object($object); |
|
|
|
|
|
|
|
// We want to redirect to the first object as it's considered to be the |
|
|
|
|
|
|
|
// primary object. |
|
|
|
|
|
|
|
if ($set_redirect) { |
|
|
|
$form_state['redirect'] = "islandora/object/{$object->id}"; |
|
|
|
$form_state['redirect'] = "islandora/object/{$object->id}"; |
|
|
|
|
|
|
|
$set_redirect = FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
drupal_set_message( |
|
|
|
drupal_set_message( |
|
|
|
t('"@label" (ID: @pid) has been ingested.', array('@label' => $object->label, '@pid' => $object->id)), |
|
|
|
t('"@label" (ID: @pid) has been ingested.', array('@label' => $object->label, '@pid' => $object->id)), |
|
|
|
'status'); |
|
|
|
'status'); |
|
|
|