From 06907b7a866f50f8d9930dac2e0bb7d00d7f38e2 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Wed, 9 May 2012 11:39:25 -0300 Subject: [PATCH 1/2] fixes for tickets ISLANDORA-596 and ISLANDORA-597 --- CollectionClass.inc | 3 +++ plugins/tagging_form.inc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CollectionClass.inc b/CollectionClass.inc index 5882a460..fcd59d00 100644 --- a/CollectionClass.inc +++ b/CollectionClass.inc @@ -687,6 +687,9 @@ class CollectionClass { global $base_url; $collection_pid = $pid; //we will be changing the pid later maybe $parsedContent = NULL; + if(!isset($this->collectionObject)){ + $this->collectionObject = new ObjectHelper($pid); + } $contentModels = $this->collectionObject->get_content_models_list($pid); $isCollection = FALSE; //if this is a collection object store the $pid in the session as it will come in handy diff --git a/plugins/tagging_form.inc b/plugins/tagging_form.inc index f00274d4..718459b2 100644 --- a/plugins/tagging_form.inc +++ b/plugins/tagging_form.inc @@ -61,7 +61,7 @@ function fedora_repository_image_tagging_form($form_state, $pid) { $tagset = new TagSet($obj); $tags = array(); foreach ($tagset->tags as $tag) { - $form_tag =& $form['tags-wrapper']['tags'][$tag['name']] = array( + $form_tag = $form['tags-wrapper']['tags'][$tag['name']] = array( '#prefix' => '
  • ', '#suffix' => '
  • ', ); @@ -69,7 +69,7 @@ function fedora_repository_image_tagging_form($form_state, $pid) { $tag_title_text = t('Added by @creator.', array( '@creator' => $tag['creator'], )); - $tag_mnpl_search_path = "fedora/repository/mnpl_advanced_search/tag:{$tag['name']}" + $tag_mnpl_search_path = "fedora/repository/mnpl_advanced_search/tag:{$tag['name']}"; $form_tag['tag'] = array( '#value' => l($tag['name'], $tag_mnpl_search_path, array('attributes' => array( 'title' => $tag_title_text From df42d77c10789bc82cdb87ad117ba70690cc1033 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Thu, 10 May 2012 08:47:50 -0300 Subject: [PATCH 2/2] fix for ISLANDORA 604 and added some defines to FedoraItem.inc --- CollectionClass.inc | 2 +- api/fedora_item.inc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CollectionClass.inc b/CollectionClass.inc index fcd59d00..6992a34c 100644 --- a/CollectionClass.inc +++ b/CollectionClass.inc @@ -105,7 +105,7 @@ class CollectionClass { */ function getRelatedItems($pid, $query_string = NULL, $limit = NULL, $offset = NULL) { module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); - + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid)) { drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied."), 'error'); return ' '; diff --git a/api/fedora_item.inc b/api/fedora_item.inc index fdb4a00d..d287225c 100644 --- a/api/fedora_item.inc +++ b/api/fedora_item.inc @@ -7,6 +7,8 @@ define('RELS_EXT_URI', 'info:fedora/fedora-system:def/relations-external#'); define("FEDORA_MODEL_URI", 'info:fedora/fedora-system:def/model#'); define("ISLANDORA_PAGE_URI", 'info:islandora/islandora-system:def/pageinfo#'); +define("ISLANDORA_RELS_EXT_URI", 'http://islandora.ca/ontology/relsext#'); +define("ISLANDORA_RELS_INT_URI", "http://islandora.ca/ontology/relsint#"); /** * Fedora Item Class