@ -261,10 +260,9 @@ function fedora_repository_purge_object_form(&$form_state, $pid, $referrer) {
$collectionPid = $_SESSION['fedora_collection'];
}
//$form['#redirect'] = $referrer;
return $form;
}
else {
} else {
// ALSO do $form definition here. Your final submit handler (after user clicks Yes, I Confirm) will only see $form_state info defined here. Form you create here passed as param1 to confirm_form
return confirm_form($form, 'Confirm Purge Object', $referrer, 'Are you sure you want to delete this object? This action cannot be undone.', 'Delete', 'Cancel'); //Had better luck leaving off last param 'name'
@ -409,8 +407,7 @@ function fedora_repository_purge_object_form_submit($form, &$form_state) {
if (!isset($form_state['storage']['confirm'])) {
$form_state['storage']['confirm'] = TRUE; // this will cause the form to be rebuilt, entering the confirm part of the form
$form_state['rebuild'] = TRUE; // along with this
}
else {
} else {
// this is where you do your processing after they have pressed the confirm button
$params = array(
"pid" => $pid,
@ -435,8 +432,7 @@ function fedora_repository_purge_object_form_submit($form, &$form_state) {
if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied!"), 'error');
//drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied"), 'error');
if (user_access('access administration pages')) {
drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning');
if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied!"), 'error');
//drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied"), 'error');
drupal_access_denied();
if (user_access('access administration pages')) {
drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'error');
}
return ' ';
}
if ($pid == NULL) {
@ -858,15 +865,13 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU
@ -1280,7 +1284,7 @@ function fedora_repository_demo_objects_form() {
}
} else {
$form['install_demos']['smileynote'] = array(
'#value' => '<p>If you install the '.l('fedora demo objects', 'https://wiki.duraspace.org/display/FCR30/Demonstration+Objects').' Islandora can display them as a collection.</p>'
'#value' => '<p>If you install the '.l('fedora demo objects', 'https://wiki.duraspace.org/display/FCR30/Demonstration+Objects').' Islandora can display them as a collection.</p>'
);
}
@ -1295,11 +1299,11 @@ function fedora_repository_demo_objects_form() {
'#prefix' => '<p>Demo collections already installed in this repository:</p><ul>',
'#suffix' => '</ul>',
);
if (!empty($existing_demos)) {
foreach ($existing_demos as $pid => $demo_object) {