From 4d9c4cd00615b511ba70eb71d882f352d291e454 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Wed, 16 Nov 2011 15:08:50 -0400 Subject: [PATCH 1/6] Forgot to remove a debug statement before I committed. Woops. This fixes it all up. --- SecurityClass.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/SecurityClass.inc b/SecurityClass.inc index 1f3df0eb..67bc9c43 100644 --- a/SecurityClass.inc +++ b/SecurityClass.inc @@ -91,7 +91,6 @@ class SecurityClass { $usersAndRoles['users'] = $allowedUsers; $usersAndRoles['roles'] = $allowedRoles; - dd($usersAndRoles); return $usersAndRoles; } From 288125ea855d428b98541592f8e1e6717a566ef3 Mon Sep 17 00:00:00 2001 From: Ben Woodhead Date: Thu, 17 Nov 2011 14:45:46 -0400 Subject: [PATCH 2/6] Set the version to 11.3.beta1 --- fedora_repository.info | 2 +- plugins/fedora_imageapi.info | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fedora_repository.info b/fedora_repository.info index 99cb3d6f..45564e20 100644 --- a/fedora_repository.info +++ b/fedora_repository.info @@ -5,5 +5,5 @@ dependencies[] = tabs dependencies[] = islandora_content_model_forms description = Shows a list of items in a fedora collection. package = Islandora -version = 11.2.0 +version = 11.3beta1 core = 6.x diff --git a/plugins/fedora_imageapi.info b/plugins/fedora_imageapi.info index af50a614..ea14fb07 100644 --- a/plugins/fedora_imageapi.info +++ b/plugins/fedora_imageapi.info @@ -3,5 +3,5 @@ description = Adds image manipulation support through a REST interface package = Islandora Dependencies dependencies[] = fedora_repository dependencies[] = imageapi -version = 11.2.0 +version = 11.3beta1 core = 6.x From 9ca282d521e9c81af31e0dcced75c96b8f5ea4f0 Mon Sep 17 00:00:00 2001 From: Alan Stanley Date: Tue, 22 Nov 2011 12:01:49 -0400 Subject: [PATCH 3/6] Added validity check for Collection Policy class --- CollectionClass.inc | 9 +++++---- fedora_repository.module | 13 +++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CollectionClass.inc b/CollectionClass.inc index 2af37522..bee0c495 100644 --- a/CollectionClass.inc +++ b/CollectionClass.inc @@ -519,14 +519,16 @@ class CollectionClass { $show_batch_tab = FALSE; $policy = CollectionPolicy::loadFromCollection($this->pid, TRUE); - $content_models = $policy->getContentModels(); + if ($policy) { + $content_models = $policy->getContentModels(); + } if (count($content_models) == 1 && $content_models[0]->pid == "islandora:collectionCModel") { $show_batch_tab = FALSE; } if (!$show_ingest_tab) { $view_selected = TRUE; } - if(!$collection_items){ + if (!$collection_items) { $view_selected = FALSE; $add_selected = TRUE; } @@ -538,7 +540,6 @@ class CollectionClass { '#title' => 'View', '#selected' => $view_selected, '#content' => $collection_items, - ); $tabset['add_tab'] = array( '#type' => 'tabpage', @@ -614,7 +615,7 @@ class CollectionClass { $collectionName = $collection; - + if (!$pageNumber) { $pageNumber = 1; } diff --git a/fedora_repository.module b/fedora_repository.module index 27060dda..600e3bcb 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -142,6 +142,10 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label */ function fedora_repository_ingest_form_submit(array $form, array &$form_state) { //only validate the form if the submit button was pressed (other buttons may be used for AHAH + if ($form_state['ahah_submission']) { + $form_state['submitted'] = false; + return; + } if ($form_state['storage']['xml']) { if (module_exists('islandora_content_model_forms')) { module_load_include('inc', 'islandora_content_model_forms', 'IngestObjectMetadataForm'); @@ -197,7 +201,11 @@ function fedora_repository_ingest_form_submit(array $form, array &$form_state) { */ function fedora_repository_ingest_form_validate($form, &$form_state) { //only validate the form if the submit button was pressed (other buttons may be used for AHAH - if ($form_state['clicked_button']['#id'] == 'edit-submit') { + if ($form_state['ahah_submission']) { + $form_state['submitted'] = false; + return; + } + if ($form_state['clicked_button']['#id'] == 'edit-submit' && $form_state['ahah_submission'] != 1) { switch ($form_state['storage']['step']) { case 1: $form_state['storage']['step']++; @@ -828,9 +836,6 @@ function fedora_repository_perm() { OBJECTHELPER::$INGEST_FEDORA_OBJECTS, OBJECTHELPER::$EDIT_TAGS_DATASTREAM, OBJECTHELPER::$VIEW_DETAILED_CONTENT_LIST, - OBJECTHELPER::$MANAGE_COLLECTIONS, - OBJECTHELPER::$DELETE_ENTIRE_COLLECTIONS, - OBJECTHELPER::$CREATE_BATCH_PROCESS, ); } From 33bc8c922e1527633692b0b223c7a7e4afbd19ab Mon Sep 17 00:00:00 2001 From: Alan Stanley Date: Thu, 24 Nov 2011 13:54:44 -0400 Subject: [PATCH 4/6] Added additional functionality to CollectionPolicy::getNextPid --- CollectionPolicy.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CollectionPolicy.inc b/CollectionPolicy.inc index be9e7a92..5a3daf21 100644 --- a/CollectionPolicy.inc +++ b/CollectionPolicy.inc @@ -360,13 +360,14 @@ class CollectionPolicy extends XMLDatastream { * @param string $dsid * @return string $nextPid */ - public function getNextPid($dsid) { + public function getNextPid($dsid, $content_model = null) { $ret = FALSE; + if (self::valid_dsid($dsid) && $this->validate()) { $content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model'); $namespace = FALSE; for ($i = 0; $namespace === FALSE && $i < $content_models->length; $i++) { - if (strtolower($content_models->item($i)->getAttribute('dsid')) == strtolower($dsid)) { + if (strtolower($content_models->item($i)->getAttribute('dsid')) == strtolower($dsid) && (strtolower($content_models->item($i)->getAttribute('pid') == $content_model) || $content_model == null)) { $namespace = $content_models->item($i)->getAttribute('namespace'); } } From 59db4b5097e5994c3f4b7b633bf1983843a6a643 Mon Sep 17 00:00:00 2001 From: Ben Woodhead Date: Tue, 29 Nov 2011 09:51:46 -0400 Subject: [PATCH 5/6] New version and removed id tags --- fedora_repository.info | 3 +-- plugins/fedora_imageapi.info | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fedora_repository.info b/fedora_repository.info index 45564e20..944568fe 100644 --- a/fedora_repository.info +++ b/fedora_repository.info @@ -1,9 +1,8 @@ -; $Id$ name = Islandora Repository dependencies[] = imageapi dependencies[] = tabs dependencies[] = islandora_content_model_forms description = Shows a list of items in a fedora collection. package = Islandora -version = 11.3beta1 +version = 11.3beta2 core = 6.x diff --git a/plugins/fedora_imageapi.info b/plugins/fedora_imageapi.info index ea14fb07..d17d73a8 100644 --- a/plugins/fedora_imageapi.info +++ b/plugins/fedora_imageapi.info @@ -3,5 +3,5 @@ description = Adds image manipulation support through a REST interface package = Islandora Dependencies dependencies[] = fedora_repository dependencies[] = imageapi -version = 11.3beta1 +version = 11.3beta2 core = 6.x From dd23ba456e76752b9bcd8064e65351fc4378b2a0 Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Thu, 8 Dec 2011 15:31:31 -0400 Subject: [PATCH 6/6] Fixed issue ISLANDORA-164. --- ObjectHelper.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ObjectHelper.inc b/ObjectHelper.inc index 9e9995b7..843a3f2d 100644 --- a/ObjectHelper.inc +++ b/ObjectHelper.inc @@ -339,11 +339,12 @@ class ObjectHelper { $versions = $item->get_datastream_history($id); if (is_array($versions)) { $downloadVersion = '
'; + $downloadVersion .= ''; $downloadVersion .= '
'; + $downloadVersion .= ''; } }