Line 155... |
Line 155... |
155 |
$noms = ($this->type_nom == 'nom_vernaculaire')
|
155 |
$noms = ($this->type_nom == 'nom_vernaculaire')
|
156 |
? new NomsVernaculaires(Config::get(Registre::get('parametres.referentiel').'.referentielVerna'))
|
156 |
? new NomsVernaculaires(Config::get(Registre::get('parametres.referentiel').'.referentielVerna'))
|
157 |
: new Noms(Registre::get('parametres.referentiel'));
|
157 |
: new Noms(Registre::get('parametres.referentiel'));
|
158 |
$approche = '';
|
158 |
$approche = '';
|
159 |
$res = $noms->getRechercheEtendue($this->nom, $this->type_resultat);
|
159 |
$res = $noms->getRechercheEtendue($this->nom, $this->type_resultat);
|
- |
|
160 |
echo "RES: <pre>".print_r($res,true)."</pre>";
|
160 |
$form = I18n::get('Recherche-form-nom');
|
161 |
$form = I18n::get('Recherche-form-nom');
|
161 |
if ($res == false || $res['entete']['total'] == 0) { // recherche nom approché
|
162 |
if ($res == false || $res['entete']['total'] === 0) { // recherche nom approché
|
162 |
$approche = $this->rechercherNomApproche($noms);
|
163 |
$approche = $this->rechercherNomApproche($noms);
|
163 |
} elseif ($res['entete']['total'] == 1 || $this->acces_fiche) { // renvoie à la fiche
|
164 |
} elseif ($res['entete']['total'] == 1 || $this->acces_fiche) { // renvoie à la fiche
|
164 |
$approche = $this->traiterAccesFiche($res);
|
165 |
$approche = $this->traiterAccesFiche($res);
|
165 |
} else { // affiche les résultats
|
166 |
} else { // affiche les résultats
|
166 |
$res['type'] = $this->type_nom;
|
167 |
$res['type'] = $this->type_nom;
|