From 146bd564d79aeb80aa2283e764682633ae563129 Mon Sep 17 00:00:00 2001 From: ajstanley Date: Wed, 26 Jun 2024 16:04:15 -0300 Subject: [PATCH] tidied up --- islandora.module | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/islandora.module b/islandora.module index 58403af5c..153eb1679 100644 --- a/islandora.module +++ b/islandora.module @@ -546,12 +546,9 @@ function islandora_entity_view(array &$build, EntityInterface $entity, EntityVie // Ensure the entity matches the route. if ($entity === $route_match_item) { $flysystem_config = Settings::get('flysystem'); - $fedora_root = NULL; - if (isset($flysystem_config['fedora']['config']['root'])) { - $fedora_root = $flysystem_config['fedora']['config']['root']; - $fedora_root = rtrim($fedora_root, '/'); - } + $fedora_root = $flysystem_config['fedora']['config']['root'] ?? NULL; if ($display->getComponent('field_gemini_uri') && $fedora_root) { + $fedora_root = rtrim($fedora_root, '/'); $mapper = \Drupal::service('islandora.entity_mapper'); if ($entity->getEntityTypeId() == 'media') { // Check if the source file is in Fedora or not.