|
|
|
@ -198,19 +198,17 @@ 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 (in_array($collection, $missing_parents)) { |
|
|
|
|
if (($result['PID'] != $root_pid) && ($collection != $root_pid_check) ) { |
|
|
|
|
if (in_array($collection, $missing_parents)) { |
|
|
|
|
$orphaned_objects[] = $result; |
|
|
|
|
} |
|
|
|
|
elseif (!in_array($collection, $already_checked)) { |
|
|
|
|
$test = islandora_identify_missing_parents($collection); |
|
|
|
|
if (!$test) { |
|
|
|
|
$orphaned_objects[] = $result; |
|
|
|
|
$missing_parents[] = $collection; |
|
|
|
|
} |
|
|
|
|
elseif (!in_array($collection, $already_checked)) { |
|
|
|
|
$test = islandora_identify_missing_parents($collection); |
|
|
|
|
if (!$test) { |
|
|
|
|
$orphaned_objects[] = $result; |
|
|
|
|
$missing_parents[] = $collection; |
|
|
|
|
} |
|
|
|
|
$already_checked[] = $collection; |
|
|
|
|
} |
|
|
|
|
$already_checked[] = $collection; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|