From fa9f1b60dcfce8dd3b4a5073934368f95f326238 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Thu, 31 May 2012 15:55:03 -0300 Subject: [PATCH] all files created as part of creating derivative should now be deleted and renamed image process inc --- .../includes/{image_process.inc => image.process.inc} | 1 + islandora_basic_image/islandora_basic_image.module | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename islandora_basic_image/includes/{image_process.inc => image.process.inc} (98%) diff --git a/islandora_basic_image/includes/image_process.inc b/islandora_basic_image/includes/image.process.inc similarity index 98% rename from islandora_basic_image/includes/image_process.inc rename to islandora_basic_image/includes/image.process.inc index bcf729df..b589660c 100644 --- a/islandora_basic_image/includes/image_process.inc +++ b/islandora_basic_image/includes/image.process.inc @@ -19,6 +19,7 @@ function islandora_basic_image_create_all_derivatives($object){ if (islandora_basic_image_create_derivative($medium_file, 500, 700)) { islandora_basic_image_add_datastream($object, 'MEDIUM_SIZE', $medium_file); } + file_delete($original_file); } diff --git a/islandora_basic_image/islandora_basic_image.module b/islandora_basic_image/islandora_basic_image.module index 47eaeea2..5599ce33 100644 --- a/islandora_basic_image/islandora_basic_image.module +++ b/islandora_basic_image/islandora_basic_image.module @@ -210,7 +210,7 @@ function islandora_basic_image_islandora_ingest_post_ingest($object) { } foreach ($models as $model) { if (isset($cmodel_list[$model])) { - module_load_include('inc', 'islandora_basic_image', 'includes/image_process'); + module_load_include('inc', 'islandora_basic_image', 'includes/image.process'); islandora_basic_image_create_all_derivatives($object); } }