Browse Source

added check to make sure an object has a cmodel iin basic image

pull/120/merge
Paul Pound 13 years ago
parent
commit
f34afe346f
  1. 8
      islandora_basic_image/islandora_basic_image.module

8
islandora_basic_image/islandora_basic_image.module

@ -195,8 +195,14 @@ function islandora_basic_image_islandora_view_object($object, $user, $page_numbe
function islandora_basic_image_islandora_ingest_post_ingest($object) { function islandora_basic_image_islandora_ingest_post_ingest($object) {
$cmodel_list = islandora_basic_image_islandora_get_types(); $cmodel_list = islandora_basic_image_islandora_get_types();
if(!isset($cmodel_list)){
return ;
}
$models = $object->models; $models = $object->models;
foreach ($object->models as $model) { if(!isset($models)){
return ;
}
foreach ($models as $model) {
if (isset($cmodel_list[$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); islandora_basic_image_create_all_derivatives($object);

Loading…
Cancel
Save