Browse Source

ISLANDORA-171 Fix object purge redirect.

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
2bff1622ec
  1. 5
      fedora_repository.module
  2. 2
      plugins/fedoraObject.inc

5
fedora_repository.module

@ -433,11 +433,14 @@ function fedora_repository_purge_object_form_submit($form, &$form_state) {
if (!empty($form_state['values']['referrer'])) {
$form_state['redirect'] = $form_state['values']['referrer'];
}
elseif (empty($collectionPid) && $_SESSION['fedora_collection'] != $pid) {
elseif (empty($collectionPid) && !empty($_SESSION['fedora_collection']) && $_SESSION['fedora_collection'] != $pid) {
$collectionPid = $_SESSION['fedora_collection'];
$form_state['redirect'] = "fedora/repository/$collectionPid/";
}
else {
$form_state['redirect'] = 'fedora/repository/';
}
}
}

2
plugins/fedoraObject.inc

@ -15,7 +15,7 @@ class FedoraObject {
$objectHelper = new ObjectHelper();
$tabset = array();
$show_purge_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_purge_object_form');
$purge_form = drupal_get_form('fedora_repository_purge_object_form', $this->pid);
$purge_form = drupal_get_form('fedora_repository_purge_object_form', $this->pid, check_plain(substr(request_uri(), strlen(base_path()))));
$tabset['fedora_object_details'] = array(
'#type' => 'tabpage',

Loading…
Cancel
Save