Browse Source

ISLANDORA-249 getBreadcrumbs didn't properly deal with the case of top level objects.

pull/105/head
jonathangreen 14 years ago
parent
commit
ac0b34cb39
  1. 7
      ObjectHelper.inc

7
ObjectHelper.inc

@ -850,6 +850,10 @@ class ObjectHelper {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
// Before executing the query, we hve a base case of accessing the top-level collection
global $base_url;
if ($pid == variable_get('fedora_repository_pid', 'islandora:top')){
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
$breadcrumbs[] = l(t('Home'), $base_url);
} else {
$query_string = 'select $parentObject $title $content from <#ri>
where (<info:fedora/' . $pid . '> <dc:title> $title
and $parentObject <fedora-model:hasModel> $content
@ -874,13 +878,12 @@ class ObjectHelper {
if ($parent == variable_get('fedora_repository_pid', 'islandora:top')) {
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
$breadcrumbs[] = l(t('Home'), $base_url);
} elseif ($level > 0) {
$this->getBreadcrumbs($parent, $breadcrumbs, $level - 1);
}
}
}
}
public static function warnIfMisconfigured($app) {
$messMap = array(

Loading…
Cancel
Save