]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/address-xml.php
don't print address details if they are not requested
[nominatim.git] / 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