Browse Source

Make our datastream_access call work and revert change to themeing of version links.

pull/443/head
Jordan Dukart 11 years ago
parent
commit
12620a4bf6
  1. 2
      islandora.module
  2. 14
      theme/theme.inc

2
islandora.module

@ -1839,7 +1839,7 @@ function islandora_islandora_datastream_access($op, AbstractDatastream $datastre
$hooks = islandora_invoke_hook_list(ISLANDORA_DERVIATIVE_CREATION_HOOK, $object->models, array($object));
foreach ($hooks as $hook) {
if ($hook['destination_dsid'] == $datastream->id && ((isset($hook['source_dsid']) && isset($object[$hook['source_dsid']]) && islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $object[$hook['source_dsid']], $user)) || (array_key_exists('source_dsid', $hook) && $hook['source_dsid'] == NULL))) {
return TRUE;
return user_access(ISLANDORA_REGENERATE_DERIVATIVES);
}
}
return FALSE;

14
theme/theme.inc

@ -53,12 +53,14 @@ function islandora_preprocess_islandora_default_edit(array &$variables) {
'class' => 'datastream-size',
'data' => islandora_datastream_get_human_readable_size($ds),
);
$row[] = array(
'class' => 'datastream-versions',
'data' => theme('islandora_datastream_version_link', array(
'datastream' => $ds,
)),
);
if (islandora_datastream_access(ISLANDORA_VIEW_DATASTREAM_HISTORY, $ds)) {
$row[] = array(
'class' => 'datastream-versions',
'data' => theme('islandora_datastream_version_link', array(
'datastream' => $ds,
)),
);
}
$row[] = array(
'class' => 'datastream-download',
'data' => theme('islandora_datastream_download_link', array(

Loading…
Cancel
Save