Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 1171 → Rev 1172

/trunk/services/modules/0.1/bdtfx/Noms.php
584,8 → 584,7
 
 
public function afficherInfosFlore($synonyme, $flore, $nom_flore, $type) {
$statuts = array('R'=> 'nom retenu', 'S' => 'synonyme','r' => 'nom retenu', 'c' => 'cité hors clé', 's' => 'synonyme d’un nom retenu', 'cs' => 'synonyme d’un nom cité hors clé', 'i' => 'nom d’un taxon inclus dans un autre', 'is' => 'syn d’un nom d’un taxon inclus dans un autre');
preg_match('/^([0-9]+)(.*)?$/', $synonyme[$flore.$type], $match);
preg_match('/^([0-9]+)(.*)?$/', $synonyme[$flore.$type], $match);
$this->table_retour[$flore]['nom_flore'] = $nom_flore;
$this->table_retour[$flore]['num'][$synonyme[$flore.$type]]['id'] = $match['1'];
$this->table_retour[$flore]['num'][$synonyme[$flore.$type]]['num_nom'] = $synonyme['num_nom'];
593,13 → 592,46
if (isset($synonyme[$flore.'_rem']) && $synonyme[$flore.'_rem'] != '') {
$this->table_retour[$flore]['num'][$synonyme[$flore.$type]]['remarques'] = $synonyme[$flore.'_rem'];
}
if ($flore == flore_coste) {
$this->table_retour[$flore]['num'][$synonyme[$flore.$type]]['href'] = $this->ajouterHrefAutreProjet('noms', 'nn_coste:', $match[1], $projet);
if ($flore == "flore_coste") {
$this->table_retour[$flore]['num'][$synonyme[$flore.$type]]['href'] = $this->ajouterHrefAutreProjet('textes', 'coste.nn:', $match[1], 'coste');
}
switch ($flore) {
case "flore_coste" : $statuts = array('syn' => 'synonyme', 'incl'=> 'taxons inclus dans', 'x' => 'correspond aux compléments en fin de tome 3',
'hyb' => 'hybride', 'sub' => 'nom apparaissant dans la clé sous');break ;
case "flore_bonnier" : break ; // champ vide
case "flore_cnrs" : $statuts = array('syn' => 'synonyme', 'incl'=> 'taxons inclus dans');break ;
case "flore_fe" : break ; // champ vide
case "flore_coste" : $statuts = array('syn' => 'synonyme', 'inc'=> 'taxons inclus dans', 'x' => 'compléments en fin de tome 3');break ;
case "flore_fh" : $statuts = array('syn' => 'synonyme', 'inc'=> 'taxons inclus dans'); break;
case "flore_fournier" : $statuts = array('syn' => 'synonyme', 'hyb'=> 'hybride', 'sub' => 'nom apparaissant dans la clé sous'); break;
case "flore_belge_ed5" : $statuts = array('R'=> 'nom retenu', 'S' => 'synonyme');break ;
case "flore_fg" : $statuts = array('r' => 'nom retenu', 'c' => 'cité hors clé',
's' => 'synonyme d’un nom retenu', 'cs' => 'synonyme d’un nom cité hors clé',
'i' => 'nom d’un taxon inclus dans un autre', 'is' => 'syn d’un nom d’un taxon inclus dans un autre');break ;
}
/*
* Pour CNRS :
a, b, c, d = le taxon est inclus dans un autre taxon, mentionné en note
 
 
Pour Coste :
a, b,… aux taxons inclus dans
*/
if (isset($statuts[trim($match[2])])) {
$this->table_retour[$flore]['num'][$synonyme[$flore.$type]]['statut'] = $statuts[trim($match[2])];
} else if(trim($match[2]) != "") {
$this->table_retour[$flore]['num'][$synonyme[$flore.$type]]['statut'] = trim($match[2]);
$suf = preg_split('/[\.|-|\s]/', $match[2]);
$statut = "";
foreach ($suf as $s) {
if (isset($statuts[trim($s)])) {
$statut .= $statuts[trim($s)]." ";
} else if (preg_match('/^[a-z]$/', trim($s)) === 1) {
$statut .= "taxon '".trim($s)."' inclus dans un autre taxon ";
} else {
$statut .= trim($s)." ";
}
}
$this->table_retour[$flore]['num'][$synonyme[$flore.$type]]['statut'] = trim($statut);
}
}