From 2bb19dbac844a8d1bfeaee7767c56afb542001fb Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Thu, 22 Aug 2013 17:46:42 +0000 Subject: [PATCH] Set global to prevent query logging when outputting datastreams. --- includes/datastream.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/datastream.inc b/includes/datastream.inc index da55dcd5..585fa2f5 100644 --- a/includes/datastream.inc +++ b/includes/datastream.inc @@ -30,6 +30,13 @@ function islandora_download_datastream(AbstractDatastream $datastream) { * The version of the datastream to display */ function islandora_view_datastream(AbstractDatastream $datastream, $download = FALSE, $version = NULL) { + // XXX: Certain features of the Devel module rely on the use of "shutdown + // handlers", such as query logging... The problem is that they might blindly + // add additional output which will break things if what is actually being + // output is anything but a webpage... like an image or video or audio or + // whatever the datastream is here. + $GLOBALS['devel_shutdown'] = FALSE; + if ($version !== NULL) { if (isset($datastream[$version])) { $datastream = $datastream[$version];