Browse Source

Resolve merge conflict with ISLANDORA-89 branch.

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
3263a6a6af
  1. 29
      api/fedora_utils.inc
  2. 5
      fedora_repository.module
  3. 6
      plugins/pidfield/pidfield.module

29
api/fedora_utils.inc

@ -69,33 +69,8 @@ function fedora_available() {
$ret = do_curl(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/management?wsdl'), 1);
// A bit of a hack but the SOAP parser will cause a fatal error if you give it the wrong URL.
//return (strpos($ret, 'wsdl:definitions') != FALSE);
module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
try {
$connection_helper = new ConnectionHelper();
$soap_client = $connection_helper->getSoapClient( variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'));
if (!empty($soap_client)) {
$result = $soap_client->__soapCall('describeRepository', array());
}
print 'why am I here?';
return TRUE;
}
catch (SoapFault $e) {
print 'what now?';
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
return FALSE;
}
// PHP SOAP is now an installation requirement so this check is all we need to do.
return (strpos($ret, 'wsdl:definitions') != FALSE);
}
/**

5
fedora_repository.module

@ -757,6 +757,11 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
global $user;
if (!fedora_available()) {
drupal_set_message('The Fedora repository server is currently unavailable. Please contact the site administrator.', 'warning', FALSE);
return '';
}
if ($pid &!validPid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error');
return ' ';

6
plugins/pidfield/pidfield.module

@ -273,15 +273,9 @@ function pidfield_field_formatter_info() {
*
*/
function theme_pidfield_formatter_default($element) {
//return $element['#item']['safe'];
$pid = $element['#item']['safe'];
if(!empty($pid)) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new Fedora_Item($pid);
return fedora_repository_get_items($pid);
}
return null;
}

Loading…
Cancel
Save