Browse Source

Merge pull request #194 from DannyJoris/7.x

fix error message
pull/193/merge
Jonathan Green 13 years ago
parent
commit
56819fd0df
  1. 9
      islandora.module

9
islandora.module

@ -328,7 +328,7 @@ function islandora_islandora_edit_object($fedora_object) {
} }
} }
$output = theme('islandora_default_edit', array('islandora_object' => $fedora_object)); $output = theme('islandora_default_edit', array('islandora_object' => $fedora_object));
return array('Default Edit output' => $output); return array('Default edit output' => $output);
} }
function islandora_view_default_object() { function islandora_view_default_object() {
@ -352,8 +352,9 @@ function islandora_view_object($fedora_object = NULL) {
return drupal_not_found(); return drupal_not_found();
} }
// set breadcrumbs
drupal_set_breadcrumb(islandora_get_breadcrumbs($fedora_object)); drupal_set_breadcrumb(islandora_get_breadcrumbs($fedora_object));
// optional pager parameters
$page_number = (empty($_GET['page'])) ? '1' : $_GET['page']; $page_number = (empty($_GET['page'])) ? '1' : $_GET['page'];
$page_size = (empty($_GET['pagesize'])) ? '10' : $_GET['pagesize']; $page_size = (empty($_GET['pagesize'])) ? '10' : $_GET['pagesize'];
@ -361,7 +362,7 @@ function islandora_view_object($fedora_object = NULL) {
$arr = module_invoke_all('islandora_view_object', $fedora_object, $user, $page_number, $page_size); //allow submodules to decide how to handle content base on object type $arr = module_invoke_all('islandora_view_object', $fedora_object, $user, $page_number, $page_size); //allow submodules to decide how to handle content base on object type
if (empty($arr)) { if (empty($arr)) {
//TODO: make sure we iterate over the array as they will be more then one cmodel per object //TODO: make sure we iterate over the array as they will be more then one cmodel per object
drupal_set_message(t('there was an error loading the view for islandora object %s', array('%s' => $object_id)), 'error'); drupal_set_message(t('there was an error loading the view for Islandora object "%s"', array('%s' => $fedora_object->label)), 'error');
return ""; return "";
} }
arsort($arr); arsort($arr);
@ -389,7 +390,7 @@ function islandora_islandora_view_object($object) {
} }
} }
$output = theme('islandora_default', array('islandora_object' => $object)); $output = theme('islandora_default', array('islandora_object' => $object));
return array('Default Output' => $output); return array('Default output' => $output);
} }
/** /**

Loading…
Cancel
Save