Browse Source

Merge pull request #240 from ajstanley/6.x

6.x
pull/241/merge
ajstanley 12 years ago
parent
commit
249df94860
  1. 9
      fedora_repository.module

9
fedora_repository.module

@ -1831,10 +1831,15 @@ function islandora_fedora_settings_form_submit($form, &$form_state) {
drupal_rebuild_theme_registry(); drupal_rebuild_theme_registry();
} }
function islandora_guarantee_root_collection($pid){ function islandora_guarantee_root_collection($pid) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
if(!fedora_available ()){
return;
}
$item = new Fedora_Item($pid); $item = new Fedora_Item($pid);
if($item->exists()){ if ($item->exists()) {
drupal_set_message(t('Fedora is not available'));
return; return;
} }
$item = Fedora_item::ingest_new_item($pid, 'A', 'Islandora Root Collection', 'admin'); $item = Fedora_item::ingest_new_item($pid, 'A', 'Islandora Root Collection', 'admin');

Loading…
Cancel
Save