Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 195 → Rev 196

/trunk/metier/api_0.1/NomsVernaculaires.php
33,7 → 33,7
private function getUrlRecherche($nom, $typeRech) {
$tpl = Config::get('nomsVernaRechercheTpl');
$params = array('valeur' => $nom, 'type' => $typeRech);
$params = array('valeur' => $nom, 'type' => $typeRech, 'langue' => 'fra');
Debug::printr($params,'Params');
$url = $this->formaterUrl($tpl, $params);
Debug::printr($tpl,'TPL');
42,8 → 42,8
}
private function getUrlRechercheDetermination($nom, $typeRech) {
$tpl = Config::get('nomsVernaRechercheTpl');
$params = array('valeur' => $nom, 'type' => $typeRech);
$tpl = Config::get('nomsVernaRechercheDeterminationTpl');
$params = array('valeur' => $nom, 'type' => $typeRech, 'langue' => 'fra');
Debug::printr($params,'Params');
$url = $this->formaterUrl($tpl, $params);
Debug::printr($tpl,'TPL');
/trunk/configurations/config.defaut.ini
103,8 → 103,8
nomsRechercheSynonymeTpl = "{ref:nomsTpl}?masque={valeur}&recherche={type}&ns.format=txt&navigation.limite=3000"
nomsRechercheDeterminationTpl = "{ref:nomsTpl}?masque={valeur}&recherche={type}&ns.format=txt&retour.champs=nom_retenu,nom_retenu.*&navigation.limite=3000"
nomsRechercheDecompoTpl = "{ref:nomsTpl}?masque={valeur}&recherche={type}&ns.format=txt&retour.champs=auteur,annee,biblio_origine,nom_addendum&navigation.limite=3000"
nomsVernaTpl = "{ref:baseUrlApiEflore}/noms-vernaculaires"
nomsVernaRechercheTpl = "{ref:nomsVernaTpl}?masque.nv={valeur}&recherche={type}"
nomsVernaRechercheTpl = "{ref:nomsVernaTpl}?masque.nv={valeur}&recherche={type}&masque.lg={langue}"
nomsVernaRechercheDeterminationTpl = "{ref:nomsVernaTpl}/attributions?masque.nv={valeur}&recherche={type}&masque.lg={langue}"
 
taxonsTpl = "{ref:baseUrlApiEflore}/taxons"
taxonsStatsInitialesRangTpl = "{ref:taxonsTpl}/stats/initiales?masque.rg={rang}"
/trunk/tests/metier/NomsVernaculairesTest.php
30,7 → 30,7
$noms = new NomsVernaculaires();
$resultats = $noms->getRechercheFloue('abricotier');
$this->assertNotEmpty($resultats);
$this->assertEquals('5', $resultats['entete']['total']);
$this->assertEquals('1', $resultats['entete']['total']);
}
}
?>