]> git.openstreetmap.org Git - nominatim.git/commitdiff
don't print address details if they are not requested
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 6 Feb 2012 22:26:08 +0000 (22:26 +0000)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 6 Feb 2012 22:26:08 +0000 (22:26 +0000)
lib/template/address-xml.php

index d6061e3df4fff930595df754eb8b4edd045b0958..185601ad2f5f3c874feff0ff4f6392d5b246ab5e 100644 (file)
                if (isset($aPlace['lon'])) echo ' lon="'.htmlspecialchars($aPlace['lon']).'"';\r
                echo ">".htmlspecialchars($aPlace['langaddress'])."</result>";\r
 \r
-               echo "<addressparts>";\r
-               foreach($aAddress as $sKey => $sValue)\r
-               {\r
-                       $sKey = str_replace(' ','_',$sKey);\r
-                       echo "<$sKey>";\r
-                       echo htmlspecialchars($sValue);\r
-                       echo "</$sKey>";\r
-               }\r
-               echo "</addressparts>";\r
+        if ($bShowAddressDetails) {\r
+                       echo "<addressparts>";\r
+                       foreach($aAddress as $sKey => $sValue)\r
+                       {\r
+                               $sKey = str_replace(' ','_',$sKey);\r
+                               echo "<$sKey>";\r
+                               echo htmlspecialchars($sValue);\r
+                               echo "</$sKey>";\r
+                       }\r
+                       echo "</addressparts>";\r
+        }\r
        }\r
        \r
        echo "</reversegeocode>";\r