Browse Source

ISLANDORA-171 Move access check to inside of 'display datastreams' function

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
0edd813f9a
  1. 6
      ObjectHelper.inc
  2. 9
      plugins/map_viewer.inc

6
ObjectHelper.inc

@ -378,6 +378,7 @@ class ObjectHelper {
}
function getFormattedDatastreamList($object_pid, $contentModels, &$fedoraItem) {
if (user_access(ObjectHelper :: $VIEW_DETAILED_CONTENT_LIST)) {
$availableDataStreamsText = 'Detailed List of Content';
//$metaDataText='Description';
$mainStreamLabel = NULL;
@ -429,6 +430,8 @@ class ObjectHelper {
$dataStreamBody = '<div class = "fedora_detailed_list">' . $dataStreamBody . '</div>';
return $dataStreamBody;
}
return '';
}
/**
* Gets a list of datastreams from an object using its pid
@ -454,9 +457,8 @@ class ObjectHelper {
$dataStreamBody = '';
$fedoraItem = new Fedora_Item($object_pid);
if (user_access(ObjectHelper :: $VIEW_DETAILED_CONTENT_LIST)) {
$dataStreamBody = $this->getFormattedDatastreamList($object_pid, $contentModels, $fedoraItem);
}
$content = '';
if (empty($contentModels)) {

9
plugins/map_viewer.inc

@ -38,18 +38,17 @@ class ShowMapStreamsInFieldSets {
$tabset['my_tabset']['second_tab'] = array(
'#type' => 'tabpage',
'#title' => t('Full-size'),
'#content' => $html//'<div class="iiv"></div>'
'#content' => $html,
);
$objectHelper = new ObjectHelper();
$item = new Fedora_Item($this->pid);
$tabset['my_tabset']['third_tab'] = array(
'#type' => 'tabpage',
'#title' => t('Description'),
'#content' => $item->get_dissemination('islandora:mods2htmlSdef', 'mods2html'),
'#content' => $item->get_dissemination('islandora:mods2htmlSdef', 'mods2html')
. $objectHelper->getFormattedDatastreamList($this->pid, NULL, $item),
);
// Render the tabset.
return tabs_render($tabset);
return theme('fieldset', $collection_fieldset);
}
}

Loading…
Cancel
Save