@ -82,7 +82,7 @@ function fedora_repository_collection_view($pid = NULL, $collection = NULL, $pag
$objectHelper = new ObjectHelper();
if ($pid == NULL) {
$pid = variable_get('fedora_repository_pid', 'islandora:top ');
$pid = variable_get('fedora_repository_pid', 'islandora:roo t');
}
$content = '';
@ -909,13 +909,19 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
return '';
}
if (!risearch_available()) {
drupal_set_message(t('The Fedora resource index search is currently unavailable. Please contact the site administrator.'), 'warning', FALSE);
return '';
}
if ($pid == NULL) {
$pid = variable_get('fedora_repository_pid', 'islandora:top');
$pid = variable_get('fedora_repository_pid', 'islandora:roo t');
}
$item = new fedora_item($pid);
if (!$item->exists()) {
drupal_not_found();
exit();
}
if ($pid & !valid_pid($pid)) {
@ -938,7 +944,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
$objectHelper = new ObjectHelper();
if ($pid == NULL) {
$pid = variable_get('fedora_repository_pid', 'islandora:top ');
$pid = variable_get('fedora_repository_pid', 'islandora:roo t');
}
$headers = module_invoke_all('file_download', "/fedora/repository/$pid");
if (in_array(-1, $headers)) {
@ -1056,7 +1062,7 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU
return ' ';
}
if ($pid == NULL) {
$pid = variable_get('fedora_repository_pid', 'islandora:top ');
$pid = variable_get('fedora_repository_pid', 'islandora:roo t');
}
$headers = module_invoke_all('file_download', "/fedora/repository/$pid");
if (in_array(-1, $headers)) {
@ -1452,7 +1458,7 @@ function fedora_repository_demo_objects_form() {
foreach (array(
'islandora:collectionCModel' => 'Islandora default content models',
'islandora:top ' => 'Islandora top-level collection',
'islandora:roo t' => 'Islandora top-level collection',
'islandora:demos' => 'Islandora demos collection',
'islandora:largeimages' => 'Sample large image content model (requires <a href="http://sourceforge.net/projects/djatoka/">Djatoka</a> and <a href="http://www.kakadusoftware.com/index.php?option=com_content&task=view&id=26&Itemid=22">Kakadu</a>.)',
)
@ -1559,7 +1565,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
or $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:ContentModelsCollection>)
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title', 'QUERY', 'Content Model Collection Query', 'text/plain');
$cmodel_collection->add_relationship('isMemberOfCollection', 'islandora:top ');
$cmodel_collection->add_relationship('isMemberOfCollection', 'islandora:roo t');
$cmodel_collection->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_views/simple_list_view.xml', 'COLLECTION_VIEW', 'Collection View', 'text/xml', 'X');
$cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/contentModel.jpg', 'TN', 'Thumbnail', 'image/jpg', 'M');
@ -1569,13 +1575,13 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
}
}
if (!empty($form_state['values']['demo_collections']['islandora:top '])) {
$new_item = Fedora_Item::ingest_new_item('islandora:top ', 'A', 'Islandora Top-level Collection');
if (!empty($form_state['values']['demo_collections']['islandora:roo t'])) {
$new_item = Fedora_Item::ingest_new_item('islandora:roo t', 'A', 'Islandora Top-level Collection');
$new_item->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/COLLECTION-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X');
try {
$tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:top \">islandora:top </a>."), 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:roo t\">islandora:roo t</a>."), 'message');
} catch (exception $e) {
}
@ -1583,7 +1589,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
if (!empty($form_state['values']['demo_collections']['islandora:demos'])) {
$new_item = fedora_item::ingest_new_item('islandora:demos', 'A', 'Islandora Demo Collection');
$new_item->add_relationship('isMemberOfCollection', 'islandora:top ');
$new_item->add_relationship('isMemberOfCollection', 'islandora:roo t');
$new_item->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/COLLECTION-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X');
@ -2147,7 +2153,7 @@ function fedora_repository_batch_reingest_object($object, &$context) {
if (!empty($datastreams) && is_array($datastreams)) {
$label = !empty($object['label']) ? $object['label'] : '';
if (empty($object['foxml_file']) && !defined ($new_item)) {
if (empty($object['foxml_file']) && !isset ($new_item)) {
$new_item = Fedora_Item::ingest_new_item($object['pid'], 'A', $label);
}
if (!empty($object['cmodel'])) {