Permalink
Browse files

respect addressdetails parameter in json output

  • Loading branch information...
1 parent c3233cb commit d88778a561100db69ad439688698c673a2796bb6 @lonvia lonvia committed Mar 4, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/template/address-json.php
  2. +1 −1 lib/template/address-jsonv2.php
@@ -24,7 +24,7 @@
if (isset($aPlace['lat'])) $aFilteredPlaces['lat'] = $aPlace['lat'];
if (isset($aPlace['lon'])) $aFilteredPlaces['lon'] = $aPlace['lon'];
$aFilteredPlaces['display_name'] = $aPlace['langaddress'];
- $aFilteredPlaces['address'] = $aAddress;
+ if ($bShowAddressDetails) $aFilteredPlaces['address'] = $aAddress;
}
if (isset($_GET['json_callback']) && preg_match('/^[-A-Za-z0-9:_.]+$/',$_GET['json_callback']))
@@ -29,7 +29,7 @@
$aFilteredPlaces['display_name'] = $aPlace['langaddress'];
$aFilteredPlaces['name'] = $aPlace['placename'];
- $aFilteredPlaces['address'] = $aAddress;
+ if ($bShowAddressDetails) $aFilteredPlaces['address'] = $aAddress;
}
if (isset($_GET['json_callback']) && preg_match('/^[-A-Za-z0-9:_]+$/',$_GET['json_callback']))

0 comments on commit d88778a

Please sign in to comment.