|
|
|
@ -177,10 +177,11 @@ function drush_islandora_solution_pack_install_content_models() {
|
|
|
|
|
$objects_to_add = array(); |
|
|
|
|
foreach ($info['objects'] as $key => $candidate) { |
|
|
|
|
$object = islandora_object_load($candidate); |
|
|
|
|
if (in_array('fedora-system:ContentModel-3.0', $object->models)) { |
|
|
|
|
if ($object && in_array('fedora-system:ContentModel-3.0', $object->models)) { |
|
|
|
|
$objects_to_add[] = $candidate; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (count($objects_to_add) > 0) { |
|
|
|
|
foreach ($objects_to_add as $object_to_add) { |
|
|
|
|
$old_object = islandora_object_load($object_to_add->id); |
|
|
|
|
if ($old_object) { |
|
|
|
@ -197,4 +198,5 @@ function drush_islandora_solution_pack_install_content_models() {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|