Browse Source

Merge branch 'master' into ISLANDORA-171

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
6931caab97
  1. 9
      fedora_repository.module
  2. 1
      tests/fedora_repository.test

9
fedora_repository.module

@ -234,7 +234,7 @@ function fedora_repository_ingest_form(&$form_state, $collection_pid, $collectio
return $ingestForm->createIngestForm($collection_pid, $collection_label, $form_state);
}
function fedora_repository_purge_object_form(&$form_state, $pid, $referrer) {
function fedora_repository_purge_object_form(&$form_state, $pid, $referrer = NULL) {
global $base_url;
// $form['#redirect'] = "fedora/repository/$collectionPid/";
$form['pid'] = array(
@ -430,13 +430,12 @@ function fedora_repository_purge_object_form_submit($form, &$form_state) {
}
return;
}
if (empty($collectionPid) && $_SESSION['fedora_collection'] != $pid) {
$collectionPid = $_SESSION['fedora_collection'];
}
if (!empty($form_state['values']['referrer'])) {
$form_state['redirect'] = $form_state['values']['referrer'];
}
else {
elseif (empty($collectionPid) && $_SESSION['fedora_collection'] != $pid) {
$collectionPid = $_SESSION['fedora_collection'];
$form_state['redirect'] = "fedora/repository/$collectionPid/";
}
}

1
tests/fedora_repository.test

@ -103,6 +103,7 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase {
$this->pass("This is the PID list to purge: ". implode(", ", $pid_list) );
foreach ($pid_list as $pid) {
$this->drupalPost("fedora/repository/purgeObject/$pid", array(), 'Purge');
$this->drupalPost(NULL, array(), 'Delete');
}
}

Loading…
Cancel
Save