Browse Source

Added Fedora availability check to the beginning of every repository item page load.

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
3b4e147b31
  1. 4
      fedora_repository.module
  2. 4
      plugins/pidfield/pidfield.module

4
fedora_repository.module

@ -757,6 +757,10 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
global $user;
if (!fedora_available()) {
return t('The Fedora repository server is currently unavailable. Please contact the site administrator.');
}
if ($pid &!validPid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error');
return ' ';

4
plugins/pidfield/pidfield.module

@ -277,11 +277,7 @@ function theme_pidfield_formatter_default($element) {
$pid = $element['#item']['safe'];
if(!empty($pid)) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new Fedora_Item($pid);
return fedora_repository_get_items($pid);
}
return null;
}

Loading…
Cancel
Save