|
|
|
@ -1720,6 +1720,10 @@ function islandora_islandora_basic_collection_get_query_filters() {
|
|
|
|
|
*/ |
|
|
|
|
function islandora_islandora_object_ingested(AbstractObject $object) { |
|
|
|
|
module_load_include('inc', 'islandora', 'includes/derivatives'); |
|
|
|
|
// Defer derivatives if necessary. |
|
|
|
|
if (islandora_get_defer_derivatives_flag($object)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
islandora_run_derivatives($object, NULL); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1731,6 +1735,10 @@ function islandora_islandora_object_ingested(AbstractObject $object) {
|
|
|
|
|
*/ |
|
|
|
|
function islandora_islandora_datastream_ingested(AbstractObject $object, AbstractDatastream $datastream) { |
|
|
|
|
module_load_include('inc', 'islandora', 'includes/derivatives'); |
|
|
|
|
// Defer derivatives if necessary. |
|
|
|
|
if (islandora_get_defer_derivatives_flag($object)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
islandora_run_derivatives($object, $datastream->id); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1952,3 +1960,14 @@ function islandora_menu_local_tasks_alter(&$data, $router_item, $root_path) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Implements hook_islandora_object_alter(). |
|
|
|
|
*/ |
|
|
|
|
function islandora_islandora_object_alter(AbstractObject $object, array &$context) { |
|
|
|
|
// Prevent derivative creation during ingest if var is set. |
|
|
|
|
if ($context['action'] == 'ingest' && variable_get('islandora_defer_derivatives_on_ingest', FALSE)) { |
|
|
|
|
module_load_include('inc', 'islandora', 'includes/derivatives'); |
|
|
|
|
islandora_set_defer_derivatives_flag($object); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|