diff --git a/BatchIngest.inc b/BatchIngest.inc index f3d63cc0..31daa608 100644 --- a/BatchIngest.inc +++ b/BatchIngest.inc @@ -9,8 +9,8 @@ * @param array $content_models */ function batch_creation_form(&$form_state, $collection_pid, $content_models) { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); - module_load_include('inc', 'islandora_repository', 'CollectionPolicy'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); $cm_options = array(); $name_mappings = array(); foreach ($content_models as $content_model) { @@ -95,8 +95,8 @@ function batch_creation_form_validate($form, &$form_state) { } function batch_creation_form_submit($form, &$form_state) { - module_load_include('inc', 'islandora_repository', 'ContentModel'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); global $user; $namespace_mappings = array(); $content_model = $form_state['values']['content_model']; @@ -150,7 +150,7 @@ function batch_creation_form_submit($form, &$form_state) { $batch = array( 'title' => 'Ingesting Objects', 'operations' => array(), - 'file' => drupal_get_path('module', 'islandora_repository') . '/BatchIngest.inc', + 'file' => drupal_get_path('module', 'fedora_repository') . '/BatchIngest.inc', ); @@ -176,8 +176,8 @@ function batch_creation_form_submit($form, &$form_state) { function create_batch_objects($label, $content_model, $object_files, $collection_pid, $namespace, $metadata) { - module_load_include('inc', 'islandora_repository', 'ContentModel'); - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); $cm = ContentModel::loadFromModel($content_model, 'ISLANDORACM'); $allowedMimeTypes = $cm->getMimetypes(); $mime_helper = new MimeClass(); @@ -227,9 +227,9 @@ function create_batch_objects($label, $content_model, $object_files, $collection function batch_create_dc_from_mods($mods_xml) { - $path = drupal_get_path('module', 'islandora_repository'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + $path = drupal_get_path('module', 'fedora_repository'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); if ($xmlstr == NULL || strlen($xmlstr) < 5) { return " "; diff --git a/CollectionClass.inc b/CollectionClass.inc index df438aca..4251eea4 100644 --- a/CollectionClass.inc +++ b/CollectionClass.inc @@ -29,7 +29,7 @@ class CollectionClass { */ function __construct($pid = NULL) { if (!empty($pid)) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $this->collectionObject = new ObjectHelper($pid); $this->pid = $pid; } @@ -45,7 +45,7 @@ class CollectionClass { * @return type */ function getRelatedObjects($pid, $limit, $offset, $itqlquery=NULL) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $objectHelper = new ObjectHelper(); if (!isset($itqlquery)) { // $query_string = $objectHelper->getStream($pid, 'QUERY', 0); @@ -65,8 +65,8 @@ class CollectionClass { * @return type */ function getRelatedItems($pid, $itqlquery = NULL, $limit = NULL, $offset = NULL) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (!isset($limit)) { $limit = 1000; } @@ -74,7 +74,7 @@ class CollectionClass { $offset = 0; } global $user; - if (!islandora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied."), 'error'); return ' '; } @@ -101,7 +101,7 @@ class CollectionClass { $query_string = htmlentities(urlencode($query_string)); $content = ''; - $url = variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'); + $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url .= "?type=tuples&flush=TRUE&format=Sparql&limit=$limit&offset=$offset&lang=itql&stream=on&query=" . $query_string; $content .= do_curl($url); @@ -156,7 +156,7 @@ class CollectionClass { * @return type */ function getStream($pid, $dsid, $showError = 1) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $item = new fedora_item($pid); return isset($item->datastreams[$dsid]) ? $item->get_datastream_dissemination($dsid) : NULL; } @@ -223,7 +223,7 @@ class CollectionClass { module_load_include('inc', 'Fedora_Repository', 'ConnectionHelper'); $pidNameSpace = $this->getPidNameSpace($pid, $dsid); $pname = substr($pidNameSpace, 0, strpos($pidNameSpace, ":")); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); return Fedora_Item::get_next_pid_in_namespace($pname); } @@ -339,7 +339,7 @@ class CollectionClass { } } // module_load_include( $phpFile, 'Fedora_Repository', ' '); - require_once(drupal_get_path('module', 'islandora_repository') . '/' . $phpFile); + require_once(drupal_get_path('module', 'fedora_repository') . '/' . $phpFile); $thisClass = new $phpClass (); $returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext); if (!$returnValue) { @@ -409,7 +409,7 @@ class CollectionClass { $ingest_form = $xml->ingest_form; //should only be one $drupal_module = strip_tags($ingest_form->form_builder_method->module->asXML()); if (empty($drupal_module)) { - $drupal_module = 'islandora_repository'; + $drupal_module = 'fedora_repository'; } $phpFile = strip_tags($ingest_form->form_builder_method->file->asXML()); $phpClass = strip_tags($ingest_form->form_builder_method->class_name->asXML()); @@ -437,11 +437,11 @@ class CollectionClass { 'name' => variable_get('fedora_admin_user', 'fedoraAdmin') ); $admin_user = user_load($username); - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); $connectionHelper = new ConnectionHelper(); try { $soapClient = $connectionHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); - $pidNameSpace = variable_get('islandora_repository_pid', 'vre:'); + $pidNameSpace = variable_get('fedora_repository_pid', 'vre:'); $pidNameSpace = substr($pidNameSpace, 0, strpos($pidNameSpace, ":")); $params = array( 'numPIDs' => '', @@ -460,7 +460,7 @@ class CollectionClass { $personal_collection_pid = array( 'fedora_personal_pid' => $pid ); - module_load_include('inc', 'islandora_repository', 'plugins/PersonalCollectionClass'); + module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass'); $personalCollectionClass = new PersonalCollectionClass(); if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) { drupal_set_message("Did not create a personal collection object for !u", array('!u' => $user->name)); @@ -480,7 +480,7 @@ class CollectionClass { * @return type */ function getXslContent($pid, $path, $canUseDefault = TRUE) { - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); $collectionClass = new CollectionClass(); $xslContent = $collectionClass->getCollectionViewStream($pid); if (!$xslContent && $canUseDefault) { //no xslt so we will use the default sent with the module @@ -497,9 +497,9 @@ class CollectionClass { * @return string */ function showFieldSets($page_number) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'CollectionManagement'); - module_load_include('inc', 'islandora_repository', 'BatchIngest'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'CollectionManagement'); + module_load_include('inc', 'fedora_repository', 'BatchIngest'); global $base_url; $tabset = array(); global $user; @@ -514,7 +514,7 @@ class CollectionClass { $collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number); $collection_item = new Fedora_Item($this->pid); // Check the form post to see if we are in the middle of an ingest operation. - $show_ingest_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'islandora_repository_ingest_form'); + $show_ingest_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_ingest_form'); $add_to_collection = $this->getIngestInterface(); $show_batch_tab = TRUE; @@ -586,7 +586,7 @@ class CollectionClass { $allow = fedora_fesl_check_roles($this->pid, 'write'); } if ($allow) { - $ingestObject = drupal_get_form('islandora_repository_ingest_form', $this->pid); + $ingestObject = drupal_get_form('fedora_repository_ingest_form', $this->pid); } } } @@ -608,7 +608,7 @@ class CollectionClass { * @return type */ function renderCollection($content, $pid, $dsId, $collection, $pageNumber = NULL) { - $path = drupal_get_path('module', 'islandora_repository'); + $path = drupal_get_path('module', 'fedora_repository'); global $base_url; $collection_pid = $pid; //we will be changing the pid later maybe $objectHelper = new ObjectHelper(); @@ -628,7 +628,7 @@ class CollectionClass { } if (!isset($collectionName)) { - $collectionName = variable_get('islandora_repository_name', 'Collection'); + $collectionName = variable_get('fedora_repository_name', 'Collection'); } $xslContent = $this->getXslContent($pid, $path); diff --git a/CollectionManagement.inc b/CollectionManagement.inc index bb89a9fd..83bb9952 100644 --- a/CollectionManagement.inc +++ b/CollectionManagement.inc @@ -8,7 +8,7 @@ * @return array */ function collection_management_form(&$form_state, $this_collection_pid, $content_models) { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $restricted = FALSE; if (variable_get('fedora_namespace_restriction_enforced', true)) { $restricted = true; @@ -20,8 +20,8 @@ function collection_management_form(&$form_state, $this_collection_pid, $content } } } - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); - module_load_include('inc', 'islandora_repository', 'CollectionPolicy'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); $item = new Fedora_Item($this_collection_pid); $collection_name = $item->objectProfile->objLabel; $new_content_models = get_content_models_as_option_array(); @@ -224,8 +224,8 @@ function collection_management_form(&$form_state, $this_collection_pid, $content */ function collection_management_form_validate($form, &$form_state) { if ($form_state['clicked_button']['#id'] == 'create_class') { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $pid = $form_state['values']['new_collection_pid']; $item = new fedora_item($pid); if ($item->exists()) { @@ -252,14 +252,14 @@ function collection_management_form_validate($form, &$form_state) { * @param type $form_state */ function collection_management_form_submit($form, &$form_state) { - module_load_include('inc', 'islandora_repository', 'api/fedora_collection'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/dublin_core'); + module_load_include('inc', 'fedora_repository', 'api/fedora_collection'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/dublin_core'); global $user; $collection_pid = $form_state['values']['parent_collection']; $policy = CollectionPolicy::loadFromCollection($collection_pid, TRUE); if ($form_state['clicked_button']['#id'] == 'create_class') { - $module_path = drupal_get_path('module', 'islandora_repository'); + $module_path = drupal_get_path('module', 'fedora_repository'); $thumbnail = drupal_get_path('module', 'Fedora_Repository') . '/images/Crystal_Clear_filesystem_folder_grey.png'; $new_collection_pid = $form_state['values']['new_collection_pid']; $new_collection_label = $form_state['values']['collection_name']; @@ -345,7 +345,7 @@ function collection_management_form_submit($form, &$form_state) { $query = htmlentities(urlencode($query)); $content = ''; - $url = variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'); + $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url .= "?type=tuples&flush=TRUE&format=csv&limit=$limit&offset=$offset&lang=itql&stream=on&query=" . $query; $content .= do_curl($url); $results = explode("\n", $content); @@ -370,7 +370,7 @@ function collection_management_form_submit($form, &$form_state) { $batch = array( 'title' => "Deleting Objects from $name", 'operations' => array(), - 'file' => drupal_get_path('module', 'islandora_repository') . '/CollectionManagement.inc', + 'file' => drupal_get_path('module', 'fedora_repository') . '/CollectionManagement.inc', ); @@ -389,7 +389,7 @@ function collection_management_form_submit($form, &$form_state) { * @param $pid */ function delete_objects_as_batch($pid) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $name = $user->name; $item_to_delete = new Fedora_Item($pid); $models = $item_to_delete->get_models(); diff --git a/CollectionPolicy.inc b/CollectionPolicy.inc index 0612a733..b801eaff 100644 --- a/CollectionPolicy.inc +++ b/CollectionPolicy.inc @@ -4,7 +4,7 @@ * @file * Collection Policy Class */ -module_load_include('inc', 'islandora_repository', 'XMLDatastream'); +module_load_include('inc', 'fedora_repository', 'XMLDatastream'); /** * Collection Policy class ?? @@ -36,7 +36,7 @@ class CollectionPolicy extends XMLDatastream { */ static function loadFromCollection($pid, $preFetch=TRUE) { $ret = FALSE; - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); try { if (self::valid_pid($pid)) { @@ -80,7 +80,7 @@ class CollectionPolicy extends XMLDatastream { $rootEl = $cp->xml->getElementsByTagName('collection_policy')->item(0); $rootEl->setAttribute('name', $name); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $fedoraItem = new Fedora_Item($pid); $fedoraItem->add_datastream_from_string($cp->dumpXml(), $cpDsid, $name, 'text/xml', 'X'); $ret = $cp; @@ -110,7 +110,7 @@ class CollectionPolicy extends XMLDatastream { $cp = new CollectionPolicy($newDom, $pid, $cpDsid); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $fedoraItem = new Fedora_Item($pid); $fedoraItem->add_datastream_from_string($cp->dumpXml(), $cpDsid, $name, 'text/xml', 'X'); $ret = $cp; @@ -137,7 +137,7 @@ class CollectionPolicy extends XMLDatastream { public static function ingestBlankPolicy($pid, $name, $policyDsid, $model_pid, $model_namespace, $relationship, $searchField, $searchValue) { $ret = FALSE; if (($cp = self::loadFromCollection($pid)) === FALSE) { //removed second, non-existant variable - module_load_include('inc', 'islandora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); if (($cm = ContentModel::loadFromModel($model_pid)) !== FALSE && $cm->validate()) { $newDom = new DOMDocument('1.0', 'utf-8'); $newDom->formatOutput = TRUE; @@ -171,7 +171,7 @@ class CollectionPolicy extends XMLDatastream { $cp = new CollectionPolicy($newDom, $pid, $policyDsid); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $fedoraItem = new Fedora_Item($pid); @@ -299,7 +299,7 @@ class CollectionPolicy extends XMLDatastream { $this->staging_area = trim($stagingEl->item(0)->nodeValue); } elseif ($recurse) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $item = new Fedora_Item($this->pid); $rels = $item->get_relationships(); if (count($rels) > 0) { @@ -373,7 +373,7 @@ class CollectionPolicy extends XMLDatastream { $pname = substr($namespace, 0, strpos($namespace, ":")); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $ret = Fedora_Item::get_next_pid_in_namespace($pname); } return $ret; @@ -443,7 +443,7 @@ class CollectionPolicy extends XMLDatastream { if ($recurse && count($ret) == 0) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $item = new Fedora_Item($this->pid); $rels = $item->get_relationships(); if (count($rels) > 0) { diff --git a/ContentModel.inc b/ContentModel.inc index 66bd9569..b1f28074 100644 --- a/ContentModel.inc +++ b/ContentModel.inc @@ -8,7 +8,7 @@ * @file * Content Model Class */ -module_load_include('inc', 'islandora_repository', 'XMLDatastream'); +module_load_include('inc', 'fedora_repository', 'XMLDatastream'); /** * Conent Model ?? @@ -41,7 +41,7 @@ class ContentModel extends XMLDatastream { public static function loadFromObject($pid) { $ret = FALSE; if (self::valid_pid($pid)) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $objectHelper = new ObjectHelper(); $content_models = $objectHelper->get_content_models_list($pid); @@ -73,7 +73,7 @@ class ContentModel extends XMLDatastream { $rootEl = $cm->xml->getElementsByTagName('content_model')->item(0); $rootEl->setAttribute('name', $name); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $fedoraItem = new Fedora_Item($pid); $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X'); $ret = $cm; @@ -102,7 +102,7 @@ class ContentModel extends XMLDatastream { $cm = new ContentModel($newDom, $pid, $modelDsid); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $fedoraItem = new Fedora_Item($pid); $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X'); $ret = $cm; @@ -172,7 +172,7 @@ class ContentModel extends XMLDatastream { $cm = new ContentModel($newDom, $pid, $modelDsid); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $fedoraItem = new Fedora_Item($pid); $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X'); $ret = $cm; @@ -199,7 +199,7 @@ class ContentModel extends XMLDatastream { */ public static function loadFromModel($pid, $dsid = NULL, $pid_namespace = NULL, $name = NULL) { $ret = FALSE; - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); try { if (self::valid_pid($pid)) { $fedoraItem = new Fedora_Item($pid); @@ -436,7 +436,7 @@ class ContentModel extends XMLDatastream { and $object ) order by $title'; - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); $collectionHelper = new CollectionClass(); $xml = simplexml_load_string($collectionHelper->getRelatedItems($this->pid, $query)); @@ -1070,7 +1070,7 @@ class ContentModel extends XMLDatastream { $method = $ingest_form->getElementsByTagName('form_builder_method')->item(0); $module = $method->getAttribute('module'); - $path = drupal_get_path('module', !empty($module) ? $module : 'islandora_repository') . '/' . $method->getAttribute('file'); + $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file'); if (!file_exists($path)) { self::$errors[] = 'Build Ingest Form: file \'' . $path . '\' does not exist.'; } @@ -1110,7 +1110,7 @@ class ContentModel extends XMLDatastream { if ($method->length > 0 && $method->item(0)->getAttribute('dsid') == $dsid) { $method = $method->item(0); $module = $method->getAttribute('module'); - $path = drupal_get_path('module', !empty($module) ? $module : 'islandora_repository') . '/' . $method->getAttribute('file'); + $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file'); if (!file_exists($path)) { self::$errors[] = 'Build Edit Metadata Form: file \'' . $path . '\' does not exist.'; } @@ -1153,7 +1153,7 @@ class ContentModel extends XMLDatastream { if ($method->length > 0) { $method = $method->item(0); $module = $method->getAttribute('module'); - $path = drupal_get_path('module', !empty($module) ? $module : 'islandora_repository') . '/' . $method->getAttribute('file'); + $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file'); if (!file_exists($path)) { self::$errors[] = 'Handle Edit Metadata Form: file \'' . $path . '\' does not exist.'; } @@ -1177,7 +1177,7 @@ class ContentModel extends XMLDatastream { } else { // Assume DC form if none is specified. - module_load_include('inc', 'islandora_repository', 'formClass'); + module_load_include('inc', 'fedora_repository', 'formClass'); $metaDataForm = new formClass(); $ret = $metaDataForm->updateMetaData($form_state['values']['form_id'], $form_state['values'], $soap_client); $form_state['storage'] = NULL; @@ -1198,7 +1198,7 @@ class ContentModel extends XMLDatastream { $method = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method'); if ($method->length > 0) { $method = $method->item(0); - $ret = array('module' => $method->getAttribute('module') == '' ? 'islandora_repository' : $method->getAttribute('module'), + $ret = array('module' => $method->getAttribute('module') == '' ? 'fedora_repository' : $method->getAttribute('module'), 'file' => $method->getAttribute('file'), 'class' => $method->getAttribute('class'), 'method' => $method->getAttribute('method'), @@ -1282,7 +1282,7 @@ class ContentModel extends XMLDatastream { } } $module = $addMethod->getAttribute('module'); - $path = drupal_get_path('module', !empty($module) ? $module : 'islandora_repository') . '/' . $addMethod->getAttribute('file'); + $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $addMethod->getAttribute('file'); if (!file_exists($path)) { self::$errors[] = 'Execute Add Datastream Methods: file \'' . $path . '\' does not exist.'; } @@ -1351,9 +1351,9 @@ class ContentModel extends XMLDatastream { if (!$preview || isset($param_array['preview'])) { $module = $method->getAttribute('module'); - $path = drupal_get_path('module', !empty($module) ? $module : 'islandora_repository') . '/' . $method->getAttribute('file'); + $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file'); - if (!file_exists($path) || substr_compare($path, 'islandora_repository/', -strlen('islandora_repository/'), strlen('islandora_repository/')) === 0) { + if (!file_exists($path) || substr_compare($path, 'fedora_repository/', -strlen('fedora_repository/'), strlen('fedora_repository/')) === 0) { self::$errors[] = 'Execute Ingest Rules: file \'' . $path . '\' does not exist.'; $ret = FALSE; } @@ -1399,7 +1399,7 @@ class ContentModel extends XMLDatastream { if ($this->validate()) { $method = $this->xml->getElementsByTagName('ingest_form')->item(0)->getElementsByTagName('form_builder_method')->item(0); $module = $method->getAttribute('module'); - $path = drupal_get_path('module', !empty($module) ? $module : 'islandora_repository') . '/' . $method->getAttribute('file'); + $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file'); if (!file_exists($path)) { self::$errors[] = 'Execute Form Handler: file \'' . $path . '\' does not exist.'; } @@ -1469,7 +1469,7 @@ class ContentModel extends XMLDatastream { for ($j = 0; $j < $dispMethods->length; $j++) { $method = $dispMethods->item($j); $module = $method->getAttribute('module'); - $path = drupal_get_path('module', !empty($module) ? $module : 'islandora_repository') . '/' . $method->getAttribute('file'); + $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file'); if (!file_exists($path)) { self::$errors[] = 'Execute Form Handler: file \'' . $path . '\' does not exist.'; } @@ -1588,7 +1588,7 @@ class ContentModel extends XMLDatastream { $ret = array(); $dispMethods = $ds->getElementsByTagName('display_method'); for ($i = 0; $i < $dispMethods->length; $i++) { - $ret[] = array('module' => $dispMethods->item($i)->getAttribute('module') == '' ? 'islandora_repository' : $dispMethods->item($i)->getAttribute('module'), + $ret[] = array('module' => $dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module'), 'file' => $dispMethods->item($i)->getAttribute('file'), 'class' => $dispMethods->item($i)->getAttribute('class'), 'method' => $dispMethods->item($i)->getAttribute('method'), @@ -1694,7 +1694,7 @@ class ContentModel extends XMLDatastream { $found = FALSE; $dispMethods = $ds->getElementsByTagName('display_method'); for ($i = 0; !$found && $i < $dispMethods->length; $i++) { - if ($module == ($dispMethods->item($i)->getAttribute('module') == '' ? 'islandora_repository' : $dispMethods->item($i)->getAttribute('module')) && + if ($module == ($dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module')) && $file == $dispMethods->item($i)->getAttribute('file') && $class == $dispMethods->item($i)->getAttribute('class') && $method == $dispMethods->item($i)->getAttribute('method')) { @@ -1732,7 +1732,7 @@ class ContentModel extends XMLDatastream { $found = FALSE; $dispMethods = $ds->getElementsByTagName('display_method'); for ($i = 0; !$found && $i < $dispMethods->length; $i++) { - if ($module == ($dispMethods->item($i)->getAttribute('module') == '' ? 'islandora_repository' : $dispMethods->item($i)->getAttribute('module') == '') && + if ($module == ($dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module') == '') && $file == $dispMethods->item($i)->getAttribute('file') && $class == $dispMethods->item($i)->getAttribute('class') && $method == $dispMethods->item($i)->getAttribute('method')) { @@ -1785,7 +1785,7 @@ class ContentModel extends XMLDatastream { if (($ds = $this->getDSModel($ds)) !== FALSE) { $addDsMethod = $ds->getElementsByTagName('add_datastream_method'); if ($addDsMethod !== FALSE && $addDsMethod->length > 0) { - $ret = array('module' => $addDsMethod->item(0)->getAttribute('module') == '' ? 'islandora_repository' : $addDsMethod->item(0)->getAttribute('module'), + $ret = array('module' => $addDsMethod->item(0)->getAttribute('module') == '' ? 'fedora_repository' : $addDsMethod->item(0)->getAttribute('module'), 'file' => $addDsMethod->item(0)->getAttribute('file'), 'class' => $addDsMethod->item(0)->getAttribute('class'), 'method' => $addDsMethod->item(0)->getAttribute('method'), @@ -1936,7 +1936,7 @@ class ContentModel extends XMLDatastream { $methods = $rule->getElementsByTagName('ingest_methods')->item(0)->getElementsByTagName('ingest_method'); $found = FALSE; for ($i = 0; $found === FALSE && $i < $methods->length; $i++) { - if (($methods->item($i)->getAttribute('module') == '' ? 'islandora_repository' : $methods->item($i)->getAttribute('module')) == $module && + if (($methods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $methods->item($i)->getAttribute('module')) == $module && $methods->item($i)->getAttribute('file') == $file && $methods->item($i)->getAttribute('class') == $class && $methods->item($i)->getAttribute('method') == $method) { @@ -1989,7 +1989,7 @@ class ContentModel extends XMLDatastream { $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0); $methods = $methodsEl->getElementsByTagName('ingest_method'); for ($i = 0; !$found && $i < $methods->length; $i++) { - if (( trim($methods->item($i)->getAttribute('module')) == $module || (trim($methods->item($i)->getAttribute('module')) == '' && $module == 'islandora_repository')) && trim($methods->item($i)->getAttribute('file')) == $file && trim($methods->item($i)->getAttribute('class')) == $class && trim($methods->item($i)->getAttribute('method')) == $method) { + if (( trim($methods->item($i)->getAttribute('module')) == $module || (trim($methods->item($i)->getAttribute('module')) == '' && $module == 'fedora_repository')) && trim($methods->item($i)->getAttribute('file')) == $file && trim($methods->item($i)->getAttribute('class')) == $class && trim($methods->item($i)->getAttribute('method')) == $method) { $found = $methods->item($i); } } @@ -2077,7 +2077,7 @@ class ContentModel extends XMLDatastream { $methods = $rules->item($i)->getElementsByTagName('ingest_methods')->item(0)->getElementsByTagName('ingest_method'); for ($j = 0; $j < $methods->length; $j++) { - $method = array('module' => $methods->item($j)->getAttribute('module') == '' ? 'islandora_repository' : $methods->item($j)->getAttribute('module'), + $method = array('module' => $methods->item($j)->getAttribute('module') == '' ? 'fedora_repository' : $methods->item($j)->getAttribute('module'), 'file' => $methods->item($j)->getAttribute('file'), 'class' => $methods->item($j)->getAttribute('class'), 'method' => $methods->item($j)->getAttribute('method'), @@ -2157,7 +2157,7 @@ class ContentModel extends XMLDatastream { $ret = FALSE; if ($this->validate()) { $method = $this->xml->getElementsByTagName('ingest_form')->item(0)->getElementsByTagName('form_builder_method')->item(0); - $ret = array('module' => ($method->getAttribute('module') == '' ? 'islandora_repository' : $method->getAttribute('module')), + $ret = array('module' => ($method->getAttribute('module') == '' ? 'fedora_repository' : $method->getAttribute('module')), 'file' => $method->getAttribute('file'), 'class' => $method->getAttribute('class'), 'method' => $method->getAttribute('method'), diff --git a/ObjectHelper.inc b/ObjectHelper.inc index da56852b..9e9995b7 100644 --- a/ObjectHelper.inc +++ b/ObjectHelper.inc @@ -33,7 +33,7 @@ class ObjectHelper { */ function ObjectHelper() { drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); $connectionHelper = new ConnectionHelper(); //$this->fedoraUser = $connectionHelper->getUser(); //$this->fedoraPass = $connectionHelper->getPassword(); @@ -56,7 +56,7 @@ class ObjectHelper { */ function makeObject($pid, $dsID, $asAttachment = FALSE, $label = NULL, $filePath=FALSE, $version=NULL, $forceSoap = TRUE) { global $user; - module_load_include('inc', 'islandora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); if ($pid == NULL || $dsID == NULL) { drupal_set_message(t("no pid or dsid given to create an object with"), 'error'); return ' '; @@ -69,7 +69,7 @@ class ObjectHelper { return ' '; } - if (!islandora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { drupal_set_message(t("You do not have access Fedora objects within the attempted namespace."), 'error'); drupal_access_denied(); return ' '; @@ -91,7 +91,7 @@ class ObjectHelper { } } - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $item = new Fedora_Item($pid); @@ -176,7 +176,7 @@ class ObjectHelper { * for the mimetype in question. */ if ($pos === FALSE) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); $mimeclass = new MimeClass(); $ext = $mimeclass->get_extension($mimeType); $suggestedFileName = "$label.$ext"; @@ -207,7 +207,7 @@ class ObjectHelper { * @return type */ function getCollectionInfo($pid, $query = NULL) { - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); $collectionClass = new CollectionClass(); $results = $collectionClass->getRelatedItems($pid, $query); return $results; @@ -227,12 +227,12 @@ class ObjectHelper { drupal_set_message(t('You must specify an object pid and datastream ID.'), 'error'); return ''; } - if (!islandora_repository_access(ObjectHelper :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(ObjectHelper :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { drupal_set_message(t('You do not have the appropriate permissions'), 'error'); return; } - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $item = new fedora_item($pid); $datastream_list = $item->get_datastreams_list_as_SimpleXML(); if (!isset($datastream_list)) { @@ -262,12 +262,12 @@ class ObjectHelper { drupal_set_message(t('You must specify an object pid and datastream ID.'), 'error'); return ''; } - if (!islandora_repository_access(ObjectHelper :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(ObjectHelper :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { drupal_set_message(t('You do not have the appropriate permissions'), 'error'); return; } - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $item = new fedora_item($pid); $datastream_list = $item->get_datastreams_list_as_SimpleXML(); if (!isset($datastream_list)) { @@ -291,7 +291,7 @@ class ObjectHelper { */ function create_link_for_ds($pid, $dataStreamValue) { global $base_url; - $path = drupal_get_path('module', 'islandora_repository'); + $path = drupal_get_path('module', 'fedora_repository'); require_once($path . '/api/fedora_item.inc'); $item = new Fedora_Item($pid); @@ -359,8 +359,8 @@ class ObjectHelper { */ function getFormattedDC($item) { global $base_url; - $path = drupal_get_path('module', 'islandora_repository'); - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); + $path = drupal_get_path('module', 'fedora_repository'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); $dsid = array_key_exists('QDC', $item->get_datastreams_list_as_array()) ? 'QDC' : 'DC'; $xmlstr = $item->get_datastream_dissemination($dsid); @@ -408,7 +408,7 @@ class ObjectHelper { $ds_list = $item->get_datastreams_list_as_array(); $output = $this->getFormattedDC($item); $dsid = array_key_exists('QDC', $ds_list) ? 'QDC' : 'DC'; - $path = drupal_get_path('module', 'islandora_repository'); + $path = drupal_get_path('module', 'fedora_repository'); //$baseUrl=substr($baseUrl, 0, (strpos($baseUrl, "/")-1)); if (user_access(ObjectHelper :: $EDIT_FEDORA_METADATA)) { @@ -440,12 +440,12 @@ class ObjectHelper { */ function get_formatted_datastream_list($object_pid, $contentModels, &$fedoraItem) { global $fedoraUser, $fedoraPass, $base_url, $user; - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); - $path = drupal_get_path('module', 'islandora_repository'); + $path = drupal_get_path('module', 'fedora_repository'); $dataStreamBody = ''; $fedoraItem = new Fedora_Item($object_pid); @@ -514,7 +514,7 @@ class ObjectHelper { * */ function getStream($pid, $dsid, $showError = FALSE) { - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); $soapHelper = new ConnectionHelper(); try { $client = $soapHelper->getSoapClient(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl')); @@ -548,7 +548,7 @@ class ObjectHelper { * @return array */ function get_content_models_list($pid, $include_fedora_system_content_models = FALSE) { - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); $collectionHelper = new CollectionClass(); $pids = array(); $query = 'select $object from <#ri> @@ -593,7 +593,7 @@ class ObjectHelper { * @param type $pid * @return type */ - function islandora_repository_access($op, $pid) { + function fedora_repository_access($op, $pid) { global $user; $returnValue = FALSE; @@ -602,7 +602,7 @@ class ObjectHelper { $namespaceAccess = TRUE; } if ($pid == NULL) { - $pid = variable_get('islandora_repository_pid', 'islandora:root'); + $pid = variable_get('fedora_repository_pid', 'islandora:root'); } $nameSpaceAllowed = explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: ')); $pos = NULL; @@ -632,7 +632,7 @@ class ObjectHelper { * @param $content String */ function parseContent($content, $pid, $dsId, $collection, $pageNumber = NULL) { - $path = drupal_get_path('module', 'islandora_repository'); + $path = drupal_get_path('module', 'fedora_repository'); global $base_url; $collection_pid = $pid; //we will be changing the pid later maybe //module_load_include('php', ''Fedora_Repository'', 'ObjectHelper'); @@ -790,7 +790,7 @@ class ObjectHelper { return NULL; } $output = ''; - module_load_include('inc', 'islandora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); if (($cm = ContentModel :: loadFromModel($contentModel)) !== FALSE && $cm->validate()) { $output .= $cm->displayExtraFieldset($pid, $page_number); } @@ -810,7 +810,7 @@ class ObjectHelper { return FALSE; } - module_load_include('inc', 'islandora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); if ($dsid != NULL && $pid != NULL && ($cm = ContentModel::loadFromObject($pid)) !== FALSE) { $cm->execAddDatastreamMethods($dsid, $file); } @@ -826,7 +826,7 @@ class ObjectHelper { if (!$pid) { return FALSE; } - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); // Get title and descriptions for $pid $query_string = 'select $title $desc from <#ri> @@ -834,7 +834,7 @@ class ObjectHelper { and $o $desc and $o '; - $url = variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'); + $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url .= "?type=tuples&flush=true&format=csv&limit=1000&lang=itql&stream=on&query="; $content = do_curl($url . htmlentities(urlencode($query_string))); @@ -868,7 +868,7 @@ class ObjectHelper { } $query_string = substr($query_string, 0, -3) . ' )'; - $url = variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'); + $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url .= "?type=tuples&flush=true&format=csv&limit=1000&lang=itql&stream=on&query="; $url .= htmlentities(urlencode($query_string)); $content = $this->doCurl($url); @@ -905,7 +905,7 @@ class ObjectHelper { * @return type */ function getObject($pid, $context = 'archive', $format = FOXML_11) { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $url = variable_get('fedora_base_url', 'http://localhost:8080/fedora') . '/objects/' . $pid . '/export?context=' . $context . '&format=' . $format; $result_data = do_curl($url); @@ -921,10 +921,10 @@ class ObjectHelper { * @param type $level */ function getBreadcrumbs($pid, &$breadcrumbs, $level=10) { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + 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('islandora_repository_pid', 'islandora:root')) { + if ($pid == variable_get('fedora_repository_pid', 'islandora:root')) { $breadcrumbs[] = l(t('Digital repository'), 'fedora/repository'); $breadcrumbs[] = l(t('Home'), $base_url); } @@ -940,7 +940,7 @@ class ObjectHelper { order by $title'; $query_string = htmlentities(urlencode($query_string)); - $url = variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'); + $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url .= "?type=tuples&flush=TRUE&format=CSV&limit=1&offset=0&lang=itql&stream=on&query=" . $query_string; $result = preg_split('/[\r\n]+/', do_curl($url)); @@ -950,7 +950,7 @@ class ObjectHelper { $parent = preg_replace('/^info:fedora\//', '', $matches[0]); $breadcrumbs[] = l($matches[1], 'fedora/repository/' . $pid); - if ($parent == variable_get('islandora_repository_pid', 'islandora:root')) { + if ($parent == variable_get('fedora_repository_pid', 'islandora:root')) { $breadcrumbs[] = l(t('Digital repository'), 'fedora/repository'); $breadcrumbs[] = l(t('Home'), $base_url); } diff --git a/SearchClass.inc b/SearchClass.inc index 794d292a..3f1c78d5 100644 --- a/SearchClass.inc +++ b/SearchClass.inc @@ -25,14 +25,14 @@ class SearchClass { function solr_search($query, $startPage=1, $fq = NULL, $dismax = NULL) { $solrFile = trim(variable_get('islandora_solr_search_block_handler_file', 'plugins/SolrResults.inc')); - // Don't let us bust out of islandora_repository modules directory when looking for a handler + // Don't let us bust out of fedora_repository modules directory when looking for a handler if (strpos($solrField, '../')) { drupal_set_message(t('You have illegal characters in your solr handler function in the Islandora solr block config.'), 'error'); } $solrClass = trim(variable_get('islandora_solr_search_block_handler_class', 'SolrResults')); $solrFunction = trim(variable_get('islandora_solr_search_block_handler_function', 'SearchAndDisplay')); - require_once(drupal_get_path('module', 'islandora_repository') . '/' . $solrFile); + require_once(drupal_get_path('module', 'fedora_repository') . '/' . $solrFile); try { $implementation = new $solrClass(); } catch (Exception $e) { @@ -185,8 +185,8 @@ class SearchClass { * @return type */ function quickSearch($type, $query, $showForm = 1, $orderBy = 0, & $userArray) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (user_access('view fedora collection')) { $numberOfHistPerPage = '5000'; //hack for IR they do not want next button $luceneQuery = NULL; @@ -222,7 +222,7 @@ class SearchClass { } } if ($showForm) { - $output = 'Quick Search
' . drupal_get_form('islandora_repository_quick_search_form') . '
'; + $output = 'Quick Search
' . drupal_get_form('fedora_repository_quick_search_form') . '
'; } $output .= $this->applyXSLT($resultData, $orderBy); return $output; @@ -237,8 +237,8 @@ class SearchClass { * @return type */ function getTerms($fieldName, $startTerm, $displayName = NULL) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $indexName = variable_get('fedora_index_name', 'DemoOnLucene'); $searchUrl = variable_get('fedora_fgsearch_url', 'http://localhost:8080/fedoragsearch/rest'); if ($startTerm == NULL) { @@ -269,8 +269,8 @@ class SearchClass { * @return type */ function custom_search($query, $startPage=1, $xslt= '/xsl/advanced_search_results.xsl', $numberOfHistPerPage = 50) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (user_access('view fedora collection')) { //$numberOfHistPerPage = '50';//hack for IR they do not want next button @@ -322,7 +322,7 @@ class SearchClass { return ' '; } - //$proc->setParameter('', 'searchUrl', url('search') . '/islandora_repository'); //needed in our xsl + //$proc->setParameter('', 'searchUrl', url('search') . '/fedora_repository'); //needed in our xsl $proc->setParameter('', 'objectsPage', base_path()); $proc->setParameter('', 'userID', $user->uid); if (isset($displayName)) { @@ -390,8 +390,8 @@ class SearchClass { //inject into xsl stylesheet global $user; $proc->setParameter('', 'userID', $user->uid); - $proc->setParameter('', 'searchToken', drupal_get_token('islandora_repository_advanced_search')); //token generated by Drupal, keeps tack of what tab etc we are on - $proc->setParameter('', 'searchUrl', url('search') . '/islandora_repository'); //needed in our xsl + $proc->setParameter('', 'searchToken', drupal_get_token('fedora_repository_advanced_search')); //token generated by Drupal, keeps tack of what tab etc we are on + $proc->setParameter('', 'searchUrl', url('search') . '/fedora_repository'); //needed in our xsl $proc->setParameter('', 'objectsPage', base_path()); $proc->setParameter('', 'allowedPidNameSpaces', variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: ')); $proc->setParameter('', 'hitPageStart', $startPage); @@ -441,7 +441,7 @@ class SearchClass { //inject into xsl stylesheet //$proc->setParameter('', 'searchToken', drupal_get_token('search_form')); //token generated by Drupal, keeps tack of what tab etc we are on $proc->setParameter('', 'userID', $user->uid); - $proc->setParameter('', 'searchUrl', url('search') . '/islandora_repository'); //needed in our xsl + $proc->setParameter('', 'searchUrl', url('search') . '/fedora_repository'); //needed in our xsl $proc->setParameter('', 'objectsPage', base_path()); $proc->setParameter('', 'allowedPidNameSpaces', variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: ')); $proc->setParameter('', 'orderBy', $orderBy); @@ -475,7 +475,7 @@ class SearchClass { */ function theme_advanced_search_form($form, $repeat=NULL) { if (!isset($repeat)) { - $repeat = variable_get('islandora_repository_advanced_block_repeat', t('3')); + $repeat = variable_get('fedora_repository_advanced_block_repeat', t('3')); } $output = drupal_render($form['search_type']['type1']); @@ -515,7 +515,7 @@ class SearchClass { $form = array(); if (!isset($repeat)) { - $repeat = variable_get('islandora_repository_advanced_block_repeat', t('3')); + $repeat = variable_get('fedora_repository_advanced_block_repeat', t('3')); } $var0 = explode(':', $queryArray[0]); $var1 = explode(':', $queryArray[1]); diff --git a/SecurityClass.inc b/SecurityClass.inc index fbc6d3b8..0cdb2cbe 100644 --- a/SecurityClass.inc +++ b/SecurityClass.inc @@ -30,7 +30,7 @@ class SecurityClass { */ function canIngestHere($collection_pid) { global $user; - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $objectHelper = new ObjectHelper(); // get the childsecurity policy from the collection. $policyStream = $objectHelper->getStream($collection_pid, SECURITYCLASS :: $SECURITY_CLASS_SECURITY_STREAM, FALSE); diff --git a/XMLDatastream.inc b/XMLDatastream.inc index 9376aa83..d3afed09 100644 --- a/XMLDatastream.inc +++ b/XMLDatastream.inc @@ -168,7 +168,7 @@ abstract class XMLDatastream { //$tmpname = substr($this->pid, strpos($this->pid, ':') + 1); $tmpname = user_password(10); $this->convertFromOldSchema(); - drupal_add_js("islandora_repository_print_new_schema_$tmpname = function(tagID) { + drupal_add_js("fedora_repository_print_new_schema_$tmpname = function(tagID) { var target = document.getElementById(tagID); var content = target.innerHTML; var text = 'Title' + @@ -179,7 +179,7 @@ abstract class XMLDatastream { }", 'inline'); if (user_access('administer site configuration')) { - drupal_set_message('<span id="new_schema_' . $tmpname . '" style="display: none;">' . htmlentities($this->xml->saveXML()) . '</span>Warning: XMLDatastream performed conversion of \'' . $this->getIdentifier() . '\' from old schema. Please update the datastream. The new datastream contents are <a href="javascript:islandora_repository_print_new_schema_' . $tmpname . '(\'new_schema_' . $tmpname . '\')">here.</a> '); + drupal_set_message('<span id="new_schema_' . $tmpname . '" style="display: none;">' . htmlentities($this->xml->saveXML()) . '</span>Warning: XMLDatastream performed conversion of \'' . $this->getIdentifier() . '\' from old schema. Please update the datastream. The new datastream contents are <a href="javascript:fedora_repository_print_new_schema_' . $tmpname . '(\'new_schema_' . $tmpname . '\')">here.</a> '); } $rootEl = $this->xml->firstChild; @@ -246,7 +246,7 @@ abstract class XMLDatastream { * @return boolean $valid */ public function purgeVersions($start_date, $end_date = NULL) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $fedora_item = new Fedora_Item($this->pid); return $fedora_item->purge_datastream($this->dsid, $start_date, $end_date); } @@ -258,7 +258,7 @@ abstract class XMLDatastream { * @return string[] $ret */ public function getHistory() { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $fedora_item = new Fedora_Item($this->pid); $history = $fedora_item->get_datastream_history($this->dsid); diff --git a/api/fedora_collection.inc b/api/fedora_collection.inc index 2efd2acb..b8afc5c4 100644 --- a/api/fedora_collection.inc +++ b/api/fedora_collection.inc @@ -4,10 +4,10 @@ * @file * Operations that affect a Fedora repository at a collection level. */ -module_load_include('inc', 'islandora_repository', 'CollectionClass'); -module_load_include('inc', 'islandora_repository', 'api/fedora_item'); -module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); -module_load_include('module', 'islandora_repository'); +module_load_include('inc', 'fedora_repository', 'CollectionClass'); +module_load_include('inc', 'fedora_repository', 'api/fedora_item'); +module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); +module_load_include('module', 'fedora_repository'); /** * Exports a fedora collection object and all of its children in a format @@ -68,10 +68,10 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio * @param <type> $query_format R */ function get_related_items_as_xml($collection_pid, $relationship = array('isMemberOfCollection'), $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL, $orderby = '$title') { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); global $user; - if (!islandora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied."), 'error'); return array(); } @@ -111,7 +111,7 @@ function get_related_items_as_xml($collection_pid, $relationship = array('isMemb $content = ''; - $url = variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'); + $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url .= "?type=tuples&flush=TRUE&format=Sparql&limit=$limit&offset=$offset&lang=itql&stream=on&query=" . $query_string; $content .= do_curl($url); diff --git a/api/fedora_export.inc b/api/fedora_export.inc index bc4fd00f..e1ed3cbd 100644 --- a/api/fedora_export.inc +++ b/api/fedora_export.inc @@ -41,7 +41,7 @@ function export_to_export_area($pid, $foxml_dir, $ob_dir, &$log = array()) { * @return string */ function export_objects_for_pid($pid, $dir, &$log) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $item = new Fedora_Item($pid); if (!$object = $item->get_datastreams_list_as_SimpleXML($pid)) { $log[] = log_line(t("Failed to get datastream %dsid for pid %pid", array('%dsid' => $ds->ID, '%pid' => $pid)), 'error'); @@ -85,7 +85,7 @@ function export_objects_for_pid($pid, $dir, &$log) { * @return type */ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $remove_islandora = FALSE) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $ob_helper = new ObjectHelper(); if (!$object_xml = $ob_helper->getObject($pid, 'migrate', $format)) { $log[] = log_line(t("Failed to get foxml for %pid", array('%pid' => $pid)), 'error'); diff --git a/api/fedora_item.inc b/api/fedora_item.inc index fdf7074c..4dacca8c 100644 --- a/api/fedora_item.inc +++ b/api/fedora_item.inc @@ -28,8 +28,8 @@ class Fedora_Item { */ function __construct($pid) { drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $this->pid = $pid; if (isset(Fedora_Item::$instantiated_pids[$pid])) { @@ -75,7 +75,7 @@ class Fedora_Item { * @return type */ function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); if (!is_file($datastream_file)) { drupal_set_message("$datastream_file not found<br />", 'warning'); return; @@ -285,7 +285,7 @@ class Fedora_Item { * @return Array of pid => title pairs that match the results */ static function find_objects_by_pattern($pattern = '*', $field = 'pid', $max_results = 100, $resultFields = array()) { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $pattern = drupal_urlencode($pattern); $done = FALSE; @@ -848,7 +848,7 @@ class Fedora_Item { */ static function soap_call($function_name, $params_array, $quiet = FALSE) { if (!self::$connection_helper) { - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); self::$connection_helper = new ConnectionHelper(); } switch ($function_name) { diff --git a/api/fedora_utils.inc b/api/fedora_utils.inc index 91a8f05f..c8ce7d0e 100644 --- a/api/fedora_utils.inc +++ b/api/fedora_utils.inc @@ -158,7 +158,7 @@ function fedora_available() { */ function risearch_available() { - $response = do_curl_ext(variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch')); + $response = do_curl_ext(variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch')); return ($response != NULL) ? ($response[1] == 0): FALSE; } @@ -238,13 +238,13 @@ function fix_dsid($dsid) { * @return array */ function get_collections_as_option_array() { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $query = 'select $object $title from <#ri> where ($object <dc:title> $title and $object <info:fedora/fedora-system:def/model#hasModel> <info:fedora/islandora:collectionCModel> and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>) order by $title'; - $url = variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'); + $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url .= "?type=tuples&flush=true&format=csv&limit=1000&lang=itql&stream=on&query="; $content = do_curl($url . htmlentities(urlencode($query))); $list = explode("\n", $content); @@ -269,8 +269,8 @@ function get_collections_as_option_array() { * @return array */ function get_content_models_as_option_array() { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $restricted = variable_get('fedora_namespace_restriction_enforced', true); $allowed_string = variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora:'); $namespaces = explode(':', $allowed_string); @@ -286,7 +286,7 @@ function get_content_models_as_option_array() { and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>) order by $title'; - $url = variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'); + $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url .= "?type=tuples&flush=true&format=csv&limit=1000&lang=itql&stream=on&query="; $content = do_curl($url . htmlentities(urlencode($query))); $list = explode("\n", $content); diff --git a/islandora_repository.info b/fedora_repository.info similarity index 100% rename from islandora_repository.info rename to fedora_repository.info diff --git a/islandora_repository.install b/fedora_repository.install similarity index 92% rename from islandora_repository.install rename to fedora_repository.install index e8e26ad2..164ce02e 100644 --- a/islandora_repository.install +++ b/fedora_repository.install @@ -1,7 +1,7 @@ <?php /** - * @file islandora_repository.install + * @file fedora_repository.install */ /** @@ -33,7 +33,7 @@ function fedora_collections_enable() { * @see _update_message_text() * @see _update_cron_notify() */ -function islandora_repository_requirements($phase) { +function fedora_repository_requirements($phase) { global $base_url; $requirements = array(); @@ -89,13 +89,13 @@ function islandora_repository_requirements($phase) { } } elseif ($phase == 'runtime') { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $requirements['fedora-repository']['title'] = t("Fedora server"); if (!fedora_available()) { $requirements['fedora-repository']['value'] = t("Not available"); $requirements['fedora-repository']['severity'] = REQUIREMENT_ERROR; - $requirements['fedora-repository']['description'] = t('Ensure that Fedora is running and that the <a href="@collection-settings">collection settings</a> are correct.', array('@collection-settings' => $base_url . '/admin/settings/islandora_repository')); + $requirements['fedora-repository']['description'] = t('Ensure that Fedora is running and that the <a href="@collection-settings">collection settings</a> are correct.', array('@collection-settings' => $base_url . '/admin/settings/fedora_repository')); } else { $requirements['fedora-repository']['value'] = t("Available"); diff --git a/islandora_repository.module b/fedora_repository.module similarity index 81% rename from islandora_repository.module rename to fedora_repository.module index 6fa13988..ea1c15c5 100644 --- a/islandora_repository.module +++ b/fedora_repository.module @@ -2,23 +2,23 @@ /** * Drupal hook for admin form - * islandora_repository_name is the name of the top level collection this module will query - * islandora_repository_pid is the name of the top level pid. + * fedora_repository_name is the name of the top level collection this module will query + * fedora_repository_pid is the name of the top level pid. * Stores this info in the drupal variables table. * the name and pid can also be passed as url parameters */ -function islandora_repository_admin() { - module_load_include('inc', 'islandora_repository', 'formClass'); +function fedora_repository_admin() { + module_load_include('inc', 'fedora_repository', 'formClass'); $adminForm = new formClass(); return $adminForm->createAdminForm(); } /** * drupal hook - * calls the islandora_repositorys_admin form + * calls the fedora_repositorys_admin form */ -function islandora_repository_menu() { - module_load_include('inc', 'islandora_repository', 'formClass'); +function fedora_repository_menu() { + module_load_include('inc', 'fedora_repository', 'formClass'); $adminMenu = new formClass(); return $adminMenu->createMenu(); } @@ -30,11 +30,11 @@ function islandora_repository_menu() { * @param type $arg * @return type */ -function islandora_repository_help($path, $arg) { +function fedora_repository_help($path, $arg) { switch ($path) { case 'admin/modules#description' : return t('Grabs a list of items from a collection in Drupal that are presented on the home page.'); - case 'node/add#islandora_repository' : + case 'node/add#fedora_repository' : return t('Use this page to grab a list of items from a Fedora collection.'); } } @@ -45,7 +45,7 @@ function islandora_repository_help($path, $arg) { * @param type $name * @return type */ -function islandora_repository_purge_object($pid = NULL, $name = NULL) { +function fedora_repository_purge_object($pid = NULL, $name = NULL) { if (!user_access('purge objects and datastreams')) { drupal_set_message(t('You do not have access to add a datastream to this object.'), 'error'); return ''; @@ -60,7 +60,7 @@ function islandora_repository_purge_object($pid = NULL, $name = NULL) { '%pid' => $pid) ); - $output .= drupal_get_form('islandora_repository_purge_object_form', $pid); + $output .= drupal_get_form('fedora_repository_purge_object_form', $pid); return $output; } @@ -72,22 +72,22 @@ function islandora_repository_purge_object($pid = NULL, $name = NULL) { * @param type $pageNumber * @return type */ -function islandora_repository_collection_view($pid = NULL, $collection = NULL, $pageNumber = NULL) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); +function fedora_repository_collection_view($pid = NULL, $collection = NULL, $pageNumber = NULL) { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); global $user; - if (!islandora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied."), 'error'); return ' '; } $objectHelper = new ObjectHelper(); if ($pid == NULL) { - $pid = variable_get('islandora_repository_pid', 'islandora:root'); + $pid = variable_get('fedora_repository_pid', 'islandora:root'); } $content = ''; - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); $collectionClass = new CollectionClass(); $results = $collectionClass->getRelatedItems($pid, NULL); $content .= $objectHelper->parseContent($results, $pid, $dsId, $collection, $pageNumber); @@ -102,9 +102,9 @@ function islandora_repository_collection_view($pid = NULL, $collection = NULL, $ * @param type $content_model * @return type */ -function islandora_repository_ingest_object($collection_pid=NULL, $collection_label = NULL, $content_model = NULL) { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); +function fedora_repository_ingest_object($collection_pid=NULL, $collection_label = NULL, $content_model = NULL) { + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); if (!user_access('ingest new fedora objects')) { drupal_set_message(t('You do not have permission to ingest.'), 'error'); return ''; @@ -124,7 +124,7 @@ function islandora_repository_ingest_object($collection_pid=NULL, $collection_la drupal_set_message(t('You must specify a collection object pid to ingest an object.'), 'error'); return ''; } - $output = drupal_get_form('islandora_repository_ingest_form', $collection_pid, $collection_label, $content_model); + $output = drupal_get_form('fedora_repository_ingest_form', $collection_pid, $collection_label, $content_model); $breadcrumbs = array(); $objectHelper = new ObjectHelper(); @@ -141,7 +141,7 @@ function islandora_repository_ingest_object($collection_pid=NULL, $collection_la * @param array $form * @param array $form_state */ -function islandora_repository_ingest_form_submit(array $form, array &$form_state) { +function fedora_repository_ingest_form_submit(array $form, array &$form_state) { //only validate the form if the submit button was pressed (other buttons may be used for AHAH if ($form_state['storage']['xml']) { if (module_exists('islandora_content_model_forms')) { @@ -152,9 +152,9 @@ function islandora_repository_ingest_form_submit(array $form, array &$form_state } else if ($form_state['clicked_button']['#id'] == 'edit-submit') { global $base_url; - module_load_include('inc', 'islandora_repository', 'CollectionClass'); - module_load_include('inc', 'islandora_repository', 'CollectionPolicy'); - module_load_include('inc', 'islandora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); $contentModelPid = ContentModel::getPidFromIdentifier($form_state['values']['models']); $contentModelDsid = ContentModel::getDSIDFromIdentifier($form_state['values']['models']); @@ -196,7 +196,7 @@ function islandora_repository_ingest_form_submit(array $form, array &$form_state * @param type $form_state * @return type */ -function islandora_repository_ingest_form_validate($form, &$form_state) { +function fedora_repository_ingest_form_validate($form, &$form_state) { //only validate the form if the submit button was pressed (other buttons may be used for AHAH if ($form_state['clicked_button']['#id'] == 'edit-submit') { switch ($form_state['storage']['step']) { @@ -223,8 +223,8 @@ function islandora_repository_ingest_form_validate($form, &$form_state) { } if (isset($form_state['values']['ingest-file-location']) && file_exists($form_state['values']['ingest-file-location'])) { - module_load_include('inc', 'islandora_repository', 'ContentModel'); - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); $file = $form_state['values']['ingest-file-location']; @@ -267,8 +267,8 @@ function islandora_repository_ingest_form_validate($form, &$form_state) { * @param type $content_model * @return type */ -function islandora_repository_ingest_form(&$form_state, $collection_pid, $collection_label = NULL, $content_model = NULL) { - module_load_include('inc', 'islandora_repository', 'formClass'); +function fedora_repository_ingest_form(&$form_state, $collection_pid, $collection_label = NULL, $content_model = NULL) { + module_load_include('inc', 'fedora_repository', 'formClass'); // For the sake of easily maintaining the module in different core versions create our own form_values variable. if (empty($form_state['storage']['step'])) { $form_state['storage']['step'] = 1; @@ -287,7 +287,7 @@ function islandora_repository_ingest_form(&$form_state, $collection_pid, $collec * @param type $referrer * @return type */ -function islandora_repository_purge_object_form(&$form_state, $pid, $referrer = NULL) { +function fedora_repository_purge_object_form(&$form_state, $pid, $referrer = NULL) { global $base_url; if (!user_access('purge objects and datastreams')) { return NULL; @@ -311,7 +311,7 @@ function islandora_repository_purge_object_form(&$form_state, $pid, $referrer = $form['submit'] = array( '#type' => 'image_button', - '#src' => drupal_get_path('module', 'islandora_repository') . '/images/purge_big.png', + '#src' => drupal_get_path('module', 'fedora_repository') . '/images/purge_big.png', '#value' => t('Purge'), '#suffix' => 'Purge this object', ); @@ -337,7 +337,7 @@ function islandora_repository_purge_object_form(&$form_state, $pid, $referrer = * @return type */ function add_stream($collection_pid=NULL, $collectionName=NULL) { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (!valid_pid($collection_pid)) { drupal_set_message(t("This PID is not valid!"), 'error'); return ' '; @@ -350,7 +350,7 @@ function add_stream($collection_pid=NULL, $collectionName=NULL) { drupal_set_message(t('You must specify an collection object pid to ingest an object.'), 'error'); return ''; } - $output .= drupal_get_form('islandora_repository_add_stream_form', $pid); + $output .= drupal_get_form('fedora_repository_add_stream_form', $pid); return $output; } @@ -368,10 +368,10 @@ function add_stream_form_submit($form, &$form_state) { $form_state['rebuild'] = TRUE; return; } - module_load_include('inc', 'islandora_repository', 'MimeClass'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - $pathToModule = drupal_get_path('module', 'islandora_repository'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + $pathToModule = drupal_get_path('module', 'fedora_repository'); $file = $form_state['values']['add-stream-file-location']; @@ -413,7 +413,7 @@ function add_stream_form_submit($form, &$form_state) { * @return type */ function add_stream_form(&$form_state, $pid) { - module_load_include('inc', 'islandora_repository', 'formClass'); + module_load_include('inc', 'fedora_repository', 'formClass'); $addDataStreamForm = new formClass(); return $addDataStreamForm->createAddDataStreamForm($pid, $form_state); } @@ -470,14 +470,14 @@ function add_stream_form_validate($form, &$form_state) { * @param type $name * @return type */ -function islandora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NULL) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); +function fedora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NULL) { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); global $user; if ($pid == NULL || $dsId == NULL) { drupal_set_message(t('You must specify an object pid and DataStream ID to purge a datastream'), 'error'); return ' '; } - if (!islandora_repository_access(OBJECTHELPER :: $PURGE_FEDORA_OBJECTSANDSTREAMS, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER :: $PURGE_FEDORA_OBJECTSANDSTREAMS, $pid, $user)) { drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or you do not have permission to purge objects."), 'error'); return ' '; } @@ -486,7 +486,7 @@ function islandora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NU array( '%name' => $name) ); - $output .= drupal_get_form('islandora_repository_purge_stream_form', $pid, $dsId); + $output .= drupal_get_form('fedora_repository_purge_stream_form', $pid, $dsId); return $output; } @@ -496,8 +496,8 @@ function islandora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NU * @param type $form_state * @return type */ -function islandora_repository_purge_object_form_submit($form, &$form_state) { - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); +function fedora_repository_purge_object_form_submit($form, &$form_state) { + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); $pid = $form_state['values']['pid']; if (!isset($form_state['storage']['confirm'])) { $form_state['storage']['confirm'] = TRUE; // this will cause the form to be rebuilt, entering the confirm part of the form @@ -545,7 +545,7 @@ function islandora_repository_purge_object_form_submit($form, &$form_state) { * @param type $dsId * @return type */ -function islandora_repository_purge_stream_form(&$form_state, $pid, $dsId) { +function fedora_repository_purge_stream_form(&$form_state, $pid, $dsId) { $form['pid'] = array( '#type' => 'hidden', '#value' => "$pid" @@ -568,9 +568,9 @@ function islandora_repository_purge_stream_form(&$form_state, $pid, $dsId) { * @param type $form * @param array $form_state */ -function islandora_repository_purge_stream_form_submit($form, &$form_state) { +function fedora_repository_purge_stream_form_submit($form, &$form_state) { global $base_url; - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); //$client = getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); $pid = $form_state['values']['pid']; $item = new Fedora_Item($pid); @@ -591,12 +591,12 @@ function islandora_repository_purge_stream_form_submit($form, &$form_state) { * @param type $collectionName * @return type */ -function islandora_repository_replace_stream($pid, $dsId, $dsLabel, $collectionName = NULL) { +function fedora_repository_replace_stream($pid, $dsId, $dsLabel, $collectionName = NULL) { if ($pid == NULL || $dsId == NULL) { drupal_set_message(t('You must specify an pid and dsId to replace.'), 'error'); return ''; } - $output = drupal_get_form('islandora_repository_replace_stream_form', $pid, $dsId, $dsLabel); + $output = drupal_get_form('fedora_repository_replace_stream_form', $pid, $dsId, $dsLabel); return $output; } @@ -609,8 +609,8 @@ function islandora_repository_replace_stream($pid, $dsId, $dsLabel, $collectionN * @param type $dsLabel * @return type */ -function islandora_repository_replace_stream_form(&$form_state, $pid, $dsId, $dsLabel) { -//module_load_module_load_include('hp', ''Fedora_Repository'', 'config', 'islandora_repository', ''); +function fedora_repository_replace_stream_form(&$form_state, $pid, $dsId, $dsLabel) { +//module_load_module_load_include('hp', ''Fedora_Repository'', 'config', 'fedora_repository', ''); module_load_include('inc', 'Fedora_Repository', 'formClass'); //$client = getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); $replaceDataStreamForm = new formClass(); @@ -623,7 +623,7 @@ function islandora_repository_replace_stream_form(&$form_state, $pid, $dsId, $ds * @param type $form_state * @return type */ -function islandora_repository_replace_stream_form_validate($form, &$form_state) { +function fedora_repository_replace_stream_form_validate($form, &$form_state) { // If a file was uploaded, process it. if (isset($_FILES['files']) && is_uploaded_file($_FILES['files']['tmp_name']['file'])) { @@ -655,7 +655,7 @@ function islandora_repository_replace_stream_form_validate($form, &$form_state) * @param type $form * @param array $form_state */ -function islandora_repository_replace_stream_form_submit($form, &$form_state) { +function fedora_repository_replace_stream_form_submit($form, &$form_state) { global $base_url; $file = $form_state['values']['file']; $pid = $form_state['values']['pid']; @@ -668,7 +668,7 @@ function islandora_repository_replace_stream_form_submit($form, &$form_state) { $dsLabel .= substr($file->filename, strrpos($file->filename, '.')); // Add the file extention to the end of the label.; } module_load_include('inc', 'Fedora_Repository', 'MimeClass'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $file_basename = basename($file->filepath); $file_directory = dirname($file->filepath); @@ -694,18 +694,18 @@ function islandora_repository_replace_stream_form_submit($form, &$form_state) { * @param type $dsId * @return type */ -function islandora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); +function fedora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); global $user; if ($pid == NULL || $dsId == NULL) { drupal_set_message(t('You must specify an object pid and a Dublin Core DataStream ID to edit metadata'), 'error'); return ' '; } - if (!islandora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $pid, $user)) { drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or you do not have permission to edit meta data for this object."), 'error'); return ' '; } - $output = drupal_get_form('islandora_repository_edit_qdc_form', $pid, $dsId); + $output = drupal_get_form('fedora_repository_edit_qdc_form', $pid, $dsId); return $output; } @@ -718,20 +718,20 @@ function islandora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) { * @param type $dsId * @return type */ -function islandora_repository_edit_qdc_form(&$form_state, $pid, $dsId = NULL) { - module_load_include('inc', 'islandora_repository', 'ContentModel'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); +function fedora_repository_edit_qdc_form(&$form_state, $pid, $dsId = NULL) { + module_load_include('inc', 'fedora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); if ($pid == NULL) { drupal_set_message(t('You must specify an object pid!'), 'error'); } global $user; - if (!islandora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $pid, $user)) { drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or you do not have permission to edit meta data for this object."), 'error'); return ' '; } - module_load_include('inc', 'islandora_repository', 'formClass'); - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'formClass'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); $soapHelper = new ConnectionHelper(); $client = $soapHelper->getSoapClient(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl')); // Check if there is a custom edit metadata function defined in the content model. @@ -761,7 +761,7 @@ function islandora_repository_edit_qdc_form(&$form_state, $pid, $dsId = NULL) { * @param type $form * @param boolean $form_state */ -function islandora_repository_edit_qdc_form_validate($form, &$form_state) { +function fedora_repository_edit_qdc_form_validate($form, &$form_state) { if ($form_state['storage']['xml']) { if ($form_state['storage']['step'] == 1) { $form_state['storage']['step']++; @@ -782,14 +782,14 @@ function islandora_repository_edit_qdc_form_validate($form, &$form_state) { * @param array $form_state * @return */ -function islandora_repository_edit_qdc_form_submit($form, &$form_state) { +function fedora_repository_edit_qdc_form_submit($form, &$form_state) { if ($form_state['storage']['xml']) { module_load_include('inc', 'islandora_content_model_forms', 'EditObjectMetadataForm'); $xml_form = new EditObjectMetadataForm($form_state); $xml_form->submit($form, $form_state); } else { - module_load_include('inc', 'islandora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); global $base_url; if (strstr($form_state['clicked_button']['#id'], 'edit-submit')) { @@ -799,13 +799,13 @@ function islandora_repository_edit_qdc_form_submit($form, &$form_state) { // Check the content model for a custom edit metadata form submit function. if (isset($form_state['values']['pid'])) { - module_load_include('inc', 'islandora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); if (($cm = ContentModel::loadFromObject($form_state['values']['pid'])) !== FALSE) { return $cm->handleEditMetadataForm($form_state['values']['form_id'], $form_state, $client); } } - module_load_include('inc', 'islandora_repository', 'formClass'); + module_load_include('inc', 'fedora_repository', 'formClass'); $metaDataForm = new formClass(); $return_value = $metaDataForm->updateMetaData($form_state['values']['form_id'], $form_state['values'], $client); $form_state['storage'] = NULL; @@ -820,8 +820,8 @@ function islandora_repository_edit_qdc_form_submit($form, &$form_state) { * drupal hook * creates a new permission than can be assigned to roles */ -function islandora_repository_perm() { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); +function fedora_repository_perm() { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); return array( OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, OBJECTHELPER::$EDIT_FEDORA_METADATA, @@ -845,10 +845,10 @@ function islandora_repository_perm() { * @param type $account * @return type */ -function islandora_repository_access($op, $node, $account) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); +function fedora_repository_access($op, $node, $account) { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $objectHelper = new ObjectHelper(); - return $objectHelper->islandora_repository_access($op, $node, $account); + return $objectHelper->fedora_repository_access($op, $node, $account); } /** @@ -858,7 +858,7 @@ function islandora_repository_access($op, $node, $account) { * @param $dsID String */ function makeObject($pid, $dsID) { - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (!valid_pid($pid)) { drupal_set_message(t("Invalid PID!"), 'error'); return ' '; @@ -874,14 +874,14 @@ function makeObject($pid, $dsID) { return ' '; } global $user; - if (!islandora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { drupal_access_denied(); return; drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace."), 'error'); return ' '; } - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $objectHelper = new ObjectHelper(); $objectHelper->makeObject($pid, $dsID); } @@ -899,10 +899,10 @@ function makeObject($pid, $dsID) { * @param type $limit * @return type */ -function islandora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); +function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); global $user; if (!fedora_available()) { @@ -916,7 +916,7 @@ function islandora_repository_get_items($pid = NULL, $dsId = NULL, $collection = } if ($pid == NULL) { - $pid = variable_get('islandora_repository_pid', 'islandora:root'); + $pid = variable_get('fedora_repository_pid', 'islandora:root'); } $item = new fedora_item($pid); @@ -934,9 +934,9 @@ function islandora_repository_get_items($pid = NULL, $dsId = NULL, $collection = drupal_set_message(t("Invalid dsID!"), 'error'); return ' '; } - if (!islandora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { if (user_access('access administration pages')) { - drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/islandora_repository'))), 'warning'); + drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning'); } drupal_access_denied(); exit; @@ -945,7 +945,7 @@ function islandora_repository_get_items($pid = NULL, $dsId = NULL, $collection = $objectHelper = new ObjectHelper(); if ($pid == NULL) { - $pid = variable_get('islandora_repository_pid', 'islandora:root'); + $pid = variable_get('fedora_repository_pid', 'islandora:root'); } $headers = module_invoke_all('file_download', "/fedora/repository/$pid"); if (in_array(-1, $headers)) { @@ -960,10 +960,10 @@ function islandora_repository_get_items($pid = NULL, $dsId = NULL, $collection = $content = '<div id="content-fedora">'; - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); $collectionClass = new CollectionClass(); - module_load_include('inc', 'islandora_repository', 'ContentModel'); - module_load_include('inc', 'islandora_repository', 'plugins/FedoraObjectDetailedContent'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'plugins/FedoraObjectDetailedContent'); $breadcrumbs = array(); $objectHelper->getBreadcrumbs($pid, $breadcrumbs); drupal_set_breadcrumb(array_reverse($breadcrumbs)); @@ -1009,7 +1009,7 @@ function islandora_repository_get_items($pid = NULL, $dsId = NULL, $collection = * @param type $str * @return type */ -function islandora_repository_urlencode_string($str) { +function fedora_repository_urlencode_string($str) { return htmlentities($str); } @@ -1026,7 +1026,7 @@ function islandora_repository_urlencode_string($str) { */ function fedora_object_as_attachment($pid, $dsId, $label=NULL, $version=NULL) { global $user; - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); if ($pid == NULL || $dsId == NULL) { drupal_set_message(t("no pid or dsid given to create an object with!")); @@ -1046,9 +1046,9 @@ function fedora_object_as_attachment($pid, $dsId, $label=NULL, $version=NULL) { * @return type */ function repository_page($pid = NULL, $dsId = NULL, $collection = NULL, $pageNumber = NULL) { -//do security check at islandora_repository_get_items function as it has to be called there in case +//do security check at fedora_repository_get_items function as it has to be called there in case //someone trys to come in a back door. - return islandora_repository_get_items($pid, $dsId, $collection, $pageNumber); + return fedora_repository_get_items($pid, $dsId, $collection, $pageNumber); } /** @@ -1060,20 +1060,20 @@ function repository_page($pid = NULL, $dsId = NULL, $collection = NULL, $pageNum * @return type */ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NULL) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); global $user; - if (!islandora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { + if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { //drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied"), 'error'); drupal_access_denied(); if (user_access('access administration pages')) { - drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/islandora_repository'))), 'error'); + drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'error'); } return ' '; } if ($pid == NULL) { - $pid = variable_get('islandora_repository_pid', 'islandora:root'); + $pid = variable_get('fedora_repository_pid', 'islandora:root'); } $headers = module_invoke_all('file_download', "/fedora/repository/$pid"); if (in_array(-1, $headers)) { @@ -1105,9 +1105,9 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU * @param type $keys * @return array */ -function islandora_repository_search($op = 'search', $keys = NULL) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); +function fedora_repository_search($op = 'search', $keys = NULL) { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); switch ($op) { case 'name': @@ -1140,7 +1140,7 @@ function islandora_repository_search($op = 'search', $keys = NULL) { $xmlDoc = NULL; - $path = drupal_get_path('module', 'islandora_repository'); + $path = drupal_get_path('module', 'fedora_repository'); $xmlDoc = new DomDocument(); $xmlDoc->load($path . '/searchTerms.xml'); $nodeList = $xmlDoc->getElementsByTagName('default'); @@ -1188,8 +1188,8 @@ function islandora_repository_search($op = 'search', $keys = NULL) { * @param type $resultData * @return array */ -function islandora_repository_search_page($resultData) { - $path = drupal_get_path('module', 'islandora_repository'); +function fedora_repository_search_page($resultData) { + $path = drupal_get_path('module', 'fedora_repository'); $isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE); $proc = NULL; if (!$resultData[0][0]['data']) { @@ -1211,7 +1211,7 @@ function islandora_repository_search_page($resultData) { //inject into xsl stylesheet $proc->setParameter('', 'searchToken', drupal_get_token('search_form')); //token generated by Drupal, keeps tack of what tab etc we are on - $proc->setParameter('', 'searchUrl', url('search') . '/islandora_repository'); //needed in our xsl + $proc->setParameter('', 'searchUrl', url('search') . '/fedora_repository'); //needed in our xsl $proc->setParameter('', 'objectsPage', base_path()); $proc->setParameter('', 'allowedPidNameSpaces', variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: ')); $proc->registerPHPFunctions(); @@ -1266,11 +1266,11 @@ function islandora_repository_search_page($resultData) { * @param type $form_state * @param type $form_id */ -function islandora_repository_form_alter(&$form, &$form_state, $form_id) { +function fedora_repository_form_alter(&$form, &$form_state, $form_id) { // Advanced node search form - module_load_include('inc', 'islandora_repository', 'SearchClass'); - $path = drupal_get_path('module', 'islandora_repository'); - if ($form_id == 'search_form' && arg(1) == 'islandora_repository' && user_access('use advanced search')) { + module_load_include('inc', 'fedora_repository', 'SearchClass'); + $path = drupal_get_path('module', 'fedora_repository'); + if ($form_id == 'search_form' && arg(1) == 'fedora_repository' && user_access('use advanced search')) { $default_value = $form['basic']['inline']['keys']['#default_value']; $index = strpos($default_value, '.'); $test = substr($default_value, 0, $index + 1); @@ -1312,7 +1312,7 @@ function islandora_repository_form_alter(&$form, &$form_state, $form_id) { '#value' => t('Advanced search'), '#prefix' => '<div class="action clear-block">', '#suffix' => '</div>', ); - $form['#validate'][] = 'islandora_repository_search_validate'; + $form['#validate'][] = 'fedora_repository_search_validate'; } } @@ -1322,7 +1322,7 @@ function islandora_repository_form_alter(&$form, &$form_state, $form_id) { * @param type $form * @param type $form_state */ -function islandora_repository_search_validate($form, &$form_state) { +function fedora_repository_search_validate($form, &$form_state) { // Initialise using any existing basic search keywords. $keys = $form_state['values']['processed_keys']; @@ -1342,18 +1342,18 @@ function islandora_repository_search_validate($form, &$form_state) { * fedora repository theme * @return type */ -function islandora_repository_theme() { +function fedora_repository_theme() { return array( - 'islandora_repository_mnpl_advanced_search_form' => array( + 'fedora_repository_mnpl_advanced_search_form' => array( 'arguments' => array( 'form' => NULL, ), ), - 'islandora_repository_time' => array( + 'fedora_repository_time' => array( 'arguments' => array( 'element' => NULL ), - 'islandora_repository_solution_packs_list' => array( + 'fedora_repository_solution_packs_list' => array( 'arguments' => array( 'solution_packs' => NULL, ), @@ -1370,8 +1370,8 @@ function islandora_repository_theme() { * @param type $displayName * @return type */ -function islandora_repository_list_terms($field, $startTerm = NULL, $displayName = NULL) { - module_load_include('inc', 'islandora_repository', 'SearchClass'); +function fedora_repository_list_terms($field, $startTerm = NULL, $displayName = NULL) { + module_load_include('inc', 'fedora_repository', 'SearchClass'); $searchClass = new SearchClass(); return $searchClass->getTerms($field, $startTerm, $displayName); } @@ -1380,8 +1380,8 @@ function islandora_repository_list_terms($field, $startTerm = NULL, $displayName * fedora repository mnpl advanced search form * @return type */ -function islandora_repository_mnpl_advanced_search_form() { - module_load_include('inc', 'islandora_repository', 'SearchClass'); +function fedora_repository_mnpl_advanced_search_form() { + module_load_include('inc', 'fedora_repository', 'SearchClass'); $searchClass = new SearchClass(); return $searchClass->build_advanced_search_form(); } @@ -1391,8 +1391,8 @@ function islandora_repository_mnpl_advanced_search_form() { * @param type $form * @return type */ -function theme_islandora_repository_mnpl_advanced_search_form($form) { - module_load_include('inc', 'islandora_repository', 'SearchClass'); +function theme_fedora_repository_mnpl_advanced_search_form($form) { + module_load_include('inc', 'fedora_repository', 'SearchClass'); $advanced_search_form = new SearchClass(); return $advanced_search_form->theme_advanced_search_form($form); } @@ -1403,8 +1403,8 @@ function theme_islandora_repository_mnpl_advanced_search_form($form) { * @param type $startPage * @return type */ -function islandora_repository_mnpl_advanced_search($query, $startPage = 1) { - module_load_include('inc', 'islandora_repository', 'SearchClass'); +function fedora_repository_mnpl_advanced_search($query, $startPage = 1) { + module_load_include('inc', 'fedora_repository', 'SearchClass'); $searchClass = new SearchClass(); $retVal = $searchClass->custom_search($query, $startPage); return $searchClass->custom_search($query, $startPage); @@ -1415,9 +1415,9 @@ function islandora_repository_mnpl_advanced_search($query, $startPage = 1) { * @param type $form * @param type $form_state */ -function islandora_repository_mnpl_advanced_search_form_submit($form, &$form_state) { +function fedora_repository_mnpl_advanced_search_form_submit($form, &$form_state) { $type_id = $form_state['values']['type']; - $repeat = variable_get('islandora_repository_advanced_block_repeat', t('3')); + $repeat = variable_get('fedora_repository_advanced_block_repeat', t('3')); $searchString = $form_state['values']['type1'] . ':' . $form_state['values']['fedora_terms1']; if ($form_state['values']['fedora_terms2'] != '') { $searchString .=' +' . $form_state['values']['andor1'] . '+' . $form_state['values']['type2'] . ':' . $form_state['values']['fedora_terms2']; @@ -1437,8 +1437,8 @@ function islandora_repository_mnpl_advanced_search_form_submit($form, &$form_sta * fedora repository install demo page * @return type */ -function islandora_repository_install_demos_page() { - $output = drupal_get_form('islandora_repository_demo_objects_form'); +function fedora_repository_install_demos_page() { + $output = drupal_get_form('fedora_repository_demo_objects_form'); return $output; } @@ -1446,9 +1446,9 @@ function islandora_repository_install_demos_page() { * fedora repository demo objects form * @return string */ -function islandora_repository_demo_objects_form() { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); +function fedora_repository_demo_objects_form() { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $form = array(); $existing_demos = array(); @@ -1539,24 +1539,24 @@ function islandora_repository_demo_objects_form() { * @param type $form * @param type $form_state */ -function islandora_repository_demo_objects_form_submit($form, &$form_state) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/dublin_core'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); +function fedora_repository_demo_objects_form_submit($form, &$form_state) { + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/dublin_core'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); global $base_url; if ($form_state['clicked_button']['#name'] == 'install_demos') { if (!empty($form_state['values']['demo_collections']['islandora:collectionCModel'])) { try { $collectioncm = Fedora_Item::ingest_new_item('islandora:collectionCModel', 'A', 'Islandora Collection Content Model'); $collectioncm->add_relationship('hasModel', 'fedora-system:ContentModel-3.0', FEDORA_MODEL_URI); - $collectioncm->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X'); + $collectioncm->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X'); } catch (exception $e) { } try { $strictpdfcm = Fedora_Item::ingest_new_item('islandora:strict_pdf', 'A', 'Strict PDF Content Model'); $strictpdfcm->add_relationship('hasModel', 'fedora-system:ContentModel-3.0', FEDORA_MODEL_URI); - $strictpdfcm->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/content_models/STRICT_PDFCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X'); + $strictpdfcm->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/STRICT_PDFCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X'); } catch (exception $e) { } @@ -1578,8 +1578,8 @@ function islandora_repository_demo_objects_form_submit($form, &$form_state) { order by $title', 'QUERY', 'Content Model Collection Query', 'text/plain'); $cmodel_collection->add_relationship('isMemberOfCollection', 'islandora:root'); $cmodel_collection->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI); - $cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/collection_views/simple_list_view.xml', 'COLLECTION_VIEW', 'Collection View', 'text/xml', 'X'); - $cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/images/contentModel.jpg', 'TN', 'Thumbnail', 'image/jpg', 'M'); + $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'); drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:ContentModelCollection\">islandora:ContentModelCollection</a>."), 'message'); } catch (exception $e) { @@ -1589,9 +1589,9 @@ function islandora_repository_demo_objects_form_submit($form, &$form_state) { if (!empty($form_state['values']['demo_collections']['islandora:root'])) { $new_item = Fedora_Item::ingest_new_item('islandora:root', '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', 'islandora_repository') . '/collection_policies/COLLECTION-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X'); + $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', 'islandora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); + $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:root\">islandora:root</a>."), 'message'); } catch (exception $e) { @@ -1602,16 +1602,16 @@ function islandora_repository_demo_objects_form_submit($form, &$form_state) { $new_item = fedora_item::ingest_new_item('islandora:demos', 'A', 'Islandora Demo Collection'); $new_item->add_relationship('isMemberOfCollection', 'islandora:root'); $new_item->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI); - $cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/collection_policies/COLLECTION-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X'); + $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'); -// $cv = $new_item->add_datastream_from_file( drupal_get_path('module', 'islandora_repository') . '/collection_views/COLLECTION_VIEW.xml', 'COLLECTION_VIEW', 'Collection View.xml', 'text/xml', 'X'); - $tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); +// $cv = $new_item->add_datastream_from_file( drupal_get_path('module', 'fedora_repository') . '/collection_views/COLLECTION_VIEW.xml', 'COLLECTION_VIEW', 'Collection View.xml', 'text/xml', 'X'); + $tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); try { $new_item = Fedora_Item::ingest_new_item('islandora:pdf_collection', 'A', 'PDF Collection'); $new_item->add_relationship('isMemberOfCollection', 'islandora:demos'); $new_item->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI); - $cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/collection_policies/PDF-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X'); - $tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/images/Crystal_Clear_mimetype_pdf.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); + $cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/PDF-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X'); + $tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Crystal_Clear_mimetype_pdf.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:demos\">islandora:demos</a>."), 'message'); } catch (exception $e) { @@ -1620,20 +1620,20 @@ function islandora_repository_demo_objects_form_submit($form, &$form_state) { if (!empty($form_state['values']['demo_collections']['demo:SmileyStuff'])) { $smiley_stuff = new Fedora_Item('demo:SmileyStuff'); - $new_item = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/collection_views/SmileyStuff-COLLECTION_VIEW.xml', 'COLLECTION_VIEW', 'Collection View', 'text/xml', 'X'); + $new_item = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_views/SmileyStuff-COLLECTION_VIEW.xml', 'COLLECTION_VIEW', 'Collection View', 'text/xml', 'X'); $smiley_stuff->add_relationship('isMemberOfCollection', 'info:fedora/islandora:demos'); - $tn = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/images/smileytn.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); - $cp = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/collection_policies/JPG-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy.xml', 'application/xml', 'X'); + $tn = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/smileytn.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); + $cp = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/JPG-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy.xml', 'application/xml', 'X'); $cm = new Fedora_Item('demo:DualResImage'); try { - $cmstream = $cm->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/content_models/STANDARD JPG.xml', 'ISLANDORACM', 'Content Model.xml', 'application/xml', 'X'); + $cmstream = $cm->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/STANDARD JPG.xml', 'ISLANDORACM', 'Content Model.xml', 'application/xml', 'X'); } catch (exception $e) { } $dual_res_image_collection_cmodel = new Fedora_Item('demo:DualResImageCollection'); try { - $cmstream = $dual_res_image_collection_cmodel->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X'); + $cmstream = $dual_res_image_collection_cmodel->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X'); drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/demo:SmileyStuff\">demo:SmileyStuff</a> collection view."), 'message'); } catch (exception $e) { @@ -1645,14 +1645,14 @@ function islandora_repository_demo_objects_form_submit($form, &$form_state) { foreach (array('islandora_jp2Sdep-slideCModel.xml', 'islandora_mods2htmlSdef.xml', 'islandora_mods2htmlSdep.xml', 'islandora_slideCModel.xml', 'islandora_viewerSdep-slideCModel.xml', 'ilives_jp2Sdef.xml', 'ilives_viewerSdef.xml') as $foxml_file) { try { - $item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'islandora_repository') . '/content_models/' . $foxml_file); + $item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/' . $foxml_file); } catch (exception $e) { $error .= " - Problem ingesting $foxml_file"; } } try { - $item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'islandora_repository') . '/content_models/islandora_largeimages.xml'); - $tn = $item->add_datastream_from_file(drupal_get_path('module', 'islandora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); + $item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/islandora_largeimages.xml'); + $tn = $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:largeimages\">islandora:largeimages</a>."), 'message'); } catch (exception $e) { $error .= " - Problem ingesting islandora:largeimages collection"; @@ -1669,12 +1669,12 @@ function islandora_repository_demo_objects_form_submit($form, &$form_state) { * fedora repository required fedora objects * @return type */ -function islandora_repository_required_fedora_objects() { +function fedora_repository_required_fedora_objects() { // array( 'path-to-foxml-file', 'pid', 'dsid', 'path-to-datastream-file', int dsversion, boolean required) - $module_path = drupal_get_path('module', 'islandora_repository'); + $module_path = drupal_get_path('module', 'fedora_repository'); return array( - 'islandora_repository' => array( - 'module' => 'islandora_repository', + 'fedora_repository' => array( + 'module' => 'fedora_repository', 'title' => 'Islandora Core', 'objects' => array( array( @@ -1710,10 +1710,10 @@ function islandora_repository_required_fedora_objects() { /** * Functions to create a time selector form element type. */ -function islandora_repository_elements() { - $type['islandora_repository_time'] = array( +function fedora_repository_elements() { + $type['fedora_repository_time'] = array( "#input" => TRUE, - "#process" => array("islandora_repository_expand_time"), + "#process" => array("fedora_repository_expand_time"), ); return $type; @@ -1724,7 +1724,7 @@ function islandora_repository_elements() { * @param type $element * @return string */ -function islandora_repository_expand_time($element) { +function fedora_repository_expand_time($element) { // Default to current time, check default_value but set value so that if // default value is present it will override value if (empty($element['#default_value'])) { @@ -1767,7 +1767,7 @@ function islandora_repository_expand_time($element) { * @param type $element * @return type */ -function islandora_repository_time($element) { +function fedora_repository_time($element) { $output = '<div class="container-inline">' . $element['#children'] . '</div>'; return theme('form_element', $element, $output); } @@ -1777,7 +1777,7 @@ function islandora_repository_time($element) { * @param type $element * @return type */ -function theme_islandora_repository_time($element) { +function theme_fedora_repository_time($element) { $output = '<div class="container-inline">' . $element['#children'] . '</div>'; return theme('form_element', $element, $output); } @@ -1788,9 +1788,9 @@ function theme_islandora_repository_time($element) { * fedora repository remove item from basket * @param type $pid */ -function islandora_repository_remove_item_from_basket($pid) { +function fedora_repository_remove_item_from_basket($pid) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $pids = empty($_SESSION['basket']['processed']) ? array() : $_SESSION['basket']['processed']; $objectHelper = new ObjectHelper(); @@ -1804,7 +1804,7 @@ function islandora_repository_remove_item_from_basket($pid) { if (!empty($cpids)) { // there are children foreach ($cpids as $child_pid => $value) { // remove child item from basket recursively - islandora_repository_remove_item_from_basket($child_pid); + fedora_repository_remove_item_from_basket($child_pid); } } } @@ -1813,14 +1813,14 @@ function islandora_repository_remove_item_from_basket($pid) { * fedora repository basket * @return type */ -function islandora_repository_basket() { - $pids = _islandora_repository_get_basket_pids(); - $output = drupal_get_form('islandora_repository_basket_form', $pids); +function fedora_repository_basket() { + $pids = _fedora_repository_get_basket_pids(); + $output = drupal_get_form('fedora_repository_basket_form', $pids); return $output; } -function islandora_repository_basket_form($form_state, $pids) { +function fedora_repository_basket_form($form_state, $pids) { $form = array(); if (!empty($pids)) { @@ -1874,7 +1874,7 @@ function islandora_repository_basket_form($form_state, $pids) { * @param type $form * @return string */ -function theme_islandora_repository_basket_form($form) { +function theme_fedora_repository_basket_form($form) { $header = array( theme('table_select_header_cell'), t('PID'), @@ -1909,7 +1909,7 @@ function theme_islandora_repository_basket_form($form) { * @param type $form * @param type $form_state */ -function islandora_repository_basket_form_validate($form, &$form_state) { +function fedora_repository_basket_form_validate($form, &$form_state) { } @@ -1920,13 +1920,13 @@ function islandora_repository_basket_form_validate($form, &$form_state) { * @param type $form_state * @return type */ -function islandora_repository_basket_form_submit($form, &$form_state) { +function fedora_repository_basket_form_submit($form, &$form_state) { if ($form_state['values']['op'] == $form_state['values']['remove_submit']) { $pids = $form_state['clicked_button']['#post']['remove']; if (isset($pids)) { foreach ($pids as $pid) { - islandora_repository_remove_from_basket($pid); + fedora_repository_remove_from_basket($pid); } drupal_set_message(t("Selected objects removed")); return; @@ -1934,14 +1934,14 @@ function islandora_repository_basket_form_submit($form, &$form_state) { } if ($form_state['values']['op'] == $form_state['values']['remove_all']) { - _islandora_repository_empty_basket(); + _fedora_repository_empty_basket(); drupal_set_message(t("Basket emptied")); return; } if ($form_state['values']['op'] == $form_state['values']['submit_all']) { $msg = t("All objects exported to staging area"); - $pids = _islandora_repository_get_basket_pids(); + $pids = _fedora_repository_get_basket_pids(); } elseif ($form_state['values']['op'] == $form_state['values']['submit']) { $msg = t("Selected objects exported to staging area"); @@ -1960,7 +1960,7 @@ function islandora_repository_basket_form_submit($form, &$form_state) { return FALSE; } - module_load_include('inc', 'islandora_repository', 'api/fedora_export'); + module_load_include('inc', 'fedora_repository', 'api/fedora_export'); foreach ($pids as $pid => $arr) { $objects_dir = $export_dir . '/objects/' . $pid; @@ -1977,7 +1977,7 @@ function islandora_repository_basket_form_submit($form, &$form_state) { $msg .= ":<br/>" . implode("<br/>", $log); drupal_set_message($msg, $success ? 'info' : 'error'); -//_islandora_repository_empty_basket(); +//_fedora_repository_empty_basket(); } else { drupal_set_message(t("No objects selected or basket empty"), 'error'); @@ -1991,7 +1991,7 @@ function islandora_repository_basket_form_submit($form, &$form_state) { * * @return type */ -function _islandora_repository_get_basket_pids() { +function _fedora_repository_get_basket_pids() { // Set empty defaults if basket elements are missing $_SESSION['basket'] = isset($_SESSION['basket']) ? $_SESSION['basket'] : array('processed' => array(), 'unprocessed' => array()); @@ -2000,7 +2000,7 @@ function _islandora_repository_get_basket_pids() { $pids = empty($_SESSION['basket']['processed']) ? array() : $_SESSION['basket']['processed']; - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $ob = new ObjectHelper(); foreach ($_SESSION['basket']['unprocessed'] as $pid) { // Check if the pid already exists in the tree @@ -2021,7 +2021,7 @@ function _islandora_repository_get_basket_pids() { /** * fedora repository empty basket */ -function _islandora_repository_empty_basket() { +function _fedora_repository_empty_basket() { unset($_SESSION['basket']); } @@ -2031,7 +2031,7 @@ function _islandora_repository_empty_basket() { * @param type $warn * @param type $searchResultsFlag */ -function islandora_repository_add_to_basket($pid, $warn = TRUE, $searchResultsFlag = FALSE) { +function fedora_repository_add_to_basket($pid, $warn = TRUE, $searchResultsFlag = FALSE) { if ($warn && _is_added_to_basket($pid)) { drupal_set_message(t("Object already in basket")); } @@ -2054,7 +2054,7 @@ function islandora_repository_add_to_basket($pid, $warn = TRUE, $searchResultsFl * @param type $pid * @return type */ -function islandora_repository_remove_from_basket($pid) { +function fedora_repository_remove_from_basket($pid) { if (isset($_SESSION['basket']['unprocessed'][$pid])) { unset($_SESSION['basket']['unprocessed'][$pid]); } @@ -2110,8 +2110,8 @@ function _is_added_to_basket($pid, $account = NULL) { * @param type $file * @return type */ -function islandora_repository_display_schema($file) { - $path = drupal_get_path('module', 'islandora_repository'); +function fedora_repository_display_schema($file) { + $path = drupal_get_path('module', 'fedora_repository'); if (strtolower(substr($file, -3)) == 'xsd' && file_exists($path . '/' . $file)) { drupal_goto($path . '/' . $file); } @@ -2127,9 +2127,9 @@ function islandora_repository_display_schema($file) { * @param type $context * @return type */ -function islandora_repository_batch_reingest_object($object, &$context) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); +function fedora_repository_batch_reingest_object($object, &$context) { + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (!empty($object) && is_array($object)) { $pid = $object['pid']; if (!valid_pid($pid)) { @@ -2195,7 +2195,7 @@ function islandora_repository_batch_reingest_object($object, &$context) { * @param string $datastream_file * @return int, or NULL if no version attribute was found. */ -function islandora_repository_get_islandora_datastream_version($item = NULL, $dsid = NULL, $datastream_file = NULL) { +function fedora_repository_get_islandora_datastream_version($item = NULL, $dsid = NULL, $datastream_file = NULL) { $return = NULL; if (isset($item)) { $doc = simplexml_load_string($item->get_datastream_dissemination($dsid)); @@ -2221,9 +2221,9 @@ function islandora_repository_get_islandora_datastream_version($item = NULL, $ds * @param type $solution_packs * @return string */ -function theme_islandora_repository_solution_packs_list($solution_packs) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); +function theme_fedora_repository_solution_packs_list($solution_packs) { + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $output = ''; $header = array(); $rows = array(); @@ -2240,11 +2240,11 @@ function theme_islandora_repository_solution_packs_list($solution_packs) { * @param string $form_id * @return array */ -function islandora_repository_forms($form_id) { +function fedora_repository_forms($form_id) { $forms = array(); - if (strpos($form_id, 'islandora_repository_solution_pack_form_') === 0) { + if (strpos($form_id, 'fedora_repository_solution_pack_form_') === 0) { $forms[$form_id] = array( - 'callback' => 'islandora_repository_solution_pack_form', + 'callback' => 'fedora_repository_solution_pack_form', ); } return $forms; diff --git a/islandora_repository.solutionpacks.inc b/fedora_repository.solutionpacks.inc similarity index 84% rename from islandora_repository.solutionpacks.inc rename to fedora_repository.solutionpacks.inc index 633d28fe..de4ce137 100644 --- a/islandora_repository.solutionpacks.inc +++ b/fedora_repository.solutionpacks.inc @@ -20,7 +20,7 @@ * * Datastreams which don't have this element are assumed to be at version 0. */ -function islandora_repository_solution_packs_page() { +function fedora_repository_solution_packs_page() { $enabled_solution_packs = module_invoke_all('required_fedora_objects'); $output = ''; foreach ($enabled_solution_packs as $solution_pack_module => $solution_pack_info) { @@ -35,7 +35,7 @@ function islandora_repository_solution_packs_page() { break; } } - $output .= drupal_get_form('islandora_repository_solution_pack_form_' . $solution_pack_module, $solution_pack_module, $solution_pack_name, $objects); + $output .= drupal_get_form('fedora_repository_solution_pack_form_' . $solution_pack_module, $solution_pack_module, $solution_pack_name, $objects); } return $output; @@ -45,9 +45,9 @@ function islandora_repository_solution_packs_page() { * Check for installed objects and add a 'Update' or 'Install' button if some objects are missing. * @param array $solution_pack */ -function islandora_repository_solution_pack_form(&$form_state, $solution_pack_module, $solution_pack_name, $objects = array()) { +function fedora_repository_solution_pack_form(&$form_state, $solution_pack_module, $solution_pack_name, $objects = array()) { // Check each object to see if it is in the repository. - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); global $base_path; $needs_update = FALSE; $needs_install = FALSE; @@ -111,8 +111,8 @@ function islandora_repository_solution_pack_form(&$form_state, $solution_pack_mo } if (isset($ds['dsversion'])) { // Check if the datastream is versioned and needs updating. - $installed_version = islandora_repository_get_islandora_datastream_version($item, $ds['dsid']); - $available_version = islandora_repository_get_islandora_datastream_version(NULL, NULL, $ds['datastream_file']); + $installed_version = fedora_repository_get_islandora_datastream_version($item, $ds['dsid']); + $available_version = fedora_repository_get_islandora_datastream_version(NULL, NULL, $ds['datastream_file']); if ($available_version > $installed_version) { $needs_update = TRUE; $object_status = 'Out of date'; @@ -151,25 +151,25 @@ function islandora_repository_solution_pack_form(&$form_state, $solution_pack_mo ); $form['#submit'] = array( - 'islandora_repository_solution_pack_form_submit', + 'fedora_repository_solution_pack_form_submit', ); return $form; } -function islandora_repository_solution_pack_form_submit($form, &$form_state) { +function fedora_repository_solution_pack_form_submit($form, &$form_state) { $what = $form_state; $module_name = $form_state['values']['solution_pack_module']; $solution_pack_info = call_user_func($module_name . '_required_fedora_objects'); $batch = array( 'title' => t('Installing / updating solution pack objects'), - 'file' => drupal_get_path('module', 'islandora_repository') . '/islandora_repository.module', + 'file' => drupal_get_path('module', 'fedora_repository') . '/fedora_repository.module', 'operations' => array(), ); foreach ($solution_pack_info[$module_name]['objects'] as $object) { // Add this object to the batch job queue. - $batch['operations'][] = array('islandora_repository_batch_reingest_object', array($object)); + $batch['operations'][] = array('fedora_repository_batch_reingest_object', array($object)); } batch_set($batch); } diff --git a/formClass.inc b/formClass.inc index a7abe947..af0dc218 100644 --- a/formClass.inc +++ b/formClass.inc @@ -24,15 +24,15 @@ class formClass { function createMenu() { $items = array(); - $items['admin/settings/islandora_repository'] = array( + $items['admin/settings/fedora_repository'] = array( 'title' => t('Islandora Configure'), 'description' => t('Enter the Islandora Collection information here'), 'page callback' => 'drupal_get_form', - 'page arguments' => array('islandora_repository_admin'), + 'page arguments' => array('fedora_repository_admin'), 'access arguments' => array('administer site configuration'), 'type' => MENU_NORMAL_ITEM, ); - $items['admin/settings/islandora_repository/collection'] = array( + $items['admin/settings/fedora_repository/collection'] = array( 'title' => t('Collection list'), 'description' => t('Enter the Islandora collection information here.'), 'access arguments' => array('administer site configuration'), @@ -40,18 +40,18 @@ class formClass { 'weight' => 0, ); - $items['admin/settings/islandora_repository/demoobjects'] = array( + $items['admin/settings/fedora_repository/demoobjects'] = array( 'title' => t('Solution Packs'), 'description' => t('Install content models and collections required by installed solution packs.'), - 'page callback' => 'islandora_repository_solution_packs_page', + 'page callback' => 'fedora_repository_solution_packs_page', 'access arguments' => array('add fedora datastreams'), - 'file' => 'islandora_repository.solutionpacks.inc', + 'file' => 'fedora_repository.solutionpacks.inc', 'type' => MENU_LOCAL_TASK, ); $items['islandoracm.xsd'] = array( 'title' => t('Islandora Content Model XML Schema Definition'), - 'page callback' => 'islandora_repository_display_schema', + 'page callback' => 'fedora_repository_display_schema', 'page arguments' => array('islandoracm.xsd'), 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection'), @@ -59,7 +59,7 @@ class formClass { $items['collection_policy.xsd'] = array( 'title' => t('Islandora Content Model XML Schema Definition'), - 'page callback' => 'islandora_repository_display_schema', + 'page callback' => 'fedora_repository_display_schema', 'page arguments' => array('collection_policy.xsd'), 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection'), @@ -70,7 +70,7 @@ class formClass { 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection'), ); - $repository_title = variable_get('islandora_repository_title', 'Digital repository'); + $repository_title = variable_get('fedora_repository_title', 'Digital repository'); if (trim($repository_title) != '') { $respository_title = t($repository_title); } @@ -100,7 +100,7 @@ class formClass { $items['fedora/repository/editmetadata'] = array( 'title' => t('Edit metadata'), - 'page callback' => 'islandora_repository_edit_qdc_page', + 'page callback' => 'fedora_repository_edit_qdc_page', // 'page arguments' => array(1), //'type' => MENU_LOCAL_TASK, 'type' => MENU_CALLBACK, @@ -109,21 +109,21 @@ class formClass { $items['fedora/repository/purgeStream'] = array( 'title' => t('Purge data stream'), - 'page callback' => 'islandora_repository_purge_stream', + 'page callback' => 'fedora_repository_purge_stream', 'type' => MENU_CALLBACK, 'access arguments' => array('purge objects and datastreams') ); $items['fedora/repository/replaceStream'] = array( 'title' => t('Replace Stream'), - 'page callback' => 'islandora_repository_replace_stream', + 'page callback' => 'fedora_repository_replace_stream', 'type' => MENU_CALLBACK, 'access arguments' => array('add fedora datastreams'), ); $items['fedora/repository/purgeObject'] = array( 'title' => t('Purge object'), - 'page callback' => 'islandora_repository_purge_object', + 'page callback' => 'fedora_repository_purge_object', // 'type' => MENU_LOCAL_TASK, 'type' => MENU_CALLBACK, 'access arguments' => array('purge objects and datastreams') @@ -147,21 +147,21 @@ class formClass { //new for mnpl****************************************** $items['fedora/repository/mnpl_advanced_search'] = array( 'title' => t('Repository advanced search'), - 'page callback' => 'islandora_repository_mnpl_advanced_search', + 'page callback' => 'fedora_repository_mnpl_advanced_search', 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection') ); $items['fedora/ingestObject'] = array( 'title' => t('Ingest object'), - 'page callback' => 'islandora_repository_ingest_object', + 'page callback' => 'fedora_repository_ingest_object', 'type' => MENU_CALLBACK, 'access arguments' => array('add fedora datastreams') ); $items['fedora/repository/list_terms'] = array( 'title' => t('List terms'), - 'page callback' => 'islandora_repository_list_terms', + 'page callback' => 'fedora_repository_list_terms', 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection') ); @@ -170,25 +170,25 @@ class formClass { $items['fedora/basket'] = array( 'title' => t('Fedora Basket'), 'description' => t('View and download objects added to your basket'), - 'page callback' => 'islandora_repository_basket', + 'page callback' => 'fedora_repository_basket', 'access arguments' => array('view fedora collection'), 'type' => MENU_CALLBACK, ); $items['fedora/repository/addToBasket'] = array( - 'page callback' => 'islandora_repository_add_to_basket', + 'page callback' => 'fedora_repository_add_to_basket', 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection'), ); $items['fedora/repository/removeFromBasket'] = array( - 'page callback' => 'islandora_repository_remove_from_basket', + 'page callback' => 'fedora_repository_remove_from_basket', 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection'), ); $items['fedora/repository/add_search_results_to_basket'] = array( - 'page callback' => 'islandora_repository_add_search_results_to_basket', + 'page callback' => 'fedora_repository_add_search_results_to_basket', 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection'), ); @@ -205,21 +205,21 @@ class formClass { drupal_set_message(t('You must be a site administrator to edit the Fedora collecitons list.'), 'error'); return; } - module_load_include('inc', 'islandora_repository', 'api/fedora_utils'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $form = array(); - $form['islandora_repository_name'] = array( + $form['fedora_repository_name'] = array( '#type' => 'textfield', '#title' => t('Root Collection Name'), - '#default_value' => variable_get('islandora_repository_name', 'Islandora demos collection'), + '#default_value' => variable_get('fedora_repository_name', 'Islandora demos collection'), '#description' => t('The Name of the Root Collection Object'), '#required' => TRUE, '#weight' => -20 ); - $form['islandora_repository_pid'] = array( + $form['fedora_repository_pid'] = array( '#type' => 'textfield', '#title' => t('Root Collection PID'), - '#default_value' => variable_get('islandora_repository_pid', 'islandora:root'), + '#default_value' => variable_get('fedora_repository_pid', 'islandora:root'), '#description' => t('The PID of the Root Collection Object'), '#required' => TRUE, '#weight' => -18 @@ -235,10 +235,10 @@ class formClass { ); - $form['islandora_repository_url'] = array( + $form['fedora_repository_url'] = array( '#type' => 'textfield', '#title' => t('Fedora RISearch URL'), - '#default_value' => variable_get('islandora_repository_url', 'http://localhost:8080/fedora/risearch'), + '#default_value' => variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'), '#description' => t('The url of the Fedora server'), '#required' => TRUE, '#weight' => -14 ); @@ -296,10 +296,10 @@ class formClass { '#weight' => 0 ); } - $form['islandora_repository_title'] = array( + $form['fedora_repository_title'] = array( '#type' => 'textfield', '#title' => t('Digital Repository Title'), - '#default_value' => variable_get('islandora_repository_title', 'Digital Repository'), + '#default_value' => variable_get('fedora_repository_title', 'Digital Repository'), '#description' => t('The title displayed when viewing collections and objects in /fedora/repository. Leave blank to display no title. Note that the menus must be rebuilt after changing this variable.'), ); $form['advanced'] = array( @@ -432,7 +432,7 @@ class formClass { * @return type */ function can_ingest_here($collection_pid) { - module_load_include('inc', 'islandora_repository', 'SecurityClass'); + module_load_include('inc', 'fedora_repository', 'SecurityClass'); $securityClass = new SecurityClass(); return $securityClass->canIngestHere($collection_pid); } @@ -447,7 +447,7 @@ class formClass { drupal_set_message(t('You do not have permission to ingest.'), 'error'); return FALSE; } - module_load_include('inc', 'islandora_repository', 'SecurityClass'); + module_load_include('inc', 'fedora_repository', 'SecurityClass'); $security_class = new SecurityClass(); if (!$security_class->canIngestHere($collection_pid)) { // Queries the collection object for a child security datastream and if found parses it @@ -507,7 +507,7 @@ class formClass { ), 'submit' => array( '#type' => 'submit', - '#submit' => array('islandora_repository_ingest_form_submit'), + '#submit' => array('fedora_repository_ingest_form_submit'), '#value' => t('Next') ), ); @@ -523,7 +523,7 @@ class formClass { * @return array */ function createQDCIngestFormPageTwo($collection_pid, $collection_label, array &$form_state) { - module_load_include('inc', 'islandora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); $form = array(); $content_model_pid = ContentModel::getPidFromIdentifier($form_state['values']['models']); $content_model_dsid = ContentModel::getDSIDFromIdentifier($form_state['values']['models']); @@ -541,7 +541,7 @@ class formClass { ); $form['submit'] = array( '#type' => 'submit', - '#submit' => array('islandora_repository_ingest_form_submit'), + '#submit' => array('fedora_repository_ingest_form_submit'), '#value' => t('Ingest') ); } @@ -558,7 +558,7 @@ class formClass { * @return array */ function createQDCIngestForm($collection_pid, $collection_label, array &$form_state) { - module_load_include('inc', 'islandora_repository', 'CollectionPolicy'); + module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); $form_state['storage']['step'] = empty($form_state['storage']['step']) ? 1 : $form_state['storage']['step']; if ($form_state['storage']['step'] == 1) { return $this->createQDCIngestFormPageOne($collection_pid, $collection_label, $form_state); @@ -603,9 +603,9 @@ class formClass { //dump_vars($form_state); // Populate the list of datastream IDs. - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'ContentModel'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $obj_helper = new ObjectHelper(); $content_models = $obj_helper->get_content_models_list($pid); diff --git a/islandoracm.xsd b/islandoracm.xsd index 21ab6661..bce83136 100644 --- a/islandoracm.xsd +++ b/islandoracm.xsd @@ -48,14 +48,14 @@ </xsd:complexType> <xsd:complexType name="form_builder_methodType"> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/> - <xsd:attribute name="module" type="xsd:normalizedString" default="islandora_repository"/> + <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/> <xsd:attribute name="method" type="xsd:normalizedString" use="required"/> <xsd:attribute name="handler" type="xsd:normalizedString" use="required"/> </xsd:complexType> <xsd:complexType name="edit_metadata_methodType"> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/> - <xsd:attribute name="module" type="xsd:normalizedString" default="islandora_repository"/> + <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/> <xsd:attribute name="method" type="xsd:normalizedString" use="required"/> <xsd:attribute name="handler" type="xsd:normalizedString" use="required"/> @@ -118,7 +118,7 @@ </xsd:all> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/> - <xsd:attribute name="module" type="xsd:normalizedString" default="islandora_repository"/> + <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/> <xsd:attribute name="method" type="xsd:normalizedString" use="required"/> <xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/> @@ -149,7 +149,7 @@ <xsd:element name="parameters" type="parametersType" minOccurs="0"/> </xsd:all> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/> - <xsd:attribute name="module" type="xsd:normalizedString" default="islandora_repository"/> + <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/> <xsd:attribute name="method" type="xsd:normalizedString" use="required"/> <xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/> @@ -171,7 +171,7 @@ <xsd:complexContent> <xsd:restriction base="xsd:anyType"> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/> - <xsd:attribute name="module" type="xsd:normalizedString" default="islandora_repository"/> + <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/> <xsd:attribute name="method" type="xsd:normalizedString" use="required"/> <xsd:attribute name="default" type="xsd:boolean" default="false"/> diff --git a/plugins/CollectionFormBuilder.inc b/plugins/CollectionFormBuilder.inc index 6d901b21..a385aa26 100644 --- a/plugins/CollectionFormBuilder.inc +++ b/plugins/CollectionFormBuilder.inc @@ -7,7 +7,7 @@ * Collection Form Builder */ -module_load_include('inc', 'islandora_repository', 'plugins/FormBuilder'); +module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); /** * implements methods from content model ingest form xml @@ -32,7 +32,7 @@ class CollectionFormBuilder extends FormBuilder { * @param type $rootElement */ function createFedoraDataStreams($form_values, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); global $base_url; $mimetype = new MimeClass(); diff --git a/plugins/DarwinCore.inc b/plugins/DarwinCore.inc index 814e9dfb..5ab525b6 100644 --- a/plugins/DarwinCore.inc +++ b/plugins/DarwinCore.inc @@ -21,7 +21,7 @@ class DarwinCore { * @param type $item */ function __construct($item = NULL) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); if (!empty($item)) { $this->owner = $item; if (array_key_exists('DARWIN_CORE', $item->get_datastreams_list_as_array())) { @@ -200,7 +200,7 @@ class DarwinCore { * @param type $form_values */ public function handleForm($form_values) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); global $user; //$new_item = Fedora_Item::ingest_new_item($form_values['pid'], 'A', $form_values['dwc:institutionCode'].':'.$form_values['dwc:collectionCode'].':'.$form_values['dwc:catalogNumber'], $user->name); //$new_item->add_datastream_from_string($this->darwinCoreXML, 'DARWIN_CORE', 'Darwin Core Metadata', 'text/xml', 'X'); @@ -248,8 +248,8 @@ class DarwinCore { */ public function asHTML() { $path = drupal_get_path('module', 'Fedora_Repository'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); $xmlstr = $this->darwinCoreXML; html_entity_decode($xmlstr); diff --git a/plugins/DemoFormBuilder.inc b/plugins/DemoFormBuilder.inc index d2d7f738..ccc74ba2 100644 --- a/plugins/DemoFormBuilder.inc +++ b/plugins/DemoFormBuilder.inc @@ -6,7 +6,7 @@ * @file * */ -module_load_include('inc', 'islandora_repository', 'plugins/FormBuilder'); +module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); /** * implements methods from content model ingest form xml @@ -19,7 +19,7 @@ class DemoFormBuilder extends FormBuilder { * Constructor */ function DemoFormBuilder() { - module_load_include('inc', 'islandora_repository', 'plugins/FormBuilder'); + module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); } @@ -31,7 +31,7 @@ class DemoFormBuilder extends FormBuilder { * @param type $rootElement */ function createFedoraDataStreams($form_values, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); global $base_url; $mimetype = new MimeClass(); $server = NULL; diff --git a/plugins/DocumentConverter.inc b/plugins/DocumentConverter.inc index e64517c6..f258441a 100644 --- a/plugins/DocumentConverter.inc +++ b/plugins/DocumentConverter.inc @@ -32,7 +32,7 @@ class DocumentConverter { * @return string */ function convert($parameterArray = NULL, $dsid, $file, $output_ext) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); #debug: #drupal_set_message("Sending $file to ". $this->converter_service_url ." for convertsion to $output_ext", 'status'); diff --git a/plugins/Exiftool.inc b/plugins/Exiftool.inc index 5db3d600..c0b98981 100644 --- a/plugins/Exiftool.inc +++ b/plugins/Exiftool.inc @@ -22,7 +22,7 @@ class Exiftool { function __construct($pid) { //drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); $this->pid = $pid; - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $this->item = new Fedora_Item($this->pid); } diff --git a/plugins/FedoraObjectDetailedContent.inc b/plugins/FedoraObjectDetailedContent.inc index de8d10a7..855d508c 100644 --- a/plugins/FedoraObjectDetailedContent.inc +++ b/plugins/FedoraObjectDetailedContent.inc @@ -19,7 +19,7 @@ class FedoraObjectDetailedContent { * @param type $pid */ function __construct($pid = '') { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); if (!empty($pid)) { $this->pid = $pid; @@ -36,9 +36,9 @@ class FedoraObjectDetailedContent { global $user; $objectHelper = new ObjectHelper(); $tabset = array(); - $show_purge_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'islandora_repository_purge_object_form'); - $show_edit_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'islandora_repository_edit_qdc_form'); - $purge_form = drupal_get_form('islandora_repository_purge_object_form', $this->pid, check_plain(substr(request_uri(), strlen(base_path())))); + $show_purge_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_purge_object_form'); + $show_edit_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_edit_qdc_form'); + $purge_form = drupal_get_form('fedora_repository_purge_object_form', $this->pid, check_plain(substr(request_uri(), strlen(base_path())))); $tabset['fedora_object_details'] = array( '#type' => 'tabpage', @@ -59,8 +59,8 @@ class FedoraObjectDetailedContent { '#content' => $dc_html . $ds_list . $purge_form, ); - if (islandora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { - $editform = drupal_get_form('islandora_repository_edit_qdc_form', $this->pid, 'DC'); + if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { + $editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DC'); $tabset['fedora_object_details']['tabset']['edit'] = array( '#type' => 'tabpage', '#title' => t('Edit'), diff --git a/plugins/Flv.inc b/plugins/Flv.inc index d1dc03d3..d8f2b06b 100644 --- a/plugins/Flv.inc +++ b/plugins/Flv.inc @@ -138,7 +138,7 @@ class FormBuilder { * @param type $rootElement */ function createFedoraDataStreams($form_values, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); $mimetype = new MimeClass(); $server = NULL; $file = $form_values['ingest-file-location']; diff --git a/plugins/FlvFormBuilder.inc b/plugins/FlvFormBuilder.inc index f9d13e56..c259328c 100644 --- a/plugins/FlvFormBuilder.inc +++ b/plugins/FlvFormBuilder.inc @@ -6,7 +6,7 @@ * @file * FLVFormBuilder */ -module_load_include('inc', 'islandora_repository', 'plugins/FormBuilder'); +module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); /** * implements methods from content model ingest form xml @@ -19,7 +19,7 @@ class FlvFormBuilder extends FormBuilder { * Constructor */ function FlvFormBuilder() { - module_load_include('inc', 'islandora_repository', 'plugins/FormBuilder'); + module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); } @@ -32,7 +32,7 @@ class FlvFormBuilder extends FormBuilder { */ function createFedoraDataStreams($form_values, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); global $base_url; $mimetype = new MimeClass(); $server = NULL; diff --git a/plugins/FormBuilder.inc b/plugins/FormBuilder.inc index 695fa2c6..382733b4 100644 --- a/plugins/FormBuilder.inc +++ b/plugins/FormBuilder.inc @@ -84,7 +84,7 @@ class FormBuilder { * @return type */ function createPolicy($collectionPid, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $objectHelper = new ObjectHelper(); $dsid = 'CHILD_SECURITY'; @@ -135,8 +135,8 @@ class FormBuilder { * @return type */ function handleQDCForm($form_values) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'CollectionPolicy'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); $dom = new DomDocument("1.0", "UTF-8"); $dom->formatOutput = TRUE; @@ -196,7 +196,7 @@ class FormBuilder { * @param type $rootElement */ function createFedoraDataStreams($form_values, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); global $base_url; $mimetype = new MimeClass(); $server = NULL; diff --git a/plugins/ImageManipulation.inc b/plugins/ImageManipulation.inc index c67e4911..8f97ab94 100644 --- a/plugins/ImageManipulation.inc +++ b/plugins/ImageManipulation.inc @@ -16,7 +16,7 @@ class ImageManipulation { * Constructor */ function ImageManipulation() { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); } /** diff --git a/plugins/ModsFormBuilder.inc b/plugins/ModsFormBuilder.inc index 26662cf2..d49869e2 100644 --- a/plugins/ModsFormBuilder.inc +++ b/plugins/ModsFormBuilder.inc @@ -6,7 +6,7 @@ * @file * ModsFormBuilder class */ -module_load_include('inc', 'islandora_repository', 'plugins/FormBuilder'); +module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); /** * ModsFormBuilder class ??? @@ -25,8 +25,8 @@ class ModsFormBuilder extends FormBuilder { function __construct($pid=NULL) { parent::__construct(); if ($pid !== NULL) { - module_load_include('inc', 'islandora_repository', 'ContentModel'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $this->pid = $pid; $this->cm = ContentModel::loadFromObject($pid); @@ -241,7 +241,7 @@ class ModsFormBuilder extends FormBuilder { $form['submit'] = array( '#type' => 'submit', - '#submit' => array('islandora_repository_edit_qdc_form_submit'), + '#submit' => array('fedora_repository_edit_qdc_form_submit'), '#value' => 'Save Metadata' ); @@ -256,8 +256,8 @@ class ModsFormBuilder extends FormBuilder { * @param &$form_state */ function handleModsForm(&$form_values, &$form_state) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'CollectionPolicy'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); $form_state['storage']['people'] = NULL; //clears out old entities for the next run of the formbuilder. @@ -329,7 +329,7 @@ class ModsFormBuilder extends FormBuilder { * @param &$rootElement */ function createCollectionPolicy($form_values, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $model = new fedora_item($form_values['content_model_pid']); $ds_list = $model->get_datastreams_list_as_array(); if (isset($ds_list['COLLECTION_POLICY_TMPL'])) { @@ -364,7 +364,7 @@ class ModsFormBuilder extends FormBuilder { * @param &$rootElement */ function createWorkflowStream($form_values, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $model = new fedora_item($form_values['content_model_pid']); $ds_list = $model->get_datastreams_list_as_array(); if (isset($ds_list['WORKFLOW_TMPL'])) { diff --git a/plugins/PersonalCollectionClass.inc b/plugins/PersonalCollectionClass.inc index b4742711..68ae5528 100644 --- a/plugins/PersonalCollectionClass.inc +++ b/plugins/PersonalCollectionClass.inc @@ -120,7 +120,7 @@ class PersonalCollectionClass { * @return type */ function createPolicyStream($user, $dom, $rootElement) { - module_load_include('inc', 'islandora_repository', 'SecurityClass'); + module_load_include('inc', 'fedora_repository', 'SecurityClass'); $securityClass = new SecurityClass(); $policyStreamDoc = $securityClass->createPersonalPolicy($user); diff --git a/plugins/QtFormBuilder.php b/plugins/QtFormBuilder.php index 954f28e4..28645d6b 100644 --- a/plugins/QtFormBuilder.php +++ b/plugins/QtFormBuilder.php @@ -6,7 +6,7 @@ * @file * QTFormBuilder class */ -module_load_include('inc', 'islandora_repository', 'plugins/FormBuilder'); +module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); /** * Implements methods from content model ingest form xml @@ -30,7 +30,7 @@ class QtFormBuilder extends FormBuilder { * @param type $rootElement */ function createFedoraDataStreams($form_values, &$dom, &$rootElement) { - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); global $base_url; $mimetype = new MimeClass(); $server = null; diff --git a/plugins/Refworks.inc b/plugins/Refworks.inc index 4f0d6fc3..592a7e99 100644 --- a/plugins/Refworks.inc +++ b/plugins/Refworks.inc @@ -7,7 +7,7 @@ * Refworks class */ -module_load_include('inc', 'islandora_repository', 'SecurityClass'); +module_load_include('inc', 'fedora_repository', 'SecurityClass'); /** * Refworks class ??? @@ -222,9 +222,9 @@ class Refworks { */ function handleForm(&$form_values) { $errorMessage = NULL; - module_load_include('inc', 'islandora_repository', 'CollectionClass'); - module_load_include('inc', 'islandora_repository', 'ContentModel'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'ContentModel'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $contentModelPid = ContentModel::getPidFromIdentifier($form_values['models']); $contentModelDsid = ContentModel::getDSIDFromIdentifier($form_values['models']); $collectionHelper = new CollectionClass(); @@ -238,7 +238,7 @@ class Refworks { $collection_item = new Fedora_Item($collection_pid); $this->collectionPolicyStream = $collection_item->get_datastream_dissemination('CHILD_SECURITY'); if (empty($this->collectionPolicyStream)) { - $this->collectionPolicyStream = file_get_contents(drupal_get_path('module', 'islandora_repository') . '/policies/noObjectEditPolicy.xml'); + $this->collectionPolicyStream = file_get_contents(drupal_get_path('module', 'fedora_repository') . '/policies/noObjectEditPolicy.xml'); } $success = 0; $errors = 0; @@ -388,7 +388,7 @@ class Refworks { */ function createFedoraDataStreams($form_values, &$dom, &$rootElement, $reference) { global $base_url; - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); $mimetype = new MimeClass(); $server = NULL; $this->createRomeoDataStream($dom, $rootElement); diff --git a/plugins/ShowStreamsInFieldSets.inc b/plugins/ShowStreamsInFieldSets.inc index efa1ab7e..77eada60 100644 --- a/plugins/ShowStreamsInFieldSets.inc +++ b/plugins/ShowStreamsInFieldSets.inc @@ -87,7 +87,7 @@ class ShowStreamsInFieldSets { global $base_url; global $base_path; global $user; - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $tabset = array(); @@ -105,7 +105,7 @@ class ShowStreamsInFieldSets { $tn_url = $base_url . '/fedora/repository/' . $item->pid . '/TN'; } else { - $tn_url = $base_path . drupal_get_path('module', 'islandora_repository') . '/images/Crystal_Clear_app_download_manager.png'; + $tn_url = $base_path . drupal_get_path('module', 'fedora_repository') . '/images/Crystal_Clear_app_download_manager.png'; } $dc_html = $objectHelper->getFormattedDC($item); @@ -117,8 +117,8 @@ class ShowStreamsInFieldSets { '#content' => $dl_link . $dc_html, ); - if (islandora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { - $editform = drupal_get_form('islandora_repository_edit_qdc_form', $this->pid, 'DC'); + if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { + $editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DC'); $tabset['first_tab']['tabs']['edit'] = array( '#type' => 'tabpage', '#title' => t('Edit'), @@ -142,7 +142,7 @@ class ShowStreamsInFieldSets { * @return type */ function showQdc() { - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $objectHelper = new ObjectHelper(); $content = $objectHelper->getQDC($this->pid); $collection_fieldset = array( @@ -161,7 +161,7 @@ class ShowStreamsInFieldSets { */ function showOBJLink() { global $base_url; - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $item = new Fedora_Item($this->pid); $streams = $item->get_datastreams_list_as_array(); return "<a href='" . $base_url . "/fedora/repository/" . $this->pid . "/OBJ/" . $streams['OBJ']['label'] . "'>" . $streams['OBJ']['label'] . "</a>"; @@ -172,8 +172,8 @@ class ShowStreamsInFieldSets { * @return type */ function showRefworks() { - $path = drupal_get_path('module', 'islandora_repository'); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + $path = drupal_get_path('module', 'fedora_repository'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $collectionHelper = new CollectionClass(); $xmlstr = $collectionHelper->getStream($this->pid, "refworks"); html_entity_decode($xmlstr); @@ -226,7 +226,7 @@ class ShowStreamsInFieldSets { */ function showRomeo($collapsed = FALSE) { $path = drupal_get_path('module', 'Fedora_Repository'); - module_load_include('inc', 'islandora_repository', 'CollectionClass'); + module_load_include('inc', 'fedora_repository', 'CollectionClass'); $collectionHelper = new CollectionClass(); $xmlstr = $collectionHelper->getStream($this->pid, "ROMEO", 0); diff --git a/plugins/islandora_imageapi.info b/plugins/fedora_imageapi.info similarity index 82% rename from plugins/islandora_imageapi.info rename to plugins/fedora_imageapi.info index 5519ad85..6a465a04 100644 --- a/plugins/islandora_imageapi.info +++ b/plugins/fedora_imageapi.info @@ -1,7 +1,7 @@ name = Fedora ImageAPI description = Adds image manipulation support through a REST interface package = Islandora Dependencies -dependencies[] = islandora_repository +dependencies[] = fedora_repository dependencies[] = imageapi version = 11.2.beta2 core = 6.x diff --git a/plugins/islandora_imageapi.module b/plugins/fedora_imageapi.module similarity index 89% rename from plugins/islandora_imageapi.module rename to plugins/fedora_imageapi.module index cbe6225d..f3bd4481 100644 --- a/plugins/islandora_imageapi.module +++ b/plugins/fedora_imageapi.module @@ -6,7 +6,7 @@ function fedora_imageapi_menu() { $items = array(); $items['fedora/imageapi'] = array( 'title' => t('Image manipulation functions'), - 'page callback' => 'islandora_repository_image_manip', + 'page callback' => 'fedora_repository_image_manip', 'type' => MENU_CALLBACK, 'access arguments' => array('view fedora collection'), ); @@ -21,7 +21,7 @@ function fedora_imageapi_menu() { * @param string $op * @param string $params */ -function islandora_repository_image_manip($pid = '', $dsid = '', $op = '', $params = '') { +function fedora_repository_image_manip($pid = '', $dsid = '', $op = '', $params = '') { module_load_include('inc', 'Fedora_Repository', 'ObjectHelper'); module_load_include('module', 'imageapi'); $obj = new ObjectHelper(); @@ -30,7 +30,7 @@ function islandora_repository_image_manip($pid = '', $dsid = '', $op = '', $para $op = (!empty($_GET['op']) ? $_GET['op'] : ''); $safe_pid = str_replace(':', '_', $pid); - $cache_key = 'islandora_repository_image_manip_' . md5($safe_pid . '_' . $dsid . '_' . $ext . '_' . $op . (isset($_GET['width']) ? '_' . $_GET['width'] : '') . (isset($_GET['height']) ? '_' . $_GET['height'] : '')); + $cache_key = 'fedora_repository_image_manip_' . md5($safe_pid . '_' . $dsid . '_' . $ext . '_' . $op . (isset($_GET['width']) ? '_' . $_GET['width'] : '') . (isset($_GET['height']) ? '_' . $_GET['height'] : '')); if (($file = cache_get($cache_key)) === 0) { //added the slash as sys_get_temp_dir in linux does not seem to include the slash $tmp_file_name = sys_get_temp_dir() . '/' . $safe_pid . '_' . $dsid . '.' . $ext; @@ -83,7 +83,7 @@ function islandora_repository_image_manip($pid = '', $dsid = '', $op = '', $para function fedora_imageapi_form_alter( &$form, $form_state, $form_id) { switch ( $form_id ) { - case 'islandora_repository_admin': + case 'fedora_repository_admin': $fedora_base_url = $form['fedora_base_url']['#default_value']; diff --git a/plugins/herbarium.inc b/plugins/herbarium.inc index f831bc59..f7a6d685 100644 --- a/plugins/herbarium.inc +++ b/plugins/herbarium.inc @@ -16,7 +16,7 @@ class Herbarium { function __construct($pid = '') { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); if (!empty($pid)) { $this->pid = $pid; $this->item = new Fedora_Item($pid); @@ -32,7 +32,7 @@ class Herbarium { public function buildDrupalForm($form = array(), $form_state = array()) { // We don't need to add anything beyond the standard Darwin Core form so just pass this through // If we wanted to we could add other fields. - module_load_include('inc', 'islandora_repository', 'plugins/DarwinCore'); + module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore'); $dwc = new DarwinCore($this->item); return $dwc->buildDrupalForm($form); @@ -73,9 +73,9 @@ class Herbarium { * Process the metadata form * Update the datastreams */ - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'plugins/DarwinCore'); - module_load_include('inc', 'islandora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); global $user; $mimetype = new MimeClass(); $dwc = new DarwinCore($this->item); @@ -97,9 +97,9 @@ class Herbarium { * Create fedora object * Add the datastreams */ - module_load_include('inc', 'islandora_repository', 'MimeClass'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'plugins/DarwinCore'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore'); global $user; $mimetype = new MimeClass(); $dwc = new DarwinCore(); @@ -141,8 +141,8 @@ class Herbarium { * @return string */ public function showFieldSets() { - module_load_include('inc', 'islandora_repository', 'plugins/tagging_form'); - module_load_include('inc', 'islandora_repository', 'plugins/DarwinCore'); + module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); + module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore'); global $base_url; $tabset = array(); @@ -167,7 +167,7 @@ class Herbarium { '#title' => t('View'), // This will be the content of the tab. '#content' => '<a href="' . $base_url . '/fedora/repository/' . $this->pid . '/FULL_JPG/"><img src="' . $base_url . '/fedora/imageapi/' . - $this->pid . '/JPG/JPG.jpg' . '" /></a>' . '<p>' . drupal_get_form('islandora_repository_image_tagging_form', $this->pid) . '</p>', + $this->pid . '/JPG/JPG.jpg' . '" /></a>' . '<p>' . drupal_get_form('fedora_repository_image_tagging_form', $this->pid) . '</p>', ); $dwc = new DarwinCore($this->item); @@ -184,10 +184,10 @@ class Herbarium { '#title' => t('Darwin Core'), '#content' => $dwc->asHTML(), ); - module_load_include('inc', 'islandora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $obj = new ObjectHelper(); - if (islandora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { - $editform = drupal_get_form('islandora_repository_edit_qdc_form', $this->pid, 'DARWIN_CORE'); + if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { + $editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DARWIN_CORE'); $tabset['third_tab']['tabset']['edit'] = array( '#type' => 'tabpage', '#title' => t('Edit'), diff --git a/plugins/map_viewer.inc b/plugins/map_viewer.inc index 2ad56c0a..3e9bcfb6 100644 --- a/plugins/map_viewer.inc +++ b/plugins/map_viewer.inc @@ -29,9 +29,9 @@ class ShowMapStreamsInFieldSets { * @return type */ function showJPG() { - module_load_include('inc', 'islandora_repository', 'plugins/tagging_form'); - module_load_include('inc', 'islandora_repository', 'plugins/ShowStreamsInFieldSets'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); + module_load_include('inc', 'fedora_repository', 'plugins/ShowStreamsInFieldSets'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); global $base_url; @@ -51,8 +51,8 @@ class ShowMapStreamsInFieldSets { $html = '<iframe src="' . $viewer_url . '" scrolling="no" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>'; drupal_add_css(path_to_theme() . '/header-viewer.css', 'theme'); - drupal_add_css(drupal_get_path('module', 'islandora_repository') . '/js/iiv/css/jquery-ui/smoothness/jquery-ui-1.7.2.custom.css'); - drupal_add_css(drupal_get_path('module', 'islandora_repository') . '/js/iiv/css/iiv.css'); + drupal_add_css(drupal_get_path('module', 'fedora_repository') . '/js/iiv/css/jquery-ui/smoothness/jquery-ui-1.7.2.custom.css'); + drupal_add_css(drupal_get_path('module', 'fedora_repository') . '/js/iiv/css/iiv.css'); $tabset['my_tabset']['second_tab'] = array( diff --git a/plugins/qt_viewer.inc b/plugins/qt_viewer.inc index 09d24cca..ec321ca1 100644 --- a/plugins/qt_viewer.inc +++ b/plugins/qt_viewer.inc @@ -112,9 +112,9 @@ class ShowQtStreamsInFieldSets { * @return type */ function showQt() { - module_load_include('inc', 'islandora_repository', 'plugins/tagging_form'); - module_load_include('inc', 'islandora_repository', 'plugins/ShowStreamsInFieldSets'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); + module_load_include('inc', 'fedora_repository', 'plugins/ShowStreamsInFieldSets'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $info = $this->technicalMetadata(array('width' => 640, 'height' => 480)); $width = $info['width']; diff --git a/plugins/slide_viewer.inc b/plugins/slide_viewer.inc index ef569487..1d23b227 100644 --- a/plugins/slide_viewer.inc +++ b/plugins/slide_viewer.inc @@ -30,8 +30,8 @@ class ShowSlideStreamsInFieldSets { * @return type */ function showJPG() { - module_load_include('inc', 'islandora_repository', 'plugins/tagging_form'); - module_load_include('inc', 'islandora_repository', 'plugins/ShowStreamsInFieldSets'); + module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); + module_load_include('inc', 'fedora_repository', 'plugins/ShowStreamsInFieldSets'); global $base_url; global $user; @@ -58,7 +58,7 @@ class ShowSlideStreamsInFieldSets { '#title' => t('View'), // This will be the content of the tab. '#content' => '<img src="' . $base_url . - '/fedora/imageapi/' . $this->pid . '/JPG/JPG.jpg' . '" />' . '<p>' . drupal_get_form('islandora_repository_image_tagging_form', $this->pid) . '</p>', + '/fedora/imageapi/' . $this->pid . '/JPG/JPG.jpg' . '" />' . '<p>' . drupal_get_form('fedora_repository_image_tagging_form', $this->pid) . '</p>', ); return $tabset; diff --git a/plugins/tagging_form.inc b/plugins/tagging_form.inc index ca32ecd5..0a421105 100644 --- a/plugins/tagging_form.inc +++ b/plugins/tagging_form.inc @@ -13,9 +13,9 @@ * @return string */ function _show_subject_tags($pid) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/dublin_core'); - module_load_include('inc', 'islandora_repository', 'api/tagging'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/dublin_core'); + module_load_include('inc', 'fedora_repository', 'api/tagging'); $obj = new Fedora_Item($pid); $tags = new TagSet($obj); if (!empty($tags->tags)) { @@ -35,10 +35,10 @@ function _show_subject_tags($pid) { * @param type $pid * @return type */ -function islandora_repository_image_tagging_form($form_state, $pid) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/dublin_core'); - module_load_include('inc', 'islandora_repository', 'api/tagging'); +function fedora_repository_image_tagging_form($form_state, $pid) { + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/dublin_core'); + module_load_include('inc', 'fedora_repository', 'api/tagging'); global $base_url; if (!empty($form_state['post']['pid'])) { @@ -71,7 +71,7 @@ function islandora_repository_image_tagging_form($form_state, $pid) { // Delete button for each existing tag. $form['tags-wrapper']['tags'][$tag['name']]['delete'] = array( '#type' => 'imagebutton', - '#image' => $base_url . '/' . drupal_get_path('module', 'islandora_repository') . '/images/remove_icon.png', + '#image' => $base_url . '/' . drupal_get_path('module', 'fedora_repository') . '/images/remove_icon.png', '#default_value' => $tag['name'], '#title' => t('Delete this tag'), ); @@ -122,9 +122,9 @@ function hook_imagebutton_process($form) { * @param type $form * @param type $form_state */ -function islandora_repository_image_tagging_form_submit($form, &$form_state) { - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); - module_load_include('inc', 'islandora_repository', 'api/tagging'); +function fedora_repository_image_tagging_form_submit($form, &$form_state) { + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/tagging'); global $user; $item = new Fedora_Item($form_state['values']['pid']); diff --git a/tests/README_TESTING.txt b/tests/README_TESTING.txt index f38af855..c9dde164 100644 --- a/tests/README_TESTING.txt +++ b/tests/README_TESTING.txt @@ -21,7 +21,7 @@ $FEDORA_HOME/server/config/fedora-users.xml: </attribute> </user> -If you look in the islandora_repository.test file we see that we are creating +If you look in the fedora_repository.test file we see that we are creating a user with a password set to 'simpletestpass'. Fedora requires the hashed version of this password to do a servlet filter-based authentication. diff --git a/tests/fedora_repository.test b/tests/fedora_repository.test index d5e59bc8..bbad2569 100644 --- a/tests/fedora_repository.test +++ b/tests/fedora_repository.test @@ -16,9 +16,9 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase { } function setUp() { - parent::setUp('tabs', 'islandora_repository'); + parent::setUp('tabs', 'fedora_repository'); - module_load_include('inc', 'islandora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); // Create and login user. $repository_user = $this->drupalCreateFedoraUser(array('add fedora datastreams', @@ -57,11 +57,11 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase { $ingest_form_step_2['dc:title'] = $this->randomName(32); $ingest_form_step_2['dc:description'] = $this->randomName(256); - $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'islandora_repository') . '/tests/test_files/lorem_ipsum.pdf'); + $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'fedora_repository') . '/tests/test_files/lorem_ipsum.pdf'); $this->drupalPost(NULL, $ingest_form_step_2, 'Ingest'); $this->assertText('mimetype (application/pdf) is not associated with this Content Model', 'PDF mime type not accepted in collection content model.', 'message'); - $this->outputScreenContents('Initial ingest form submit step 2', 'islandora_repository'); + $this->outputScreenContents('Initial ingest form submit step 2', 'fedora_repository'); // Now try ingesting a proper collection policy. $ingest_form = array(); @@ -72,9 +72,9 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase { $ingest_form_step_2 = array(); $ingest_form_step_2['dc:title'] = $this->randomName(32); $ingest_form_step_2['dc:description'] = $this->randomName(256); - $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'islandora_repository') . '/collection_policies/PDF-COLLECTION POLICY.xml'); + $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'fedora_repository') . '/collection_policies/PDF-COLLECTION POLICY.xml'); $this->drupalPost(NULL, $ingest_form_step_2, 'Ingest'); - //$this->outputScreenContents('Initial ingest form submit step 2 - PDF collection', 'islandora_repository'); + //$this->outputScreenContents('Initial ingest form submit step 2 - PDF collection', 'fedora_repository'); $this->assertPattern('/Item .* created successfully./', "Verified item created."); $pid = $this->getIngestedPid(); @@ -88,7 +88,7 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase { $ingest_form_step_2 = array(); $ingest_form_step_2['dc:title'] = "Lorem Ipsum"; $ingest_form_step_2['dc:description'] = $this->randomName(256); - $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'islandora_repository') . '/tests/test_files/lorem_ipsum.pdf'); + $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'fedora_repository') . '/tests/test_files/lorem_ipsum.pdf'); $this->drupalPost(NULL, $ingest_form_step_2, 'Ingest'); $pid = $this->getIngestedPid(); $pid_list[] = $pid; @@ -104,7 +104,7 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase { $admin_tester = $this->drupalCreateUser(array('administer site configuration', 'view fedora collection')); $this->drupalLogin($admin_tester); - $pageContent = $this->drupalGet('admin/settings/islandora_repository'); + $pageContent = $this->drupalGet('admin/settings/fedora_repository'); $hasOption = preg_match('/Enforce namespace restrictions/', $pageContent); @@ -115,13 +115,13 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase { $this->pass('Removal of namespace restrictions is enabled'); $inVal['fedora_namespace_restriction_enforced'] = TRUE; $inVal['fedora_pids_allowed'] = 'simpletest:'; - $this->drupalPost('admin/settings/islandora_repository', $inVal, 'Save configuration'); + $this->drupalPost('admin/settings/fedora_repository', $inVal, 'Save configuration'); $this->assertPattern('/The configuration options have been saved./', 'The configuration options have been saved.'); $this->drupalGet('fedora/repository/islandora:largeimages/'); $this->assertPattern('/Access denied/', 'No access to Large image Collection Collection'); $inVal['fedora_namespace_restriction_enforced'] = 0; - $this->drupalPost('admin/settings/islandora_repository', $inVal, 'Save configuration'); + $this->drupalPost('admin/settings/fedora_repository', $inVal, 'Save configuration'); $this->assertPattern('/The configuration options have been saved./', 'The configuration options have been saved.'); $this->drupalLogin($this->repository_user); $this->drupalGet('fedora/repository/islandora:largeimages/');