Browse Source

Function names and delete path

pull/697/head
Brandon Weigel 7 years ago
parent
commit
bc2918c863
  1. 8
      includes/orphaned_objects.inc
  2. 4
      islandora.module

8
includes/orphaned_objects.inc

@ -6,7 +6,7 @@
*/ */
/** /**
* Builds the management form for the Orphaned Objects module. * Builds the Orphaned Islandora Objects management form.
* *
* @param array $form * @param array $form
* An array representing a form within Drupal. * An array representing a form within Drupal.
@ -37,7 +37,7 @@ function islandora_orphaned_objects_manage_form($form, $form_state) {
); );
} }
else { else {
$orphaned_objects = islandora_orphaned_objects_get_orphaned_objects(); $orphaned_objects = islandora_get_orphaned_objects();
$rows = array(); $rows = array();
foreach ($orphaned_objects as $orphaned_object) { foreach ($orphaned_objects as $orphaned_object) {
$pid = $orphaned_object['object']['value']; $pid = $orphaned_object['object']['value'];
@ -124,7 +124,7 @@ function islandora_orphaned_objects_manage_confirm_submit($form, &$form_state) {
* @return array * @return array
* An array containing the results of the orphaned objects queries. * An array containing the results of the orphaned objects queries.
*/ */
function islandora_orphaned_objects_get_orphaned_objects() { function islandora_get_orphaned_objects() {
$connection = islandora_get_tuque_connection(); $connection = islandora_get_tuque_connection();
// SPARQL: get orphaned objects, exclude any with a living parent. // SPARQL: get orphaned objects, exclude any with a living parent.
$object_query = <<<EOQ $object_query = <<<EOQ
@ -196,7 +196,7 @@ function islandora_orphaned_objects_delete_create_batch($pids) {
'progress_message' => t('Time elapsed: @elapsed <br/>Estimated time remaining @estimate.'), 'progress_message' => t('Time elapsed: @elapsed <br/>Estimated time remaining @estimate.'),
'error_message' => t('An error has occurred.'), 'error_message' => t('An error has occurred.'),
'finished' => 'islandora_orphaned_objects_delete_batch_finished', 'finished' => 'islandora_orphaned_objects_delete_batch_finished',
'file' => drupal_get_path('module', 'islandora_orphaned_objects') . '/includes/batch.inc', 'file' => drupal_get_path('module', 'islandora') . '/includes/orphaned_objects.inc',
); );
return $batch; return $batch;
} }

4
islandora.module

@ -402,7 +402,7 @@ function islandora_menu() {
'description' => 'List of orphaned Islandora objects.', 'description' => 'List of orphaned Islandora objects.',
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('islandora_orphaned_objects_manage_form'), 'page arguments' => array('islandora_orphaned_objects_manage_form'),
'access arguments' => array('manage orphaned objects'), 'access arguments' => array('ISLANDORA_MANAGE_ORPHANED_OBJECTS'),
'file' => 'includes/orphaned_objects.inc', 'file' => 'includes/orphaned_objects.inc',
); );
$items['admin/islandora/restore/manage'] = array( $items['admin/islandora/restore/manage'] = array(
@ -631,7 +631,7 @@ function islandora_permission() {
'title' => t('Replace datastreams'), 'title' => t('Replace datastreams'),
'description' => t('Add new datastream content as latest version.'), 'description' => t('Add new datastream content as latest version.'),
), ),
'manage orphaned objects' => array( 'ISLANDORA_MANAGE_ORPHANED_OBJECTS' => array(
'title' => t('Manage orphaned Islandora objects'), 'title' => t('Manage orphaned Islandora objects'),
'description' => t('View a list of orphaned Islandora objects.'), 'description' => t('View a list of orphaned Islandora objects.'),
), ),

Loading…
Cancel
Save