From 9e3d08615f61a176a59fc0c249e655632955b472 Mon Sep 17 00:00:00 2001 From: William Panting Date: Wed, 18 Sep 2013 12:33:25 -0300 Subject: [PATCH 1/2] undelete docs --- islandora.api.php | 9 +++++++++ islandora.module | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/islandora.api.php b/islandora.api.php index 18e5643b..0dff8d89 100644 --- a/islandora.api.php +++ b/islandora.api.php @@ -394,8 +394,17 @@ function hook_islandora_viewer_info() { /** * Returns a list of datastreams that are determined to be undeletable. + * + * The list is used to prevent delete links from being shown. + * + * @param array $models + * An array of content models for the current object. + * + * @return array + * An array of DSIDs that shouldn't be deleted. */ function hook_islandora_undeletable_datastreams(array $models) { + return array('DC', 'MODS'); } /** diff --git a/islandora.module b/islandora.module index 45458665..7fb3b477 100644 --- a/islandora.module +++ b/islandora.module @@ -1237,7 +1237,7 @@ function islandora_islandora_required_objects(IslandoraTuque $connection) { } /** - * Implements islandora_undeleteable_datastreams(). + * Implements hook_islandora_undeleteable_datastreams(). */ function islandora_islandora_undeletable_datastreams(array $models) { return array('DC'); From a4dd199aa153f50e70328f92ba138a44ea911e15 Mon Sep 17 00:00:00 2001 From: William Panting Date: Wed, 18 Sep 2013 12:49:30 -0300 Subject: [PATCH 2/2] preventing RELS-EXT deletion --- islandora.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/islandora.module b/islandora.module index 7fb3b477..ebf7f916 100644 --- a/islandora.module +++ b/islandora.module @@ -1240,7 +1240,7 @@ function islandora_islandora_required_objects(IslandoraTuque $connection) { * Implements hook_islandora_undeleteable_datastreams(). */ function islandora_islandora_undeletable_datastreams(array $models) { - return array('DC'); + return array('DC', 'RELS-EXT'); } /**