31,50c31,32
<   if(variable_get('google_ent_use', 0) == 1) {
<     $crypto_key = variable_get('google_ent_crypto_key', '');
<     $client_id = variable_get('google_ent_client_id', '');
<     if($crypto_key != '' && $client_id != '') {
<       $query['client'] = $client_id;
<       $urlforsig = "http://maps.google.com/maps/api/geocode/json?sensor=false&address=".rawurlencode($address)."&client=".$client_id;
<       $url = parse_url($urlforsig);
<       $urlPartToSign = $url['path'] . "?" . $url['query'];
<       $decodedKey = decodeBase64UrlSafe($crypto_key);
<       $signature = hash_hmac("sha1",$urlPartToSign, $decodedKey,  true);
<       $encodedSignature = encodeBase64UrlSafe($signature);
<       $query['signature'] = $encodedSignature;
<     }
<           //$url = "http://maps.google.com/maps/api/geocode/json?sensor=false&address=".rawurlencode($address)."&client=gme-batterysystems&signature=".$encodedSignature;
<     $url = url("http://maps.google.com/maps/api/geocode/json", array('query' => $query));
<     drupal_set_message($url);
<   }
<   else {
<     $url = url("http://maps.googleapis.com/maps/api/geocode/json", array('query' => $query));
<   }
---
>   
>   $url = url("http://maps.googleapis.com/maps/api/geocode/json", array('query' => $query));
63c45
<     foreach ($data->results as $item) {                                        
---
>     foreach ($data->results as $item) {
