From 150d2083463308e07e1d4f0d6b65fbd477aa4b0c Mon Sep 17 00:00:00 2001 From: Ben Woodhead Date: Wed, 19 Oct 2011 11:16:56 -0300 Subject: [PATCH] Fixed ConnectionHelper --- {core => api}/ConnectionHelper.inc | 2 -- api/fedora_item.inc | 4 ++-- core/CollectionClass.inc | 4 ++-- core/ObjectHelper.inc | 8 ++++---- fedora_repository.module | 6 +++--- 5 files changed, 11 insertions(+), 13 deletions(-) rename {core => api}/ConnectionHelper.inc (99%) diff --git a/core/ConnectionHelper.inc b/api/ConnectionHelper.inc similarity index 99% rename from core/ConnectionHelper.inc rename to api/ConnectionHelper.inc index 59f811e2..02db7e7f 100644 --- a/core/ConnectionHelper.inc +++ b/api/ConnectionHelper.inc @@ -1,7 +1,5 @@ pid = $pid; @@ -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', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); self::$connection_helper = new ConnectionHelper(); } switch ($function_name) { diff --git a/core/CollectionClass.inc b/core/CollectionClass.inc index 82e4739e..0d36be3e 100644 --- a/core/CollectionClass.inc +++ b/core/CollectionClass.inc @@ -220,7 +220,7 @@ class CollectionClass { * $dsid is the datastream id of the content model. */ function getNextPid($pid, $dsid) { - module_load_include('inc', 'Fedora_Repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); $pidNameSpace = $this->getPidNameSpace($pid, $dsid); $pname = substr($pidNameSpace, 0, strpos($pidNameSpace, ":")); module_load_include('inc', 'fedora_repository', 'api/fedora_item'); @@ -437,7 +437,7 @@ class CollectionClass { 'name' => variable_get('fedora_admin_user', 'fedoraAdmin') ); $admin_user = user_load($username); - module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); $connectionHelper = new ConnectionHelper(); try { $soapClient = $connectionHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); diff --git a/core/ObjectHelper.inc b/core/ObjectHelper.inc index 70f73d4b..f5e4808d 100644 --- a/core/ObjectHelper.inc +++ b/core/ObjectHelper.inc @@ -33,7 +33,7 @@ class ObjectHelper { */ function ObjectHelper() { drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); - module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); $connectionHelper = new ConnectionHelper(); //$this->fedoraUser = $connectionHelper->getUser(); //$this->fedoraPass = $connectionHelper->getPassword(); @@ -360,7 +360,7 @@ class ObjectHelper { function getFormattedDC($item) { global $base_url; $path = drupal_get_path('module', 'fedora_repository'); - module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); $dsid = array_key_exists('QDC', $item->get_datastreams_list_as_array()) ? 'QDC' : 'DC'; $xmlstr = $item->get_datastream_dissemination($dsid); @@ -440,7 +440,7 @@ class ObjectHelper { */ function get_formatted_datastream_list($object_pid, $contentModels, &$fedoraItem) { global $fedoraUser, $fedoraPass, $base_url, $user; - module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'ContentModel'); @@ -514,7 +514,7 @@ class ObjectHelper { * */ function getStream($pid, $dsid, $showError = FALSE) { - module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); $soapHelper = new ConnectionHelper(); try { $client = $soapHelper->getSoapClient(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl')); diff --git a/fedora_repository.module b/fedora_repository.module index 56859edb..b7087c85 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -495,7 +495,7 @@ function fedora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NULL) * @return type */ function fedora_repository_purge_object_form_submit($form, &$form_state) { - module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/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 @@ -729,7 +729,7 @@ function fedora_repository_edit_qdc_form(&$form_state, $pid, $dsId = NULL) { } module_load_include('inc', 'fedora_repository', 'formClass'); - module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/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. @@ -787,7 +787,7 @@ function fedora_repository_edit_qdc_form_submit($form, &$form_state) { $xml_form->submit($form, $form_state); } else { - module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); global $base_url; if (strstr($form_state['clicked_button']['#id'], 'edit-submit')) {