diff --git a/admin/islandora.admin.inc b/admin/islandora.admin.inc index e22fa433..d82b8ef7 100644 --- a/admin/islandora.admin.inc +++ b/admin/islandora.admin.inc @@ -24,12 +24,33 @@ function islandora_repository_admin($form, &$form_state) { $url = variable_get('islandora_base_url', 'http://localhost:8080/fedora'); } - // Connect to Fedora - $info = islandora_describe_repository($url); + module_load_include('inc', 'islandora', 'includes/tuque'); + $connection = new IslandoraTuque(NULL, $url); + try { + $info = $connection->api->a->describeRepository(); + } + catch (RepositoryException $e) { + $info = FALSE; + } + + if($info) { + try { + $dc = $connection->api->m->getDatastream('fedora-system:ContentModel-3.0', 'DC'); + } + catch (RepositoryException $e) { + $dc = FALSE; + } + } if($info) { - $confirmation_message = '' - . t('Successfully connected to Fedora Server (Version !version).', array('!version' => $info['repositoryVersion'])); + if($dc) { + $confirmation_message = '' + . t('Successfully connected to Fedora Server (Version !version).', array('!version' => $info['repositoryVersion'])); + } + else { + $confirmation_message = '' + . t('Unable to authenticate when connecting to to Fedora Server (Version !version). Please configure the !filter.', array('!version' => $info['repositoryVersion'], '!filter' => 'Drupal Filter')); + } } else { $confirmation_message = ' ' diff --git a/includes/datastream.inc b/includes/datastream.inc index 4c9060e4..6a2e8724 100644 --- a/includes/datastream.inc +++ b/includes/datastream.inc @@ -33,9 +33,16 @@ function islandora_view_datastream($object, $dsid, $method = 'view') { function islandora_datastream_get_parents($islandora_object) { $parent_collections = array(); - $repository = $islandora_object->repository; - $collections1 = $islandora_object->relationships->get(FEDORA_RELS_EXT_URI, 'isMemberOfCollection'); - $collections2 = $islandora_object->relationships->get(FEDORA_RELS_EXT_URI, 'isMemberOf'); + + try { + $repository = $islandora_object->repository; + $collections1 = $islandora_object->relationships->get(FEDORA_RELS_EXT_URI, 'isMemberOfCollection'); + $collections2 = $islandora_object->relationships->get(FEDORA_RELS_EXT_URI, 'isMemberOf'); + } + catch (RepositoryException $e) { + $collections1 = array(); + $collections2 = array(); + } $collections = array_merge($collections1, $collections2); foreach($collections as $collection) { diff --git a/islandora_basic_collection/islandora_basic_collection.module b/islandora_basic_collection/islandora_basic_collection.module index 2a2eb7f8..001e17cd 100644 --- a/islandora_basic_collection/islandora_basic_collection.module +++ b/islandora_basic_collection/islandora_basic_collection.module @@ -284,9 +284,7 @@ function islandora_basic_collection_islandora_ingest_get_information($models, $o $return['relationship'] = $policy->getRelationship(); return $return; - } catch (Exception $e) { - drupal_set_message(t('Islandora Error getting collection info for %s', array('%s' => $object->id)), 'error'); - } + } catch (Exception $e) {} } } diff --git a/islandora_basic_collection/theme/islandora-basic-collection.tpl.php b/islandora_basic_collection/theme/islandora-basic-collection.tpl.php index 33ad0462..7f7ac994 100644 --- a/islandora_basic_collection/theme/islandora-basic-collection.tpl.php +++ b/islandora_basic_collection/theme/islandora-basic-collection.tpl.php @@ -31,10 +31,10 @@