Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 163 → Rev 165

/trunk/modules/recherche/Recherche.php
5,6 → 5,7
// Méthodes
protected $nom = null;
protected $type_nom = 'nom_scientifique';
protected $type_resultat = '';
protected $submit = '';
public function initialiser() {
$this->capturerParametres();
47,7 → 48,7
? new NomsVernaculaires(Config::get(Registre::get('parametres.referentiel').'.referentielVerna'))
: new Noms(Registre::get('parametres.referentiel'));
$approche = '';
$res = $noms->getRechercheEtendue($this->nom);
$res = $noms->getRechercheEtendue($this->nom, $this->type_resultat);
$form = I18n::get('Recherche-form-nom');
if ($res == false || $res['entete']['total'] == 0) { // recherche nom approché
$approche = $this->rechercherNomApproche($noms);
90,7 → 91,29
if (isset($_GET['submit'])) {
$this->submit = urldecode($_GET['submit']);
}
if (isset($_GET['resultat'])) {
$this->type_resultat = urldecode($_GET['resultat']);
} else {
$onglet_resultat = $this->recupererTableauConfig('affich_resultats');
$this->type_resultat = $onglet_resultat[Registre::get('parametres.niveau').'_'.$this->type_nom];
}
}
protected function recupererTableauConfig($param) {
$tableau = array();
$tableauPartiel = explode(',', Config::get($param));
$tableauPartiel = array_map('trim', $tableauPartiel);
foreach ($tableauPartiel as $champ) {
if (strpos($champ, '=') === false) {
$tableau[] = $champ;
} else {
list($cle, $val) = explode('=', $champ);
$tableau[$cle] = $val;
}
}
return $tableau;
}
}
?>