Browse Source

More efficient IFs

pull/813/head
Brandon Weigel 4 years ago
parent
commit
cb1e47e88d
  1. 4
      includes/orphaned_objects.inc

4
includes/orphaned_objects.inc

@ -198,8 +198,7 @@ function islandora_get_orphaned_objects() {
foreach ($results as $result) {
if (array_key_exists($collection_field, $result['solr_doc'])) {
foreach ($result['solr_doc'][$collection_field] as $collection) {
if($result['PID'] != $root_pid) {
if ($collection != $root_pid_check) {
if (($result['PID'] != $root_pid) && ($collection != $root_pid_check) ) {
if (in_array($collection, $missing_parents)) {
$orphaned_objects[] = $result;
}
@ -214,7 +213,6 @@ function islandora_get_orphaned_objects() {
}
}
}
}
if (array_key_exists($member_field, $result['solr_doc'])) {
foreach ($result['solr_doc'][$member_field] as $membership) {
if (in_array($membership, $missing_parents)) {

Loading…
Cancel
Save