407,7 → 407,7 |
// Contient les noms des champs seulements |
$tables_a_modifier[$table_id]['champs'][] = $cle; |
// Contient un tableau de résultats protégé pour l'inclusion en bdd |
$tables_a_modifier[$table_id]['champs_valeurs_protege'][$cle] = $this->bdd->quote($valeur); |
$tables_a_modifier[$table_id]['champs_valeurs_protege'][$cle] = is_null($valeur) ? 'NULL' : $this->bdd->quote($valeur); |
// Contient un tableau de résultats non protégé |
$tables_a_modifier[$table_id]['champs_valeurs_brut'][$cle] = $valeur; |
if (preg_match('/_id_/', $cle)) { |
698,7 → 698,8 |
$opts ? $opts : array()); |
} |
$fullquery = 'http://nominatim.openstreetmap.org/search.php?' . http_build_query($query); |
$r = json_decode(file_get_contents($fullquery)); |
|
$r = json_decode(file_get_contents($fullquery)); |
error_log(sprintf("COEL: Nominatim request returned %d result(s) [%s]", count($r), $fullquery)); |
if($r && isset($r[0])) { |
$lonlat['lon'] = $r[0]->lon; |