Browse Source

Change existence check to use islandora_object_load().

pull/642/head
Adam Vessey 9 years ago
parent
commit
4e1dc671c6
  1. 6
      includes/solution_packs.inc

6
includes/solution_packs.inc

@ -477,10 +477,8 @@ function islandora_uninstall_solution_pack($module, $force = FALSE) {
$connection = islandora_get_tuque_connection(); $connection = islandora_get_tuque_connection();
$required_objects = islandora_solution_packs_get_required_objects($module); $required_objects = islandora_solution_packs_get_required_objects($module);
$objects = $required_objects['objects']; $objects = $required_objects['objects'];
$filter = function($o) use($connection) { $filter = function ($o) {
$param = "pid={$o->id}"; return islandora_object_load($o->id);
$query = $connection->api->a->findObjects('query', $param);
return !empty($query['results']);
}; };
$existing_objects = array_filter($objects, $filter); $existing_objects = array_filter($objects, $filter);

Loading…
Cancel
Save