From f6058113e37736240e217d8e1642d66cf77b6bed Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Fri, 11 Feb 2011 18:18:22 -0400 Subject: [PATCH] ISLANDORA-191 Change availability check to look at HTTP status of /fedora/describe --- api/fedora_utils.inc | 7 ++----- fedora_repository.module | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/api/fedora_utils.inc b/api/fedora_utils.inc index 97612595..f286806c 100644 --- a/api/fedora_utils.inc +++ b/api/fedora_utils.inc @@ -66,11 +66,8 @@ function do_curl($url, $return_to_variable = 1, $number_of_post_vars = 0, $post } 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. - // PHP SOAP is now an installation requirement so this check is all we need to do. - return (strpos($ret, 'wsdl:definitions') != FALSE); + $response = drupal_http_request(variable_get('fedora_base_url', 'http://localhost:8080/fedora').'/describe'); + return ($response->code == 200); } /** diff --git a/fedora_repository.module b/fedora_repository.module index 818fc4ac..0df5b660 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -1245,10 +1245,10 @@ function fedora_repository_demo_objects_form() { ); foreach (array( -'islandora:collectionCModel' => 'Islandora default content models', - 'islandora:top' => 'Islandora top-level collection', - 'islandora:demos' => 'Islandora demos collection', - 'islandora:largeimages' => 'Sample large image content model (requires Djatoka and Kakadu.)', + 'islandora:collectionCModel' => 'Islandora default content models', + 'islandora:top' => 'Islandora top-level collection', + 'islandora:demos' => 'Islandora demos collection', + 'islandora:largeimages' => 'Sample large image content model (requires Djatoka and Kakadu.)', ) as $available_demo => $available_demo_desc) { try {