Browse Source

Created a move to trash option

asdf

removed breadcrumbs for a test

setback to default

playing with the menu

playing with the menu

playing with the menu

playing with the menu

playing with the menu

cleanup

Removed ALL limits on collections

remove testing line
pull/75/head
Ben Woodhead 13 years ago
parent
commit
67007c80de
  1. 3
      CollectionClass.inc
  2. 28
      api/fedora_item.inc
  3. 1
      fedora_repository.module
  4. 2
      formClass.inc

3
CollectionClass.inc

@ -67,9 +67,6 @@ class CollectionClass {
function getRelatedItems($pid, $itqlquery = NULL, $limit = NULL, $offset = NULL) { function getRelatedItems($pid, $itqlquery = NULL, $limit = NULL, $offset = NULL) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!isset($limit)) {
$limit = 10000;
}
if (!isset($offset)) { if (!isset($offset)) {
$offset = 0; $offset = 0;
} }

28
api/fedora_item.inc

@ -636,6 +636,28 @@ class Fedora_Item {
return FALSE; return FALSE;
} }
/**
* Set the object to a deleted state
*/
function move_to_trash($log_message = 'Flagged deleted using Islandora API.')
{
// Loop through the datastreams and mark them deleted
foreach($this->get_datastreams_list_as_array() as $dsid)
{
$this->set_datastream_state($dsid, 'D');
}
// Create a message to mark the object deleted
$params = array(
'pid' => $this->pid,
'state' => 'D',
'logMessage' => $logMessage
);
// Send message to mark the object deleted
return self::soap_call('modifyObject', $params, $quiet);
}
/** /**
* Removes this object form the repository. * Removes this object form the repository.
* @param type $log_message * @param type $log_message
@ -643,12 +665,18 @@ class Fedora_Item {
* @return type * @return type
*/ */
function purge($log_message = 'Purged using Islandora API.', $force = FALSE) { function purge($log_message = 'Purged using Islandora API.', $force = FALSE) {
// Flag the object to be deleted first
$this->move_to_trash($log_message);
// Create the delete message
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
'logMessage' => $log_message, 'logMessage' => $log_message,
'force' => $force 'force' => $force
); );
// Delete the object
return $this->soap_call('purgeObject', $params); return $this->soap_call('purgeObject', $params);
} }

1
fedora_repository.module

@ -1011,6 +1011,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
); );
} }
} }
// Add a 'manage object' tab for all objects, where detailed list of content is shown. // Add a 'manage object' tab for all objects, where detailed list of content is shown.
$obj = new FedoraObjectDetailedContent($pid); $obj = new FedoraObjectDetailedContent($pid);
$object_details = $obj->showFieldSets(); $object_details = $obj->showFieldSets();

2
formClass.inc

@ -581,6 +581,8 @@ class formClass {
if (!$this->canShowIngestForm($collection_pid)) { if (!$this->canShowIngestForm($collection_pid)) {
return FALSE; return FALSE;
} }
drupal_set_title($collection_label);
if (module_exists('islandora_content_model_forms')) { if (module_exists('islandora_content_model_forms')) {
module_load_include('inc', 'islandora_content_model_forms', 'IngestObjectMetadataForm'); module_load_include('inc', 'islandora_content_model_forms', 'IngestObjectMetadataForm');
try { try {

Loading…
Cancel
Save