Permalink
Browse files

don't print address details if they are not requested

  • Loading branch information...
1 parent c9d51fe commit 3abbeb5f081c648a6f2fe0213663627ad6b37198 @lonvia lonvia committed Feb 6, 2012
Showing with 11 additions and 9 deletions.
  1. +11 −9 lib/template/address-xml.php
@@ -29,15 +29,17 @@
if (isset($aPlace['lon'])) echo ' lon="'.htmlspecialchars($aPlace['lon']).'"';
echo ">".htmlspecialchars($aPlace['langaddress'])."</result>";
- echo "<addressparts>";
- foreach($aAddress as $sKey => $sValue)
- {
- $sKey = str_replace(' ','_',$sKey);
- echo "<$sKey>";
- echo htmlspecialchars($sValue);
- echo "</$sKey>";
- }
- echo "</addressparts>";
+ if ($bShowAddressDetails) {
+ echo "<addressparts>";
+ foreach($aAddress as $sKey => $sValue)
+ {
+ $sKey = str_replace(' ','_',$sKey);
+ echo "<$sKey>";
+ echo htmlspecialchars($sValue);
+ echo "</$sKey>";
+ }
+ echo "</addressparts>";
+ }
}
echo "</reversegeocode>";

0 comments on commit 3abbeb5

Please sign in to comment.