Project

General

Profile

« Previous | Next » 

Revision b96baf70

Added by Andreas Kohlbecker over 16 years ago

View differences:

modules/cdm_dataportal/cdm/cdm_api.php
63 63
function cdm_ws_load($url){
64 64

  
65 65
  if(variable_get('cdm_webservice_isStub', 0)){
66
    $url = urlencode($url);
66
    $url = urlencode(urlencode($url)).'.xml';
67 67
  }
68
  
68
  $url = variable_get('cdm_webservice_url', '').$url;
69 69
  //TODO get_content() requires the php curl extension to be installed, maybe we should chose an other function
70 70
  $data = get_content($url);
71 71
  
72

  
72
  $obj = simplexml_load_string($data);
73 73
  
74 74
  if(!$obj){
75 75
    $backtrace = debug_backtrace();
76 76
    watchdog('CDM', $backtrace[1]['function'].' - failed to load '.$url, WATCHDOG_ERROR);
77 77
  }
78 78
  $obj->ws_url = $url;
79
  $obj->data = $data;
79 80
  
80 81
  return $obj;
81 82
}

Also available in: Unified diff