Browse Source

Downloaded labels now have the proper labels, redirect the user on ingest to the last ingested object.

pull/203/head
Nigel Banks 12 years ago
parent
commit
0db865a8af
  1. 2
      includes/datastream.inc
  2. 1
      includes/ingest.form.inc

2
includes/datastream.inc

@ -35,7 +35,7 @@ function islandora_view_datastream(FedoraDatastream $datastream, $download = FAL
header('Content-length: ' . $datastream->size); header('Content-length: ' . $datastream->size);
} }
if ($download) { if ($download) {
header("Content-Disposition: attachment; filename=\"" . $datastream->label); header("Content-Disposition: attachment; filename=\"{$datastream->label}\"");
} }
drupal_page_is_cacheable(FALSE); drupal_page_is_cacheable(FALSE);
// Try not to load the file into PHP memory! // Try not to load the file into PHP memory!

1
includes/ingest.form.inc

@ -240,6 +240,7 @@ function islandora_ingest_form_submit(array $form, array &$form_state) {
foreach ($form_state['islandora']['objects'] as $object) { foreach ($form_state['islandora']['objects'] as $object) {
try { try {
islandora_add_object($object); islandora_add_object($object);
$form_state['redirect'] = "islandora/object/{$object->id}";
} catch (Exception $e) { } catch (Exception $e) {
watchdog('islandora', $e->getMessage(), NULL, WATCHDOG_ERROR); // If post hooks throws it may already exist at this point but may be invalid, so don't say failed :P watchdog('islandora', $e->getMessage(), NULL, WATCHDOG_ERROR); // If post hooks throws it may already exist at this point but may be invalid, so don't say failed :P
drupal_set_message(t('A problems occured while ingesting "@label" (ID: @pid), please notifiy the administrator.', array('@label' => $object->label, '@pid' => $object->id)), 'error'); drupal_set_message(t('A problems occured while ingesting "@label" (ID: @pid), please notifiy the administrator.', array('@label' => $object->label, '@pid' => $object->id)), 'error');

Loading…
Cancel
Save