32,6 → 32,7 |
// les groupes de champs utilisables |
static $fieldGroups = array( |
'standard', |
'standardexport', |
'avance', |
'etendu', |
'baseflor', |
81,7 → 82,7 |
'perceptionRiverainMauvaise', |
); |
|
static function colGroupsValidation($groupe_de_champs = 'standard,avance') { |
static function colGroupsValidation($groupe_de_champs = 'standard,avance', $programme = "") { |
if (! $groupe_de_champs) return FALSE; |
if (is_string($groupe_de_champs)) { |
$groupe_de_champs = array_flip(explode(',', $groupe_de_champs)); |
94,6 → 95,10 |
if (!$groupe_de_champs) { |
return false; |
} |
if ($programme != "") { |
$groupe_de_champs['avance'] = true; |
$groupe_de_champs['etendu'] = true; |
} |
// toujours ajouter standard |
$groupe_de_champs['standard'] = true; |
return implode(',', array_keys($groupe_de_champs)); |
129,8 → 134,10 |
} |
|
$colonnes = array(); |
if (isset($groupe_de_champs['standard'])) { |
if (isset($groupe_de_champs['standardexport'])) { |
$colonnes += Array( |
'guid' => self::GenColInfo(Array('abbrev' => 'guid', |
'nom' => 'Identifiant unique')), |
'nom_sel' => self::GenColInfo(Array('abbrev' => 'nom_sel', |
'nom' => 'Espèce')), |
'nom_sel_nn' => self::GenColInfo(Array('abbrev' => 'nom_sel_nn', |
183,7 → 190,68 |
'nom' => 'Référentiel Géographique', |
'extra' => 1, |
'importable' => FALSE)), |
'programme' => self::GenColInfo(Array('abbrev' => 'programme', |
'nom' => 'Programme de sciences participatives ou observatoire citoyen', |
'importable' => FALSE)), |
'validation_identiplante' => self::GenColInfo(Array('abbrev' => 'validation_identiplante', |
'nom' => 'Espéce validée sur IdentiPlante', |
'importable' => FALSE)), |
); |
} elseif (isset($groupe_de_champs['standard'])) { |
$colonnes += Array( |
'nom_sel' => self::GenColInfo(Array('abbrev' => 'nom_sel', |
'nom' => 'Espèce')), |
'nom_sel_nn' => self::GenColInfo(Array('abbrev' => 'nom_sel_nn', |
'nom' => 'Numéro nomenclatural', |
'importable' => FALSE)), |
'nom_ret' => self::GenColInfo(Array('abbrev' => 'nom_ret', |
'nom' => 'Nom retenu', |
'importable' => FALSE)), |
'nom_ret_nn' => self::GenColInfo(Array('abbrev' => 'nom_ret_nn', |
'nom' => 'Numéro nomenclatural nom retenu', |
'importable' => FALSE)), |
'nt' => self::GenColInfo(Array('abbrev' => 'nt', |
'nom' => 'Numéro taxonomique', |
'importable' => FALSE)), |
'famille' => self::GenColInfo(Array('abbrev' => 'famille', |
'nom' => 'Famille', |
'importable' => FALSE)), |
'nom_referentiel' => self::GenColInfo(Array('abbrev' => 'nom_referentiel', |
'nom' => 'Referentiel taxonomique')), |
'pays' => self::GenColInfo(Array('abbrev' => 'pays', |
'nom' => 'Pays')), |
'zone_geo' => self::GenColInfo(Array('abbrev' => 'zone_geo', |
'nom' => 'Commune')), |
'ce_zone_geo' => self::GenColInfo(Array('abbrev' => 'ce_zone_geo', |
'nom' => 'Identifiant Commune', |
'fonction' => 'convertirCodeZoneGeoVersDepartement')), |
'date_observation' => self::GenColInfo(Array('abbrev' => 'date_observation', |
'nom' => 'Date', |
'fonction' => 'formaterDate')), |
'lieudit' => self::GenColInfo(Array('abbrev' => 'lieudit', |
'nom' => 'Lieu-dit')), |
'station' => self::GenColInfo(Array('abbrev' => 'station', |
'nom' => 'Station')), |
'milieu' => self::GenColInfo(Array('abbrev' => 'milieu', |
'nom' => 'Milieu')), |
'commentaire' => self::GenColInfo(Array('abbrev' => 'commentaire', |
'nom' => 'Notes')), |
'latitude' => self::GenColInfo(Array('abbrev' => 'latitude', |
'nom' => 'Latitude', |
'extra' => 1, |
'fonction' => 'trim0')), |
'longitude' => self::GenColInfo(Array('abbrev' => 'longitude', |
'nom' => 'Longitude', |
'extra' => 1, |
'fonction' => 'trim0')), |
'altitude' => self::GenColInfo(Array('abbrev' => 'altitude', |
'nom' => 'Altitude', |
'extra' => 1)), // pas de trim0 car INT(5) en DB |
'geodatum' => self::GenColInfo(Array('abbrev' => 'geodatum', |
'nom' => 'Référentiel Géographique', |
'extra' => 1, |
'importable' => FALSE)), |
); |
} |
|
if(isset($groupe_de_champs['avance'])) { |