From 3243431caee00726cd87e054ac5c64a8543a6b8c Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Mon, 16 Oct 2017 15:06:42 -0300 Subject: [PATCH] Handle redirects in a proper way. --- includes/datastream.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/datastream.inc b/includes/datastream.inc index 96ead571..a93b4c60 100644 --- a/includes/datastream.inc +++ b/includes/datastream.inc @@ -65,6 +65,11 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F } header("Content-Disposition: attachment; filename=\"$filename\""); } + else { + if ($datastream->controlGroup == 'R') { + drupal_goto($datastream->url); + } + } $cache_check = islandora_view_datastream_cache_check($datastream); if ($cache_check !== 200) {