Browse Source

allowances made for missing content models

pull/653/head
ajstanley 9 years ago
parent
commit
448709c932
  1. 6
      islandora.module

6
islandora.module

@ -2175,7 +2175,7 @@ function islandora_islandora_get_breadcrumb_query_predicates(AbstractObject $obj
* Implements hook_islandora_overview_object(). * Implements hook_islandora_overview_object().
*/ */
function islandora_islandora_overview_object(AbstractObject $object) { function islandora_islandora_overview_object(AbstractObject $object) {
if (is_object($object)) {
$cmodels = $object->models; $cmodels = $object->models;
$rows = array(); $rows = array();
foreach ($cmodels as $cmodel) { foreach ($cmodels as $cmodel) {
@ -2184,6 +2184,9 @@ function islandora_islandora_overview_object(AbstractObject $object) {
if (is_object($o)) { if (is_object($o)) {
$rows[] = array(l($o->label, "islandora/object/{$o->id}")); $rows[] = array(l($o->label, "islandora/object/{$o->id}"));
} }
else {
$rows[] = array(t("@cmodel - (This content model is not in this Islandora repository.)", array('@cmodel' => $cmodel)));
}
} }
} }
$header = count($rows) > 1 ? t('Content Models') : t('Content Model'); $header = count($rows) > 1 ? t('Content Models') : t('Content Model');
@ -2193,4 +2196,3 @@ function islandora_islandora_overview_object(AbstractObject $object) {
'empty' => t('No Islandora content model associated with this object.'))); 'empty' => t('No Islandora content model associated with this object.')));
return array('cmodels' => $table); return array('cmodels' => $table);
} }
}

Loading…
Cancel
Save