Browse Source

path requests for Fedora_Repository lowercased - Postgres does case-sensitive matching

pull/107/head
Randy Fischer 13 years ago
parent
commit
4bdc234721
  1. 10
      CollectionClass.inc
  2. 2
      CollectionPolicy.inc
  3. 4
      ObjectHelper.inc
  4. 10
      SearchClass.inc
  5. 6
      SecurityClass.inc
  6. 2
      XMLDatastream.inc
  7. 14
      fedora_repository.module
  8. 2
      plugins/DarwinCore.inc
  9. 2
      plugins/FlvFormBuilder.inc
  10. 8
      plugins/FormBuilder.inc
  11. 2
      plugins/ModsFormBuilder.inc
  12. 8
      plugins/PersonalCollectionClass.inc
  13. 4
      plugins/QtFormBuilder.php
  14. 6
      plugins/ShowStreamsInFieldSets.inc
  15. 2
      plugins/fedora_imageapi.module
  16. 2
      plugins/qt_viewer.inc

10
CollectionClass.inc

@ -226,7 +226,7 @@ class CollectionClass {
* @return ContentModel * @return ContentModel
*/ */
function getContentModels($collection_pid, $showError = TRUE) { function getContentModels($collection_pid, $showError = TRUE) {
module_load_include('inc', 'Fedora_Repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'ContentModel');
$collection_stream = $this->getCollectionPolicyStream($collection_pid); $collection_stream = $this->getCollectionPolicyStream($collection_pid);
try { try {
$xml = new SimpleXMLElement($collection_stream); $xml = new SimpleXMLElement($collection_stream);
@ -253,7 +253,7 @@ class CollectionClass {
* $dsid is the datastream id of the content model. * $dsid is the datastream id of the content model.
*/ */
function getNextPid($pid, $dsid) { function getNextPid($pid, $dsid) {
module_load_include('inc', 'Fedora_Repository', 'ConnectionHelper'); module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
$pidNameSpace = $this->getPidNameSpace($pid, $dsid); $pidNameSpace = $this->getPidNameSpace($pid, $dsid);
$pname = substr($pidNameSpace, 0, strpos($pidNameSpace, ":")); $pname = substr($pidNameSpace, 0, strpos($pidNameSpace, ":"));
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
@ -371,7 +371,7 @@ class CollectionClass {
$parametersArray["$name"] = $value; $parametersArray["$name"] = $value;
} }
} }
// module_load_include( $phpFile, 'Fedora_Repository', ' '); // module_load_include( $phpFile, 'fedora_repository', ' ');
require_once(drupal_get_path('module', 'fedora_repository') . '/' . $phpFile); require_once(drupal_get_path('module', 'fedora_repository') . '/' . $phpFile);
$thisClass = new $phpClass (); $thisClass = new $phpClass ();
$returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext); $returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext);
@ -448,7 +448,7 @@ class CollectionClass {
$phpClass = strip_tags($ingest_form->form_builder_method->class_name->asXML()); $phpClass = strip_tags($ingest_form->form_builder_method->class_name->asXML());
$phpMethod = strip_tags($ingest_form->form_builder_method->method_name->asXML()); $phpMethod = strip_tags($ingest_form->form_builder_method->method_name->asXML());
$dsid = strip_tags($ingest_form['dsid']); $dsid = strip_tags($ingest_form['dsid']);
// module_load_include('php', 'Fedora_Repository', $phpFile); // module_load_include('php', 'fedora_repository', $phpFile);
require_once(drupal_get_path('module', $drupal_module) . '/' . $phpFile); require_once(drupal_get_path('module', $drupal_module) . '/' . $phpFile);
$thisClass = new $phpClass (); $thisClass = new $phpClass ();
@ -592,7 +592,7 @@ class CollectionClass {
* @return string * @return string
*/ */
function getIngestInterface() { function getIngestInterface() {
module_load_include('inc', 'Fedora_Repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
$collectionPolicyExists = $this->collectionObject->getMimeType($this->pid, CollectionPolicy::getDefaultDSID()); $collectionPolicyExists = $this->collectionObject->getMimeType($this->pid, CollectionPolicy::getDefaultDSID());
if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) { if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) {
if (!empty($collectionPolicyExists)) { if (!empty($collectionPolicyExists)) {

2
CollectionPolicy.inc

@ -392,7 +392,7 @@ class CollectionPolicy extends XMLDatastream {
function getContentModels() { function getContentModels() {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
module_load_include('inc', 'Fedora_Repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'ContentModel');
$ret = array(); $ret = array();
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model'); $content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
for ($i = 0; $i < $content_models->length; $i++) { for ($i = 0; $i < $content_models->length; $i++) {

4
ObjectHelper.inc

@ -598,7 +598,7 @@ class ObjectHelper {
try { try {
$sxml = new SimpleXMLElement($content_models); $sxml = new SimpleXMLElement($content_models);
} catch (exception $e) { } catch (exception $e) {
watchdog(t("Fedora_Repository"), "Could not find a parent object for %s", $pid, NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "Could not find a parent object for %s", $pid, NULL, WATCHDOG_ERROR);
return $pids; return $pids;
} }
@ -692,7 +692,7 @@ class ObjectHelper {
//show the collections datastreams //show the collections datastreams
if ($results->length > 0 || $isCollection == TRUE) { if ($results->length > 0 || $isCollection == TRUE) {
// if(strlen($objectList)>22||$contentModel=='Collection'||$contentModel=='Community')//length of empty dom still equals 22 because of <table/> etc // if(strlen($objectList)>22||$contentModel=='Collection'||$contentModel=='Community')//length of empty dom still equals 22 because of <table/> etc
module_load_include('inc', 'Fedora_Repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
$collectionPolicyExists = $this->getMimeType($pid, CollectionPolicy::getDefaultDSID()); $collectionPolicyExists = $this->getMimeType($pid, CollectionPolicy::getDefaultDSID());
if (user_access(ObjectHelper::$INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) { if (user_access(ObjectHelper::$INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) {
if (!empty($collectionPolicyExists)) { if (!empty($collectionPolicyExists)) {

10
SearchClass.inc

@ -36,7 +36,7 @@ class SearchClass {
try { try {
$implementation = new $solrClass(); $implementation = new $solrClass();
} catch (Exception $e) { } catch (Exception $e) {
watchdog(t("Fedora_Repository"), "Error getting solr search results class: !message", array('!message' => $e->getMessage()), NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "Error getting solr search results class: !message", array('!message' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return 'Error getting solr search results class. Check watchdog for more info.'; return 'Error getting solr search results class. Check watchdog for more info.';
} }
return $implementation->$solrFunction($query, $startPage, $fq, $dismax); return $implementation->$solrFunction($query, $startPage, $fq, $dismax);
@ -253,7 +253,7 @@ class SearchClass {
$objectHelper = new ObjectHelper(); $objectHelper = new ObjectHelper();
$resultData = do_curl($searchString, 1); $resultData = do_curl($searchString, 1);
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'fedora_repository');
$output .= $this->applySpecifiedXSLT($resultData, $path . '/xsl/browseIndexToResultPage.xslt', $displayName); $output .= $this->applySpecifiedXSLT($resultData, $path . '/xsl/browseIndexToResultPage.xslt', $displayName);
//$output .= '<br />'.$alpha_out; //$output .= '<br />'.$alpha_out;
@ -367,7 +367,7 @@ class SearchClass {
* @param <type> $query the query that was executed. May want to pass this on. * @param <type> $query the query that was executed. May want to pass this on.
*/ */
function applyLuceneXSLT($resultData, $startPage = 1, $xslt_file = '/xsl/results.xsl', $query=NULL) { function applyLuceneXSLT($resultData, $startPage = 1, $xslt_file = '/xsl/results.xsl', $query=NULL) {
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'fedora_repository');
$test = $xslt_file; $test = $xslt_file;
$isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE); $isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
if (!isRestricted && $xslt_file == NULL) { if (!isRestricted && $xslt_file == NULL) {
@ -425,7 +425,7 @@ class SearchClass {
* @return type * @return type
*/ */
function applyXSLT($resultData, $orderBy = 0) { function applyXSLT($resultData, $orderBy = 0) {
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'fedora_repository');
$proc = NULL; $proc = NULL;
if (!$resultData) { if (!$resultData) {
//drupal_set_message(t('No Results!')); //drupal_set_message(t('No Results!'));
@ -590,7 +590,7 @@ class SearchClass {
*/ */
function get_search_terms_array($path = NULL, $file = NULL) { function get_search_terms_array($path = NULL, $file = NULL) {
if (!isset($path)) { if (!isset($path)) {
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'fedora_repository');
} }
$xmlDoc = new DomDocument(); $xmlDoc = new DomDocument();
if (!isset($file)) { if (!isset($file)) {

6
SecurityClass.inc

@ -71,7 +71,7 @@ class SecurityClass {
try { try {
$xml = new SimpleXMLElement($policyStream); $xml = new SimpleXMLElement($policyStream);
} catch (Exception $e) { } catch (Exception $e) {
watchdog(t("Fedora_Repository"), "No roles found in security policy, could not parse policy stream.", NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "No roles found in security policy, could not parse policy stream.", NULL, WATCHDOG_ERROR);
//we may not want to send this to the screen. //we may not want to send this to the screen.
drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => check_plain($e->getMessage()))), 'error'); drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => check_plain($e->getMessage()))), 'error');
return NULL; return NULL;
@ -108,9 +108,9 @@ class SecurityClass {
function createPersonalPolicy($user) { function createPersonalPolicy($user) {
$doc = new DOMDocument(); $doc = new DOMDocument();
try { try {
$doc->load(drupal_get_path('module', 'Fedora_Repository') . '/policies/noObjectEditPolicy.xml'); $doc->load(drupal_get_path('module', 'fedora_repository') . '/policies/noObjectEditPolicy.xml');
} catch (exception $e) { } catch (exception $e) {
watchdog(t("Fedora_Repository"), "Problem loading policy file.", NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "Problem loading policy file.", NULL, WATCHDOG_ERROR);
} }
$conditions = $doc->getElementsByTagName('Condition'); $conditions = $doc->getElementsByTagName('Condition');
foreach ($conditions as $condition) { foreach ($conditions as $condition) {

2
XMLDatastream.inc

@ -227,7 +227,7 @@ abstract class XMLDatastream {
* @return boolean $success * @return boolean $success
*/ */
public function saveToFedora() { public function saveToFedora() {
module_load_include('inc', 'Fedora_Repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
if ($this->validate()) { if ($this->validate()) {
$item = new Fedora_Item($this->pid); $item = new Fedora_Item($this->pid);
$item->modify_datastream_by_value($this->dumpXml(), $this->dsid, $this->name, 'application/xml'); $item->modify_datastream_by_value($this->dumpXml(), $this->dsid, $this->name, 'application/xml');

14
fedora_repository.module

@ -634,7 +634,7 @@ function fedora_repository_replace_stream($pid, $dsId, $dsLabel = '', $collectio
* @return type * @return type
*/ */
function fedora_repository_replace_stream_form(&$form_state, $pid, $dsId, $dsLabel) { function fedora_repository_replace_stream_form(&$form_state, $pid, $dsId, $dsLabel) {
module_load_include('inc', 'Fedora_Repository', 'formClass'); module_load_include('inc', 'fedora_repository', 'formClass');
$replaceDataStreamForm = new formClass(); $replaceDataStreamForm = new formClass();
return $replaceDataStreamForm->createReplaceDataStreamForm($pid, $dsId, $dsLabel, $form_state); return $replaceDataStreamForm->createReplaceDataStreamForm($pid, $dsId, $dsLabel, $form_state);
} }
@ -659,7 +659,7 @@ function fedora_repository_replace_stream_form_validate($form, &$form_state) {
} }
$doc = new DOMDocument(); $doc = new DOMDocument();
module_load_include('inc', 'Fedora_Repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'MimeClass');
$mime = new MimeClass(); $mime = new MimeClass();
if ($mime->getType($file->filepath) == 'text/xml' && !$doc->load($file->filepath)) { if ($mime->getType($file->filepath) == 'text/xml' && !$doc->load($file->filepath)) {
form_set_error('file', 'Invalid XML format.'); form_set_error('file', 'Invalid XML format.');
@ -689,7 +689,7 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) {
$dsLabel = substr($dsLabel, 0, $indexOfDot); $dsLabel = substr($dsLabel, 0, $indexOfDot);
$dsLabel .= substr($file->filename, strrpos($file->filename, '.')); // Add the file extention to the end of the label.; $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', 'fedora_repository', 'MimeClass');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$file_basename = basename($file->filepath); $file_basename = basename($file->filepath);
@ -2110,19 +2110,19 @@ function theme_add_to_basket_link($pid, $type = 'object') {
$save = "export_big.png"; $save = "export_big.png";
$saved = "exported_big.png"; $saved = "exported_big.png";
// $path = drupal_get_path('module', 'Fedora_Repository').'/images/'.$save ; // $path = drupal_get_path('module', 'fedora_repository').'/images/'.$save ;
/* /*
var_dump($path); var_dump($path);
var_dump(theme('image',drupal_get_path('module', 'Fedora_Repository').'/images/'.$save)); var_dump(theme('image',drupal_get_path('module', 'fedora_repository').'/images/'.$save));
die(); die();
*/ */
if (!_is_added_to_basket($pid)) { if (!_is_added_to_basket($pid)) {
return l( return l(
theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))), "fedora/repository/addToBasket/" . $path, array('html' => TRUE) theme('image', drupal_get_path('module', 'fedora_repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))), "fedora/repository/addToBasket/" . $path, array('html' => TRUE)
); );
} }
return theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $saved, t("In basket"), t("This @object is already in your basket", array('@object' => $object))); return theme('image', drupal_get_path('module', 'fedora_repository') . '/images/' . $saved, t("In basket"), t("This @object is already in your basket", array('@object' => $object)));
} }
/** /**

2
plugins/DarwinCore.inc

@ -247,7 +247,7 @@ class DarwinCore {
* @return type * @return type
*/ */
public function asHTML() { public function asHTML() {
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'fedora_repository');
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');

2
plugins/FlvFormBuilder.inc

@ -58,7 +58,7 @@ class FlvFormBuilder extends FormBuilder {
$ds1v->appendChild($ds1content); $ds1v->appendChild($ds1content);
$rootElement->appendChild($ds1); $rootElement->appendChild($ds1);
$createdFile = drupal_get_path('module', 'Fedora_Repository') . '/images/flashThumb.jpg'; $createdFile = drupal_get_path('module', 'fedora_repository') . '/images/flashThumb.jpg';
$fileUrl = $base_url . '/' . drupal_urlencode($createdFile); //'http://'.$_SERVER['HTTP_HOST'].'/'.$createdFile; $fileUrl = $base_url . '/' . drupal_urlencode($createdFile); //'http://'.$_SERVER['HTTP_HOST'].'/'.$createdFile;
$ds1 = $dom->createElement("foxml:datastream"); $ds1 = $dom->createElement("foxml:datastream");
$ds1->setAttribute("ID", "TN"); $ds1->setAttribute("ID", "TN");

8
plugins/FormBuilder.inc

@ -95,21 +95,21 @@ class FormBuilder {
try { try {
$xml = new SimpleXMLElement($policyStreamDoc); $xml = new SimpleXMLElement($policyStreamDoc);
} catch (Exception $e) { } catch (Exception $e) {
watchdog(t("Fedora_Repository"), "Problem getting security policy.", NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "Problem getting security policy.", NULL, WATCHDOG_ERROR);
drupal_set_message(t('Problem getting security policy: @e', array('@e' => check_plain($e->getMessage()))), 'error'); drupal_set_message(t('Problem getting security policy: @e', array('@e' => check_plain($e->getMessage()))), 'error');
return FALSE; return FALSE;
} }
$policyElement = $dom->createDocumentFragment(); $policyElement = $dom->createDocumentFragment();
if (!$policyElement) { if (!$policyElement) {
drupal_set_message(t('Error parsing security policy stream.')); drupal_set_message(t('Error parsing security policy stream.'));
watchdog(t("Fedora_Repository"), "Error parsing security policy stream, could not parse policy stream.", NULL, WATCHDOG_NOTICE); watchdog(t("fedora_repository"), "Error parsing security policy stream, could not parse policy stream.", NULL, WATCHDOG_NOTICE);
return FALSE; return FALSE;
} }
$dom->importNode($policyElement, TRUE); $dom->importNode($policyElement, TRUE);
$value = $policyElement->appendXML($policyStreamDoc); $value = $policyElement->appendXML($policyStreamDoc);
if (!$value) { if (!$value) {
drupal_set_message(t('Error creating security policy stream.')); drupal_set_message(t('Error creating security policy stream.'));
watchdog(t("Fedora_Repository"), "Error creating security policy stream, could not parse collection policy template file.", NULL, WATCHDOG_NOTICE); watchdog(t("fedora_repository"), "Error creating security policy stream, could not parse collection policy template file.", NULL, WATCHDOG_NOTICE);
return FALSE; return FALSE;
} }
@ -183,7 +183,7 @@ class FormBuilder {
file_delete($form_values['ingest-file-location']); file_delete($form_values['ingest-file-location']);
} catch (exception $e) { } catch (exception $e) {
drupal_set_message(t('Error ingesting object: @e', array('@e' => check_plain($e->getMessage()))), 'error'); drupal_set_message(t('Error ingesting object: @e', array('@e' => check_plain($e->getMessage()))), 'error');
watchdog(t("Fedora_Repository"), "Error ingesting object: @e", array('@e' => check_plain($e->getMessage())), NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "Error ingesting object: @e", array('@e' => check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
return; return;
} }
} }

2
plugins/ModsFormBuilder.inc

@ -317,7 +317,7 @@ class ModsFormBuilder extends FormBuilder {
file_delete($form_values['ingest-file-location']); file_delete($form_values['ingest-file-location']);
} catch (exception $e) { } catch (exception $e) {
drupal_set_message(t('Error ingesting object: @e', array('@e' => check_plain($e->getMessage()))), 'error'); drupal_set_message(t('Error ingesting object: @e', array('@e' => check_plain($e->getMessage()))), 'error');
watchdog(t("Fedora_Repository"), "Error ingesting object: @e", array('@e' => check_plain($e->getMessage())), NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "Error ingesting object: @e", array('@e' => check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
return; return;
} }
} }

8
plugins/PersonalCollectionClass.inc

@ -71,11 +71,11 @@ class PersonalCollectionClass {
* @return type * @return type
*/ */
function createCollectionPolicyStream($user, $dom, $rootElement) { function createCollectionPolicyStream($user, $dom, $rootElement) {
$collectionTemplate = file_get_contents(drupal_get_path('module', 'Fedora_Repository') . '/collection_policies/PERSONAL-COLLECTION-POLICY.xml'); $collectionTemplate = file_get_contents(drupal_get_path('module', 'fedora_repository') . '/collection_policies/PERSONAL-COLLECTION-POLICY.xml');
try { try {
$xml = new SimpleXMLElement($collectionTemplate); $xml = new SimpleXMLElement($collectionTemplate);
} catch (Exception $e) { } catch (Exception $e) {
watchdog(t("Fedora_Repository"), "Problem creating personal collection policy, could not parse collection policy stream.", NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "Problem creating personal collection policy, could not parse collection policy stream.", NULL, WATCHDOG_ERROR);
drupal_set_message(t('Problem creating personal collection policy, could not parse collection policy stream: @e', array('@e' => check_plain($e->getMessage()))), 'error'); drupal_set_message(t('Problem creating personal collection policy, could not parse collection policy stream: @e', array('@e' => check_plain($e->getMessage()))), 'error');
return FALSE; return FALSE;
} }
@ -83,7 +83,7 @@ class PersonalCollectionClass {
if (!$policyElement) { if (!$policyElement) {
drupal_set_message(t('Error parsing policy stream.')); drupal_set_message(t('Error parsing policy stream.'));
watchdog(t("Fedora_Repository"), "Error parsing policy stream, could not parse policy stream.", NULL, WATCHDOG_NOTICE); watchdog(t("fedora_repository"), "Error parsing policy stream, could not parse policy stream.", NULL, WATCHDOG_NOTICE);
return FALSE; return FALSE;
} }
$dom->importNode($policyElement, TRUE); $dom->importNode($policyElement, TRUE);
@ -91,7 +91,7 @@ class PersonalCollectionClass {
$value = $policyElement->appendXML($collectionTemplate); $value = $policyElement->appendXML($collectionTemplate);
if (!$value) { if (!$value) {
drupal_set_message(t('Error creating collection policy stream.')); drupal_set_message(t('Error creating collection policy stream.'));
watchdog(t("Fedora_Repository"), "Error creating collection policy stream, could not parse collection policy template file.", NULL, WATCHDOG_NOTICE); watchdog(t("fedora_repository"), "Error creating collection policy stream, could not parse collection policy template file.", NULL, WATCHDOG_NOTICE);
return FALSE; return FALSE;
} }

4
plugins/QtFormBuilder.php

@ -18,7 +18,7 @@ class QtFormBuilder extends FormBuilder {
* Constructor * Constructor
*/ */
function QtFormBuilder() { function QtFormBuilder() {
module_load_include('php', 'Fedora_Repository', 'plugins/FormBuilder'); module_load_include('php', 'fedora_repository', 'plugins/FormBuilder');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
} }
@ -57,7 +57,7 @@ class QtFormBuilder extends FormBuilder {
$rootElement->appendChild($ds1); $rootElement->appendChild($ds1);
if (empty($_SESSION['fedora_ingest_files']) || !isset($_SESSION['fedora_ingest_files']['TN'])) { if (empty($_SESSION['fedora_ingest_files']) || !isset($_SESSION['fedora_ingest_files']['TN'])) {
$createdFile = drupal_get_path('module', 'Fedora_Repository') . '/images/qtThumb.jpg'; $createdFile = drupal_get_path('module', 'fedora_repository') . '/images/qtThumb.jpg';
$fileUrl = $base_url . '/' . drupal_urlencode($createdFile); //'http://'.$_SERVER['HTTP_HOST'].'/'.$createdFile; $fileUrl = $base_url . '/' . drupal_urlencode($createdFile); //'http://'.$_SERVER['HTTP_HOST'].'/'.$createdFile;
$ds1 = $dom->createElement("foxml:datastream"); $ds1 = $dom->createElement("foxml:datastream");
$ds1->setAttribute("ID", "TN"); $ds1->setAttribute("ID", "TN");

6
plugins/ShowStreamsInFieldSets.inc

@ -28,10 +28,10 @@ class ShowStreamsInFieldSets {
*/ */
function showFlv() { function showFlv() {
//FLV is the datastream id //FLV is the datastream id
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'fedora_repository');
$fullPath = url($path); $fullPath = url($path);
$content = ""; $content = "";
$pathTojs = drupal_get_path('module', 'Fedora_Repository') . '/js/swfobject.js'; $pathTojs = drupal_get_path('module', 'fedora_repository') . '/js/swfobject.js';
drupal_add_js("$pathTojs"); drupal_add_js("$pathTojs");
$div_id = "player' . $this->pid . 'FLV"; $div_id = "player' . $this->pid . 'FLV";
$content .= <<<EOH $content .= <<<EOH
@ -231,7 +231,7 @@ EOM
* @return type * @return type
*/ */
function showRomeo($collapsed = FALSE) { function showRomeo($collapsed = FALSE) {
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'fedora_repository');
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');
$collectionHelper = new CollectionClass(); $collectionHelper = new CollectionClass();
$xmlstr = $collectionHelper->getStream($this->pid, "ROMEO", 0); $xmlstr = $collectionHelper->getStream($this->pid, "ROMEO", 0);

2
plugins/fedora_imageapi.module

@ -22,7 +22,7 @@ function fedora_imageapi_menu() {
* @param string $params * @param string $params
*/ */
function fedora_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('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('module', 'imageapi'); module_load_include('module', 'imageapi');
$obj = new ObjectHelper(); $obj = new ObjectHelper();
$mimetype = $obj->getMimeType($pid, $dsid); $mimetype = $obj->getMimeType($pid, $dsid);

2
plugins/qt_viewer.inc

@ -126,7 +126,7 @@ class ShowQtStreamsInFieldSets {
return ''; return '';
} }
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'fedora_repository');
drupal_add_js("$path/js/AC_Quicktime.js"); drupal_add_js("$path/js/AC_Quicktime.js");

Loading…
Cancel
Save