Browse Source

Add a couple more access checks.

pull/352/head
Adam Vessey 12 years ago
parent
commit
bc8492a787
  1. 2
      includes/utilities.inc
  2. 2
      theme/theme.inc

2
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);

2
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();

Loading…
Cancel
Save