|
|
@ -37,7 +37,7 @@ define('ISLANDORA_VIEW_DATASTREAM_HISTORY', 'view old datastream versions'); |
|
|
|
define('ISLANDORA_MANAGE_DELETED_OBJECTS', 'manage deleted objects'); |
|
|
|
define('ISLANDORA_MANAGE_DELETED_OBJECTS', 'manage deleted objects'); |
|
|
|
define('ISLANDORA_REVERT_DATASTREAM', 'revert to old datastream'); |
|
|
|
define('ISLANDORA_REVERT_DATASTREAM', 'revert to old datastream'); |
|
|
|
define('ISLANDORA_REGENERATE_DERIVATIVES', 'regenerate derivatives for an object'); |
|
|
|
define('ISLANDORA_REGENERATE_DERIVATIVES', 'regenerate derivatives for an object'); |
|
|
|
|
|
|
|
define('ISLANDORA_REPLACE_DATASTREAM_CONTENT', 'replace a datastream with new content, preserving version history'); |
|
|
|
|
|
|
|
|
|
|
|
// Hooks. |
|
|
|
// Hooks. |
|
|
|
define('ISLANDORA_VIEW_HOOK', 'islandora_view_object'); |
|
|
|
define('ISLANDORA_VIEW_HOOK', 'islandora_view_object'); |
|
|
@ -317,6 +317,16 @@ function islandora_menu() { |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_DATASTREAM_HISTORY, 4), |
|
|
|
'access arguments' => array(ISLANDORA_VIEW_DATASTREAM_HISTORY, 4), |
|
|
|
'load arguments' => array(2), |
|
|
|
'load arguments' => array(2), |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/replace'] = array( |
|
|
|
|
|
|
|
'title' => 'Replace Datastream', |
|
|
|
|
|
|
|
'page arguments' => array('islandora_datastream_version_replace_form', 4), |
|
|
|
|
|
|
|
'page callback' => 'drupal_get_form', |
|
|
|
|
|
|
|
'file' => 'includes/datastream.version.inc', |
|
|
|
|
|
|
|
'type' => MENU_CALLBACK, |
|
|
|
|
|
|
|
'access callback' => 'islandora_datastream_access', |
|
|
|
|
|
|
|
'access arguments' => array(ISLANDORA_REPLACE_DATASTREAM_CONTENT, 4), |
|
|
|
|
|
|
|
'load arguments' => array(2), |
|
|
|
|
|
|
|
); |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/delete'] = array( |
|
|
|
$items['islandora/object/%islandora_object/datastream/%islandora_datastream/version/%/delete'] = array( |
|
|
|
'title' => 'Delete datastream version', |
|
|
|
'title' => 'Delete datastream version', |
|
|
|
'page arguments' => array('islandora_delete_datastream_version_form', 4, 6), |
|
|
|
'page arguments' => array('islandora_delete_datastream_version_form', 4, 6), |
|
|
@ -516,6 +526,10 @@ function islandora_theme() { |
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
'variables' => array('datastream' => NULL), |
|
|
|
'variables' => array('datastream' => NULL), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
'islandora_datastream_replace_link' => array( |
|
|
|
|
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
|
|
|
|
'variables' => array('datastream' => NULL), |
|
|
|
|
|
|
|
), |
|
|
|
'islandora_dublin_core_display' => array( |
|
|
|
'islandora_dublin_core_display' => array( |
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
'file' => 'theme/theme.inc', |
|
|
|
'template' => 'theme/islandora-dublin-core-display', |
|
|
|
'template' => 'theme/islandora-dublin-core-display', |
|
|
@ -594,6 +608,10 @@ function islandora_permission() { |
|
|
|
'title' => t('Regenerate derivatives'), |
|
|
|
'title' => t('Regenerate derivatives'), |
|
|
|
'description' => t('Regenerate derivatives for an object or per datastream.'), |
|
|
|
'description' => t('Regenerate derivatives for an object or per datastream.'), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
ISLANDORA_REPLACE_DATASTREAM_CONTENT => array( |
|
|
|
|
|
|
|
'title' => t('Replace datastreams'), |
|
|
|
|
|
|
|
'description' => t('Add new datastream content as latest version.'), |
|
|
|
|
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -699,6 +717,7 @@ function islandora_forms($form_id) { |
|
|
|
* otherwise. |
|
|
|
* otherwise. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function islandora_user_access($object_or_datastream, array $permissions, $content_models = array(), $access_any = TRUE, $user = NULL) { |
|
|
|
function islandora_user_access($object_or_datastream, array $permissions, $content_models = array(), $access_any = TRUE, $user = NULL) { |
|
|
|
|
|
|
|
|
|
|
|
module_load_include('inc', 'islandora', 'includes/utilities'); |
|
|
|
module_load_include('inc', 'islandora', 'includes/utilities'); |
|
|
|
$is_repository_accessible = &drupal_static(__FUNCTION__); |
|
|
|
$is_repository_accessible = &drupal_static(__FUNCTION__); |
|
|
|
|
|
|
|
|
|
|
|