Skip to content

Commit

Permalink
check added
Browse files Browse the repository at this point in the history
  • Loading branch information
ajstanley committed Jun 26, 2024
1 parent 9a8a7b6 commit 33e5e73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions islandora.module
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,11 @@ 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 = $flysystem_config['fedora']['config']['root'];
$fedora_root = rtrim($fedora_root, '/');
$fedora_root = NULL;
if (isset($flysystem_config['fedora']['config']['root'])) {
$fedora_root = $flysystem_config['fedora']['config']['root'];
$fedora_root = rtrim($fedora_root, '/');
}
if ($display->getComponent('field_gemini_uri') && $fedora_root) {
$mapper = \Drupal::service('islandora.entity_mapper');
if ($entity->getEntityTypeId() == 'media') {
Expand Down

0 comments on commit 33e5e73

Please sign in to comment.