From fe451fc7d09fde232aa066e802a80f56755252ea Mon Sep 17 00:00:00 2001 From: Alan Stanley Date: Wed, 14 Dec 2011 10:39:21 -0400 Subject: [PATCH] added array check --- fedora_repository.module | 3 ++- plugins/slide_viewer.inc | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fedora_repository.module b/fedora_repository.module index 05631b91..00201ec9 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -505,7 +505,7 @@ function fedora_repository_purge_object_form_validate($form, &$form_state) { foreach ($contentModels as $contentModel) { if ($contentModel->pid == 'islandora:collectionCModel') { $member_pids = get_related_items_as_array($pid, 'isMemberOfCollection'); - if (is_array($member_pids)){ + if (is_array($member_pids) && ! empty($member_pids)){ form_set_error('new_collection_pid', t("Please purge all members of this collection before deleting the collection itself.")); return; } @@ -757,6 +757,7 @@ function fedora_repository_edit_qdc_form(&$form_state, $pid, $dsId = NULL) { module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); $soapHelper = new ConnectionHelper(); $client = $soapHelper->getSoapClient(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl')); + // Check if there is a custom edit metadata function defined in the content model. $breadcrumbs = array(); diff --git a/plugins/slide_viewer.inc b/plugins/slide_viewer.inc index 45ff3f9d..f3bdd6b9 100644 --- a/plugins/slide_viewer.inc +++ b/plugins/slide_viewer.inc @@ -1,7 +1,5 @@