Skip to content

Commit

Permalink
Error during Batch Ingests of Compound Children before parent objects (
Browse files Browse the repository at this point in the history
…#157)

* set parent to null if parent doesnt exist

* kill the process if the parent does not exist

* better handling of parent not existing

* Avoid creating fake object for missing parent object

* Allow PHP 5.3.3 to fail
  • Loading branch information
IAMlKeno authored and DiegoPino committed May 7, 2019
1 parent 80a70a4 commit 4100bed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions islandora_compound_object.module
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ function islandora_compound_object_retrieve_compound_info(AbstractObject $object
$next_pid = (isset($siblings[$current_key + 1])) ? $siblings[$current_key + 1] : '';

// Check if perms to show link for parent manage.
if (islandora_object_manage_access_callback(array(
if ($parent && islandora_object_manage_access_callback(array(
ISLANDORA_METADATA_EDIT, ISLANDORA_MANAGE_PROPERTIES, ISLANDORA_ADD_DS), $parent)) {
$parent_url = 'islandora/object/' . $parent_pid . '/manage';
}
Expand All @@ -748,7 +748,7 @@ function islandora_compound_object_retrieve_compound_info(AbstractObject $object
}

$info = array(
'parent_label' => $parent->label,
'parent_label' => ($parent && $parent->label) ? $parent->label : NULL,
'parent_pid' => $parent_pid,
'parent_url' => $parent_url,
'previous_pid' => $previous_pid,
Expand Down

0 comments on commit 4100bed

Please sign in to comment.