Browse Source

Merge branch '6.x' of github.com:Islandora/islandora into 6.x

Conflicts:
	fedora_repository.module
pull/126/head
Adam Vessey 13 years ago
parent
commit
61dcfa0d55
  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. 13
      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/Refworks.inc
  15. 6
      plugins/ShowStreamsInFieldSets.inc
  16. 2
      plugins/fedora_imageapi.module
  17. 2
      plugins/qt_viewer.inc

10
CollectionClass.inc

@ -224,7 +224,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);
@ -251,7 +251,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');
@ -369,7 +369,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);
@ -446,7 +446,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 ();
@ -590,7 +590,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

@ -674,7 +674,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;
} }
@ -768,7 +768,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');

13
fedora_repository.module

@ -684,7 +684,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);
} }
@ -711,12 +711,13 @@ function fedora_repository_replace_stream_form_validate($form, &$form_state) {
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
* TODO: need a better way to get mimetypes * TODO: need a better way to get mimetypes
*/ */
$doc = new DOMDocument();
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'MimeClass');
$mime = new MimeClass(); $mime = new MimeClass();
$mimetype = $form_state['storage']['mime_type'] = $mime->getType($file->filepath); $mimetype = $form_state['storage']['mime_type'] = $mime->getType($file->filepath);
if ($mimetype == 'text/xml' && !DOMDocument::load($file->filepath)) { if ($mimetype == 'text/xml' && !DOMDocument::load($file->filepath)) {
form_set_error('file', 'Invalid XML format.'); form_set_error('file', 'Invalid XML format. (XML could not be parsed)');
return; return;
} }
@ -2205,19 +2206,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/Refworks.inc

@ -290,13 +290,13 @@ class Refworks {
if ($client == NULL) { if ($client == NULL) {
drupal_set_message(t('Error getting SOAP client.'), 'error'); drupal_set_message(t('Error getting SOAP client.'), 'error');
watchdog(t("FEDORA_REPOSITORY"), "Error getting SOAP client: @e", array('@e' => $e), NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), "Error getting SOAP client: @e", array('@e' => $e), NULL, WATCHDOG_ERROR);
return; return;
} }
$object = $client->__soapCall('ingest', array( $object = $client->__soapCall('ingest', array(
$params $params
)); ));
watchdog(t("FEDORA_REPOSITORY"), "Successfully added repository item " . $pid . " - ". $item_title, NULL, WATCHDOG_INFO); watchdog(t("fedora_repository"), "Successfully added repository item " . $pid . " - ". $item_title, NULL, WATCHDOG_INFO);
$deleteFiles = $form_values['delete_file']; //remove files from drupal file system $deleteFiles = $form_values['delete_file']; //remove files from drupal file system
if ($deleteFiles > 0) { if ($deleteFiles > 0) {
@ -305,7 +305,7 @@ class Refworks {
} catch (exception $e) { } catch (exception $e) {
$errors++; $errors++;
$errorMessage = 'yes'; $errorMessage = 'yes';
watchdog(t("FEDORA_REPOSITORY"), t("Error during ingest !it @e", array('!it' => $item_title, '@e' => $e)), NULL, WATCHDOG_ERROR); watchdog(t("fedora_repository"), t("Error during ingest !it @e", array('!it' => $item_title, '@e' => $e)), NULL, WATCHDOG_ERROR);
} }
$success++; $success++;
} }

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