]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/address-jsonv2.php
make sleep interval dependent on date of last batch
[nominatim.git] / lib / template / address-jsonv2.php
index 4e751a0d4b458ba4f7cff9fbe7fe592863c92276..baf53129e13aec93d6e470c838d27e343c4061ca 100644 (file)
@@ -3,7 +3,7 @@
 
        if (!sizeof($aPlace))
        {
-               if ($sError)
+               if (isset($sError))
                        $aFilteredPlaces['error'] = $sError;
                else
                        $aFilteredPlaces['error'] = 'Unable to geocode';
@@ -26,7 +26,7 @@
 
                $aFilteredPlaces['display_name'] = $aPlace['langaddress'];
                 $aFilteredPlaces['name'] = $aPlace['placename'];
-               if ($bShowAddressDetails && $aAddress && sizeof($aAddress)) $aFilteredPlaces['address'] = $aAddress;
+               if ($bShowAddressDetails && $aPlace['aAddress'] && sizeof($aPlace['aAddress'])) $aFilteredPlaces['address'] = $aPlace['aAddress'];
        }
 
        javascript_renderData($aFilteredPlaces);