Browse Source

Merge pull request #60 from discoverygnoye/6.x

6.x
pull/61/head
Ben Woodhead 13 years ago
parent
commit
3332072c58
  1. 12
      ObjectHelper.inc

12
ObjectHelper.inc

@ -935,7 +935,7 @@ class ObjectHelper {
or <info:fedora/' . $pid . '> <fedora-rels-ext:isPartOf> $parentObject) or <info:fedora/' . $pid . '> <fedora-rels-ext:isPartOf> $parentObject)
and $parentObject <fedora-model:state> <info:fedora/fedora-system:def/model#Active>) and $parentObject <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
minus $content <mulgara:is> <info:fedora/fedora-system:FedoraObject-3.0> minus $content <mulgara:is> <info:fedora/fedora-system:FedoraObject-3.0>
order by $title'; order by $title desc';
$query_string = htmlentities(urlencode($query_string)); $query_string = htmlentities(urlencode($query_string));
$url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch');
@ -944,9 +944,13 @@ class ObjectHelper {
$result = preg_split('/[\r\n]+/', do_curl($url)); $result = preg_split('/[\r\n]+/', do_curl($url));
array_shift($result); // throw away first line array_shift($result); // throw away first line
$matches = str_getcsv(join("\n", $result)); $matches = str_getcsv(join("\n", $result));
if ($matches !== FALSE) { if (count($matches) >= 2) {
$parent = preg_replace('/^info:fedora\//', '', $matches[0]); $parent = preg_replace('/^info:fedora\//', '', $matches[0]);
if (0 == strlen($matches[1])) {
$matches[1] = "Unlabeled Object";
}
$breadcrumbs[] = l($matches[1], 'fedora/repository/' . $pid); $breadcrumbs[] = l($matches[1], 'fedora/repository/' . $pid);
if ($parent == variable_get('fedora_repository_pid', 'islandora:root')) { if ($parent == variable_get('fedora_repository_pid', 'islandora:root')) {
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository'); $breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
@ -956,6 +960,10 @@ class ObjectHelper {
$this->getBreadcrumbs($parent, $breadcrumbs, $level - 1); $this->getBreadcrumbs($parent, $breadcrumbs, $level - 1);
} }
} }
else {
$breadcrumbs[] = l("Path Calculation Error", 'fedora/repository/' . $pid);
}
} }
} }

Loading…
Cancel
Save