Browse Source

formatting, made query more efficient

pull/307/head
Alan Stanley 12 years ago
parent
commit
b58fd31f9c
  1. 11
      includes/utilities.inc

11
includes/utilities.inc

@ -724,18 +724,15 @@ function islandora_get_content_models($ignore_system_namespace = TRUE) {
FROM <#ri>
WHERE {
{?object fm:hasModel <info:fedora/fedora-system:ContentModel-3.0>;
fm:state <info:fedora/fedora-system:def/model#Active>
OPTIONAL{
?object fm:label ?label
fm:state fm:Active
}
UNION{
?object fr:isMemberOfCollection <info:fedora/islandora:ContentModelsCollection>;
fm:state fm:Active
}
UNION
{?object fr:isMemberOfCollection <info:fedora/islandora:ContentModelsCollection>;
fm:state <info:fedora/fedora-system:def/model#Active>
OPTIONAL{
?object fm:label ?label
}
}
}";
$content_models = array();
$results = $tuque->repository->ri->sparqlQuery($query, 'unlimited');

Loading…
Cancel
Save