/** * Update the given address record with geo data from a geocoding service. * * Note that the record does not get update in database. * * @param array &$address Address record from database * * @return boolean True if the address got updated, false if not. * * @uses searchAddress() */ function updateAddress(&$address) { $config = tx_odsosm_div::getConfig(array('cache_enabled', 'geo_service')); tx_odsosm_div::splitAddressField($address); // Use cache only when enabled if ($config['cache_enabled'] == 1) { $ll = tx_odsosm_div::searchAddress($address, 0); } if (!$ll) { $search = $address; $ll = tx_odsosm_div::searchAddress($address, $config['geo_service']); // Update cache when enabled or needed for statistic if ($ll && $config['cache_enabled']) { tx_odsosm_div::updateCache($address, $search); } } return $ll; }