@ -21,10 +21,10 @@ class ConnectionHelper {
$creds = urlencode($_name) . ':'. urlencode($_pass);
if (strpos($url, 'http://') == 0) {
if (strpos($url, 'http://') === 0) {
$new_url = 'http://'. $creds . '@'. substr($url, 7);
}
elseif (strpos($url, 'https://') == 0) {
elseif (strpos($url, 'https://') === 0) {
$new_url = 'https://'. $creds . '@'. substr($url, 8);
else {
@ -66,8 +66,8 @@ function do_curl($url, $return_to_variable = 1, $number_of_post_vars = 0, $post
function fedora_available() {
$response = drupal_http_request(variable_get('fedora_base_url', 'http://localhost:8080/fedora').'/describe');
return ($response->code == 200);
$response = do_curl(variable_get('fedora_base_url', 'http://localhost:8080/fedora').'/describe');
return strstr($response, 'Repository Information HTML Presentation') !== FALSE;
/**