Subversion Repositories Sites.obs-saisons.fr

Compare Revisions

Ignore whitespace Rev 193 → Rev 194

/trunk/applications/jrest/services/OdsStation.php
50,8 → 50,12
$id_participant = $params['id_participant'];
if(isset($params['station_code_insee'])) {
if(isset($params['station_code_insee']) && trim($params['station_code_insee']) != '') {
$commune = $params['station_code_insee'];
if(strlen($commune) == 4) {
$commune = '0'.$commune;
}
} else {
$commune = $params['station_commune'];
}
61,7 → 65,7
'VALUES ('.
$this->proteger($id_participant).','.
$this->proteger($params['station_nom']).','.
$commune.','.
$this->proteger($commune).','.
$this->proteger($params['station_lat']).','.
$this->proteger($params['station_lon']).','.
$this->proteger($params['station_alt']).','.
106,8 → 110,12
$id_station = $uid[0];;
}
if(isset($params['station_code_insee'])) {
if(isset($params['station_code_insee']) && trim($params['station_code_insee']) != '') {
$commune = $params['station_code_insee'];
if(strlen($commune) == 4) {
$commune = '0'.$commune;
}
} else {
$commune = $params['station_commune'];
}
115,7 → 123,7
$requete_modification_station = 'UPDATE ods_stations '.
'SET '.
'os_nom ='.$this->proteger($params['station_nom']).','.
'os_ce_commune ='.$commune.','.
'os_ce_commune ='.$this->proteger($commune).','.
'os_latitude ='.$this->proteger($params['station_lat']).','.
'os_longitude ='.$this->proteger($params['station_lon']).','.
'os_altitude ='.$this->proteger($params['station_alt']).','.