diff --git a/includes/utilities.inc b/includes/utilities.inc index cdbf8daa..4d69155d 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -389,7 +389,7 @@ function islandora_get_datastreams_requirements_from_models(array $models) { * - "optional": A boolean indicating if the given stream is optional. */ function islandora_get_datastreams_requirements_from_content_model(AbstractObject $object) { - if (empty($object[DS_COMP_STREAM])) { + if (empty($object[DS_COMP_STREAM]) || !islandora_datastream_access(FEDORA_VIEW_OBJECTS, $object[DS_COMP_STREAM])) { return array(); } $xml = new SimpleXMLElement($object[DS_COMP_STREAM]->content); diff --git a/theme/theme.inc b/theme/theme.inc index e9db9f3e..ce6f2659 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -203,7 +203,7 @@ function islandora_preprocess_islandora_objects(array &$variables) { theme('image', array('path' => url("$url/datastream/TN/view"), 'attributes' => array())) : ''; $description = NULL; - if (islandora_datastream_access($o['DC'])) { + if (isset($o['DC']) && islandora_datastream_access(FEDORA_VIEW_OBJECTS, $o['DC'])) { $dc = DublinCore::importFromXMLString($o['DC']->content); if ($dc) { $dc = $dc->asArray();