Browse Source

Merge remote-tracking branch 'upstream/7.x' into 7.x

pull/117/head
krisbulman 13 years ago
parent
commit
3d85d46ddf
  1. 13
      islandora.module

13
islandora.module

@ -596,7 +596,20 @@ function islandora_permission() {
*/ */
function islandora_preprocess_islandora_default(&$variables) { function islandora_preprocess_islandora_default(&$variables) {
$islandora_object = $variables['islandora_object']; $islandora_object = $variables['islandora_object'];
$repository = $islandora_object->repository;
module_load_include('inc', 'islandora', 'includes/islandora_dublin_core'); module_load_include('inc', 'islandora', 'includes/islandora_dublin_core');
$variables['parent_collections'] = array();
$collections = $islandora_object->relationships->get(FEDORA_RELS_EXT_URI, 'isMemberOfCollection');
foreach($collections as $collection) {
$pid = $collection['object']['value'];
$object = $repository->getObject($collection['object']['value']);
$variables['parent_collections'][$pid] = array();
$variables['parent_collections'][$pid]['object'] = $object;
$variables['parent_collections'][$pid]['label'] = $object->label;
$variables['parent_collections'][$pid]['url'] = url('islandora/object/' . $object->id);
}
try { try {
$dc = $islandora_object['DC']->content; $dc = $islandora_object['DC']->content;
//$dc_xml = simplexml_load_string($dc); //$dc_xml = simplexml_load_string($dc);

Loading…
Cancel
Save