From 15a09635819b9489075b6db7c2e961f0ab9fc7a2 Mon Sep 17 00:00:00 2001 From: ppound Date: Thu, 2 Feb 2012 13:07:07 -0400 Subject: [PATCH 01/16] updated soap connection to be session aware --- ConnectionHelper.inc | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/ConnectionHelper.inc b/ConnectionHelper.inc index 59f811e21..71a83bc9d 100644 --- a/ConnectionHelper.inc +++ b/ConnectionHelper.inc @@ -1,7 +1,5 @@ _fixURL($url, 'anonymous', 'anonymous'), array( - 'login' => 'anonymous', - 'password' => 'anonymous', - 'exceptions' => $exceptions, - )); + 'login' => 'anonymous', + 'password' => 'anonymous', + 'exceptions' => $exceptions, + )); } catch (SoapFault $e) { drupal_set_message(t('@e', array('@e' => check_plain($e->getMessage())))); return NULL; @@ -78,15 +76,32 @@ class ConnectionHelper { else { try { $client = new SoapClient($this->_fixURL($url, $user->name, $user->pass), array( - 'login' => $user->name, - 'password' => $user->pass, - 'exceptions' => TRUE, - )); + 'login' => $user->name, + 'password' => $user->pass, + 'exceptions' => TRUE, + )); } catch (SoapFault $e) { drupal_set_message(t('@e', array('@e' => check_plain($e->getMessage())))); return NULL; } } + if (isset($_SESSION['islandora_soapcookies'])) { + + // just set the cookies + + $client->_cookies = ($_SESSION['islandora_soapcookies']); + } + else { + try { + //we need to make a call to set the cookie this extra call would only happen once per session + $client->__soapCall('describeRepository', array()); + } catch (exception $e) { + //connection is tested elsewhere so eat this for now here we just want the cookie + } + $_SESSION['islandora_soapcookies'] = $client->_cookies; + } + + return $client; } From 7101d28d7d4532615f8c0af47dbc70c3a3f66cdd Mon Sep 17 00:00:00 2001 From: Ben Woodhead Date: Tue, 20 Mar 2012 09:46:34 -0300 Subject: [PATCH 02/16] Fixed OBJECTHELPER couldn't be found outside of islandora bug --- fedora_repository.module | 1 + 1 file changed, 1 insertion(+) diff --git a/fedora_repository.module b/fedora_repository.module index eeee98514..ff1825c9d 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -882,6 +882,7 @@ function fedora_repository_access($op, $node, $account) { * @param $dsID String */ function makeObject($pid, $dsID) { + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (!valid_pid($pid)) { drupal_set_message(t("Invalid PID!"), 'error'); From 4ba420dce8affb7fbd9cf9c7bf84b363794b5878 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Tue, 20 Mar 2012 11:21:08 -0300 Subject: [PATCH 03/16] Updated Fedora Item Datastream add for HTTPS When a datastream is added using HTTPS if its using the drupal url it will try to use HTTP instead of HTTPS since Fedora has some problems with HTTP. Ammended commit. Removed debug statements. --- api/fedora_item.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/fedora_item.inc b/api/fedora_item.inc index 1714c571c..7e4810e50 100644 --- a/api/fedora_item.inc +++ b/api/fedora_item.inc @@ -136,10 +136,18 @@ class Fedora_Item { * @return type */ function add_datastream_from_url($datastream_url, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) { + global $base_url; + if (empty($datastream_label)) { $datastream_label = $datastream_id; } + // Fedora has some problems getting files from HTTPS connections sometimes, so if we are getting a file + // from the local drupal, we try to pass a HTTP url instead of a HTTPS one. + if(stripos($datastream_url, 'https://') !== FALSE && stripos($datastream_url, $base_url) !== FALSE) { + $datastream_url = str_ireplace('https://', 'http://', $datastream_url); + } + $params = array( 'pid' => $this->pid, 'dsID' => $datastream_id, From c59290c9c76501846fe2454d27e0ab1090b22256 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Wed, 28 Mar 2012 13:22:16 -0300 Subject: [PATCH 04/16] ISLANDORA-548 Updated curl call in ObjectHelper The ObjectHelper.inc file uses the deprecated API-A Lite API, i.e. localhost:8080/fedora/get/{pid}/{dsID} This causes problems when XACML policies are in place that require access to certain datastreams based on fedoraRole. Basically, despite sending accurate credentials in the GET request, the fedoraRole is not recognized by fedora's AttributeFinderModule, and a user cannot access a particular datastream. The protected datastreams, however, are viewable in Fedora's admin console (while using the same credentials) since that uses the REST API. Updated the curl call to use the new REST API. --- ObjectHelper.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ObjectHelper.inc b/ObjectHelper.inc index fa6e2a06c..31a0ccd24 100644 --- a/ObjectHelper.inc +++ b/ObjectHelper.inc @@ -122,8 +122,7 @@ class ObjectHelper { $dsID = variable_get('fedora_default_display_dsid', 'TN'); $mimeType = 'image/jpeg'; } - - $url = variable_get('fedora_base_url', 'http://localhost:8080/fedora') . '/get/' . $pid . '/' . $dsID; + $url = variable_get('fedora_base_url', 'http://localhost:8080/fedora') . '/objects/' . $pid . '/datastreams/' . $dsID . '/content'; if ($version) { $url .= '/' . $version; //drupal_urlencode($version); } From 0b40b559811f0b2d60a10c1e643eb45fc1693bb3 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Wed, 28 Mar 2012 13:45:27 -0300 Subject: [PATCH 05/16] Added the quiet=true flag to fedora_item.inc In Fedora item when you call the constructor it automatically does a getObjectProfile soap call. This was reporting soap errors when called on an item that dosen't exist, we don't want to show the user this. --- api/fedora_item.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/fedora_item.inc b/api/fedora_item.inc index 7e4810e50..2809f3840 100644 --- a/api/fedora_item.inc +++ b/api/fedora_item.inc @@ -59,7 +59,7 @@ class Fedora_Item { self::$connection_helper = new ConnectionHelper(); } - $raw_objprofile = $this->soap_call('getObjectProfile', array('pid' => $this->pid, 'asOfDateTime' => "")); + $raw_objprofile = $this->soap_call('getObjectProfile', array('pid' => $this->pid, 'asOfDateTime' => ""), TRUE); if (!empty($raw_objprofile)) { $this->objectProfile = $raw_objprofile->objectProfile; From 17a91d971cb44a5d794b40e87029228e448ab8a7 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Wed, 28 Mar 2012 22:45:35 -0300 Subject: [PATCH 06/16] ISLANDORA-479 Error replacing X Datastream When you tried to replace a datastream that was anything but managed, you would get a SOAP error. Changed this behavior so that you can replace a managed datastream, an inline xml datastream, and it gives a reasonable warning if you try to replace a reference or redirect datastream. --- fedora_repository.module | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/fedora_repository.module b/fedora_repository.module index ff1825c9d..42eb4c498 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -617,7 +617,7 @@ function fedora_repository_purge_stream_form_submit($form, &$form_state) { * @param type $collectionName * @return type */ -function fedora_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 ''; @@ -707,8 +707,20 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) { $dformat = $mimetype->getType($file->filepath); $item = new Fedora_Item($pid); + $info = $item->get_datastream_info($dsid); - $item->modify_datastream_by_reference($streamUrl, $dsid, $dsLabel, $dformat); + if($info->datastream->controlGroup == 'M') { + $item->modify_datastream_by_reference($streamUrl, $dsid, $dsLabel, $dformat); + } elseif ($info->datastream->controlGroup == 'X') { + if($dformat == 'text/xml') { + $item->modify_datastream_by_value(file_get_contents($file->filepath), $dsid, $dsLabel, $dformat); + } + else { + drupal_set_message('File must be of mimetype text/xml in order to replace inline XML datastream.', 'error'); + } + } else { + drupal_set_message('Cannot replace Redirect or Managed Datastream.', 'error'); + } $form_state['redirect'] = 'fedora/repository/' . $pid; } From 0d8207325863004e3bc219f300db7d2ea0bfa352 Mon Sep 17 00:00:00 2001 From: Ben Woodhead Date: Mon, 2 Apr 2012 10:49:44 -0300 Subject: [PATCH 07/16] Added error reporting for when an ingest fails --- ContentModel.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/ContentModel.inc b/ContentModel.inc index 444f485cf..be362c705 100644 --- a/ContentModel.inc +++ b/ContentModel.inc @@ -1374,6 +1374,7 @@ class ContentModel extends XMLDatastream { else { $status = $class->$methodName($param_array, $method->getAttribute('dsid'), $file, $method->getAttribute('modified_files_ext')); if ($status !== TRUE) { + self::$errors[] = 'Execute Ingest Rules: method \'' . $className . '->' . $methodName . '\' failed.'; $ret = FALSE; } } From 860069f40042dcb14f150e259b87e9b9f91f4bb2 Mon Sep 17 00:00:00 2001 From: Ben Woodhead Date: Mon, 2 Apr 2012 11:56:08 -0300 Subject: [PATCH 08/16] Cleaned up error handling --- api/fedora_item.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/api/fedora_item.inc b/api/fedora_item.inc index 2809f3840..e64779159 100644 --- a/api/fedora_item.inc +++ b/api/fedora_item.inc @@ -406,15 +406,18 @@ class Fedora_Item { * Get datastream dissemination * @param type $dsid * @param type $as_of_date_time - * @return string + * @param type $quiet + * @return null */ - function get_datastream_dissemination($dsid, $as_of_date_time = "") { + function get_datastream_dissemination($dsid, $as_of_date_time = "", $quiet=TRUE) { $params = array( 'pid' => $this->pid, 'dsID' => $dsid, 'asOfDateTime' => $as_of_date_time, ); - $object = self::soap_call('getDataStreamDissemination', $params); + + // Make soap call with quite + $object = self::soap_call('getDataStreamDissemination', $params, $quiet); if (!empty($object)) { $content = $object->dissemination->stream; $content = trim($content); From a2c4b5d374c344093807c35959bab07c1b88cc60 Mon Sep 17 00:00:00 2001 From: ppound Date: Tue, 10 Apr 2012 09:15:35 -0300 Subject: [PATCH 09/16] Connectionhelper is session aware SecurityClass now uses xacml api --- ConnectionHelper.inc | 2 +- SecurityClass.inc | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ConnectionHelper.inc b/ConnectionHelper.inc index 71a83bc9d..4dce9a0d8 100644 --- a/ConnectionHelper.inc +++ b/ConnectionHelper.inc @@ -95,10 +95,10 @@ class ConnectionHelper { try { //we need to make a call to set the cookie this extra call would only happen once per session $client->__soapCall('describeRepository', array()); + $_SESSION['islandora_soapcookies'] = $client->_cookies; } catch (exception $e) { //connection is tested elsewhere so eat this for now here we just want the cookie } - $_SESSION['islandora_soapcookies'] = $client->_cookies; } diff --git a/SecurityClass.inc b/SecurityClass.inc index 970b108b9..ced11ba7c 100644 --- a/SecurityClass.inc +++ b/SecurityClass.inc @@ -22,15 +22,17 @@ class SecurityClass { drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); } - /** - * canIngestHere ?? - * @global type $user - * @param type $collection_pid - * @return type + /** + * reads the specified stream of the parent object to see if the user can ingest in this collection. + * + * @global object $user + * @param string $collection_pid + * @return boolean */ function canIngestHere($collection_pid) { global $user; module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'islandora_xacml_api', 'Xacml'); $objectHelper = new ObjectHelper(); // get the childsecurity policy from the collection. $policyStream = $objectHelper->getStream($collection_pid, SECURITYCLASS :: $SECURITY_CLASS_SECURITY_STREAM, FALSE); @@ -39,13 +41,9 @@ class SecurityClass { // maybe we should return FALSE here?? would be more secure. return TRUE; } - $allowedUsersAndRoles = $this->getAllowedUsersAndRoles($policyStream); - if (!$allowedUsersAndRoles) { - // error processing stream so don't let them ingest here. - return FALSE; - } - $allowedUsers = $allowedUsersAndRoles["users"]; - $allowedRoles = $allowedUsersAndRoles["roles"]; + $xacml = new Xacml($policyStream); + $allowedUsers = $xacml->managementRule->getUsers(); + $allowedRoles = $xacml->managementRule->getRoles(); foreach ($user->roles as $role) { if (in_array($role, $allowedRoles)) { @@ -60,7 +58,10 @@ class SecurityClass { } /** + * Depracated should use the xacml api for this + * * parses our simple xacml policies checking for users or roles that are allowed to ingest + * * @param type $policyStream * @return type */ @@ -153,6 +154,8 @@ class SecurityClass { } /** + * Depracated should use the xacml api for this + * * Add a list of allowed users and roles to the given policy stream and return it. * * @param string $policy_stream From 8e3e02634c0a1fc34e128057881ea3768ac69532 Mon Sep 17 00:00:00 2001 From: William Panting Date: Wed, 11 Apr 2012 17:15:40 -0300 Subject: [PATCH 10/16] object details tab is now diableable --- fedora_repository.module | 20 +++++++++++++------- formClass.inc | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/fedora_repository.module b/fedora_repository.module index 42eb4c498..96918dc81 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -1027,13 +1027,19 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU // Add a 'manage object' tab for all objects, where detailed list of content is shown. $obj = new FedoraObjectDetailedContent($pid); - $object_details = $obj->showFieldSets(); - if ($object_details['fedora_object_details']['#selected'] == TRUE) { - foreach ($cmodels_tabs as &$cmodel_tab) { - if (is_array($cmodel_tab)) { - $cmodel_tab['#selected'] = FALSE; - } - } + + if(variable_get('fedora_repository_show_object_details_tab', FALSE)) {//can disable showing the object details tab in admin UI + $object_details = $obj->showFieldSets(); + if ($object_details['fedora_object_details']['#selected'] == TRUE) { + foreach ($cmodels_tabs as &$cmodel_tab) { + if (is_array($cmodel_tab)) { + $cmodel_tab['#selected'] = FALSE; + } + } + } + } + else { + $object_details = array(); } $hook_tabs = module_invoke_all('islandora_tabs', $content_models, $pid); diff --git a/formClass.inc b/formClass.inc index 293a83ec9..d107c0477 100644 --- a/formClass.inc +++ b/formClass.inc @@ -301,6 +301,22 @@ class formClass { '#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['tabs'] = array(//have tabs options (like disable) + '#type' => 'fieldset', + '#title' => t('Tabs Configuration'), + '#description' => t('Configure the tabs avaialble when viewing Fedora objects.'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + + $form['tabs']['fedora_repository_show_object_details_tab'] = array(//when checked show object details tab + '#type' => 'checkbox', + '#title' => t('Show Object Details Tab'), + '#default_value' => variable_get('fedora_repository_show_object_details_tab', TRUE), + '#description' => t("When enabled, the 'Object Details' tab will be visible when visiting objects if the user has the correct permissions."), + ); + $form['advanced'] = array( '#type' => 'fieldset', '#title' => t('Advanced configuration options'), From a691d23b8366ec33f02a2f3a7ecbf2f40645aaf5 Mon Sep 17 00:00:00 2001 From: William Panting Date: Thu, 12 Apr 2012 09:38:34 -0300 Subject: [PATCH 11/16] acted on comments from jonathangreen --- fedora_repository.module | 3 ++- formClass.inc | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fedora_repository.module b/fedora_repository.module index 96918dc81..f477e9f53 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -1028,7 +1028,8 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU // Add a 'manage object' tab for all objects, where detailed list of content is shown. $obj = new FedoraObjectDetailedContent($pid); - if(variable_get('fedora_repository_show_object_details_tab', FALSE)) {//can disable showing the object details tab in admin UI + //can disable showing the object details tab in admin UI + if (variable_get('fedora_repository_show_object_details_tab', TRUE)) { $object_details = $obj->showFieldSets(); if ($object_details['fedora_object_details']['#selected'] == TRUE) { foreach ($cmodels_tabs as &$cmodel_tab) { diff --git a/formClass.inc b/formClass.inc index d107c0477..8f936f24b 100644 --- a/formClass.inc +++ b/formClass.inc @@ -301,16 +301,16 @@ class formClass { '#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['tabs'] = array(//have tabs options (like disable) + //have tabs options (like disable) + $form['tabs'] = array( '#type' => 'fieldset', '#title' => t('Tabs Configuration'), '#description' => t('Configure the tabs avaialble when viewing Fedora objects.'), '#collapsible' => TRUE, '#collapsed' => TRUE, ); - - $form['tabs']['fedora_repository_show_object_details_tab'] = array(//when checked show object details tab + //when checked show object details tab + $form['tabs']['fedora_repository_show_object_details_tab'] = array( '#type' => 'checkbox', '#title' => t('Show Object Details Tab'), '#default_value' => variable_get('fedora_repository_show_object_details_tab', TRUE), From 45209b87fc813bac6113a098b4e4b4334a87453c Mon Sep 17 00:00:00 2001 From: William Panting Date: Thu, 12 Apr 2012 09:43:47 -0300 Subject: [PATCH 12/16] changed text for object details toggle as David Wilcox asked --- formClass.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formClass.inc b/formClass.inc index 8f936f24b..0fa07e985 100644 --- a/formClass.inc +++ b/formClass.inc @@ -314,7 +314,7 @@ class formClass { '#type' => 'checkbox', '#title' => t('Show Object Details Tab'), '#default_value' => variable_get('fedora_repository_show_object_details_tab', TRUE), - '#description' => t("When enabled, the 'Object Details' tab will be visible when visiting objects if the user has the correct permissions."), + '#description' => t("When enabled, the 'Object Details' tab will be visible to users with the correct permissions when viewing an object in the repository"), ); $form['advanced'] = array( From a41a256be20dcd6e72efd52947e8ec4a40c0543b Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Fri, 13 Apr 2012 09:41:09 -0300 Subject: [PATCH 13/16] Fix for Islandora 504 reverted SecurityClass changes --- SecurityClass.inc | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/SecurityClass.inc b/SecurityClass.inc index ced11ba7c..970b108b9 100644 --- a/SecurityClass.inc +++ b/SecurityClass.inc @@ -22,17 +22,15 @@ class SecurityClass { drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); } - /** - * reads the specified stream of the parent object to see if the user can ingest in this collection. - * - * @global object $user - * @param string $collection_pid - * @return boolean + /** + * canIngestHere ?? + * @global type $user + * @param type $collection_pid + * @return type */ function canIngestHere($collection_pid) { global $user; module_load_include('inc', 'fedora_repository', 'ObjectHelper'); - module_load_include('inc', 'islandora_xacml_api', 'Xacml'); $objectHelper = new ObjectHelper(); // get the childsecurity policy from the collection. $policyStream = $objectHelper->getStream($collection_pid, SECURITYCLASS :: $SECURITY_CLASS_SECURITY_STREAM, FALSE); @@ -41,9 +39,13 @@ class SecurityClass { // maybe we should return FALSE here?? would be more secure. return TRUE; } - $xacml = new Xacml($policyStream); - $allowedUsers = $xacml->managementRule->getUsers(); - $allowedRoles = $xacml->managementRule->getRoles(); + $allowedUsersAndRoles = $this->getAllowedUsersAndRoles($policyStream); + if (!$allowedUsersAndRoles) { + // error processing stream so don't let them ingest here. + return FALSE; + } + $allowedUsers = $allowedUsersAndRoles["users"]; + $allowedRoles = $allowedUsersAndRoles["roles"]; foreach ($user->roles as $role) { if (in_array($role, $allowedRoles)) { @@ -58,10 +60,7 @@ class SecurityClass { } /** - * Depracated should use the xacml api for this - * * parses our simple xacml policies checking for users or roles that are allowed to ingest - * * @param type $policyStream * @return type */ @@ -154,8 +153,6 @@ class SecurityClass { } /** - * Depracated should use the xacml api for this - * * Add a list of allowed users and roles to the given policy stream and return it. * * @param string $policy_stream From 9bbf9e8423ffa17b533c41665999010831298071 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Mon, 16 Apr 2012 10:11:27 -0300 Subject: [PATCH 14/16] ISLANDORA-527: Fixed the SOAP URL. --- CollectionClass.inc | 4 ++-- api/fedora_item.inc | 2 +- fedora_repository.info | 2 +- fedora_repository.module | 10 +++------- formClass.inc | 2 +- plugins/Flv.inc | 2 +- plugins/Refworks.inc | 2 +- 7 files changed, 10 insertions(+), 14 deletions(-) diff --git a/CollectionClass.inc b/CollectionClass.inc index 08f669e0a..300355941 100644 --- a/CollectionClass.inc +++ b/CollectionClass.inc @@ -1,4 +1,4 @@ -getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); + $soapClient = $connectionHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M')); $pidNameSpace = variable_get('fedora_repository_pid', 'vre:'); $pidNameSpace = substr($pidNameSpace, 0, strpos($pidNameSpace, ":")); $params = array( diff --git a/api/fedora_item.inc b/api/fedora_item.inc index e64779159..50330d6ab 100644 --- a/api/fedora_item.inc +++ b/api/fedora_item.inc @@ -977,7 +977,7 @@ class Fedora_Item { self::$connection_helper = new ConnectionHelper(); } $url = (array_search($function, self::$SoapManagedFunctions) !== FALSE) ? - variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl') : + variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M') : variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'); try { $soap_client = self::$connection_helper->getSoapClient($url); diff --git a/fedora_repository.info b/fedora_repository.info index 5d3762e46..6d3135d15 100644 --- a/fedora_repository.info +++ b/fedora_repository.info @@ -4,5 +4,5 @@ dependencies[] = tabs dependencies[] = islandora_content_model_forms description = Shows a list of items in a fedora collection. package = Islandora -version = 11.3.1 +version = 6.x-12.1-RC1 core = 6.x diff --git a/fedora_repository.module b/fedora_repository.module index f477e9f53..06d220c7c 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -538,7 +538,7 @@ function fedora_repository_purge_object_form_submit($form, &$form_state) { ); try { $soapHelper = new ConnectionHelper(); - $client = $soapHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); + $client = $soapHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M')); $object = $client->__soapCall('purgeObject', array($params)); unset($form_state['storage']['confirm']); } catch (exception $e) { @@ -597,7 +597,6 @@ function fedora_repository_purge_stream_form(&$form_state, $pid, $dsId) { function fedora_repository_purge_stream_form_submit($form, &$form_state) { global $base_url; 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); $dsid = $form_state['values']['dsid']; @@ -636,9 +635,7 @@ function fedora_repository_replace_stream($pid, $dsId, $dsLabel = '', $collectio * @return type */ 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(); return $replaceDataStreamForm->createReplaceDataStreamForm($pid, $dsId, $dsLabel, $form_state); } @@ -832,11 +829,10 @@ function fedora_repository_edit_qdc_form_submit($form, &$form_state) { global $base_url; if (strstr($form_state['clicked_button']['#id'], 'edit-submit')) { -//$client = getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); $soap_helper = new ConnectionHelper(); - $client = $soap_helper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); + $client = $soap_helper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M')); -// Check the content model for a custom edit metadata form submit function. + // Check the content model for a custom edit metadata form submit function. if (isset($form_state['values']['pid'])) { module_load_include('inc', 'fedora_repository', 'ContentModel'); if (($cm = ContentModel::loadFromObject($form_state['values']['pid'])) !== FALSE) { diff --git a/formClass.inc b/formClass.inc index 0fa07e985..8512fd613 100644 --- a/formClass.inc +++ b/formClass.inc @@ -255,7 +255,7 @@ class formClass { $form['fedora_soap_manage_url'] = array( '#type' => 'textfield', '#title' => t('Fedora SOAP management URL'), - '#default_value' => variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'), '#description' => t('The URL to use for SOAP API-M connections'), + '#default_value' => variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M'), '#description' => t('The URL to use for SOAP API-M connections'), '#required' => TRUE, '#weight' => -10 ); diff --git a/plugins/Flv.inc b/plugins/Flv.inc index b5f159b2e..8d2079b67 100644 --- a/plugins/Flv.inc +++ b/plugins/Flv.inc @@ -110,7 +110,7 @@ class FormBuilder { try { $soapHelper = new ConnectionHelper(); - $client = $soapHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); + $client = $soapHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M')); if ($client == NULL) { drupal_set_message(t('Error getting SOAP client.'), 'error'); diff --git a/plugins/Refworks.inc b/plugins/Refworks.inc index 2c86caa7f..70b0abeba 100644 --- a/plugins/Refworks.inc +++ b/plugins/Refworks.inc @@ -286,7 +286,7 @@ class Refworks { try { $soapHelper = new ConnectionHelper(); - $client = $soapHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); + $client = $soapHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M')); if ($client == NULL) { drupal_set_message(t('Error getting SOAP client.'), 'error'); From 742a35043c516d03a051480677327ef77e35df82 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Mon, 16 Apr 2012 10:17:45 -0300 Subject: [PATCH 15/16] Updated version number --- fedora_repository.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedora_repository.info b/fedora_repository.info index 6d3135d15..018910bf6 100644 --- a/fedora_repository.info +++ b/fedora_repository.info @@ -4,5 +4,5 @@ dependencies[] = tabs dependencies[] = islandora_content_model_forms description = Shows a list of items in a fedora collection. package = Islandora -version = 6.x-12.1-RC1 +version = 6.x-dev core = 6.x From 971b90d777e9436afa5db4581f2f8fdf94ec3d24 Mon Sep 17 00:00:00 2001 From: jonathangreen Date: Tue, 17 Apr 2012 09:49:56 -0300 Subject: [PATCH 16/16] Updated version number i forgot. --- plugins/fedora_imageapi.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/fedora_imageapi.info b/plugins/fedora_imageapi.info index 3a9deea73..cbd6b2ae0 100644 --- a/plugins/fedora_imageapi.info +++ b/plugins/fedora_imageapi.info @@ -3,5 +3,5 @@ description = Adds image manipulation support through a REST interface package = Islandora Dependencies dependencies[] = fedora_repository dependencies[] = imageapi -version = 11.3.1 +version = 6.x-dev core = 6.x