Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1919 → Rev 1920

/branches/v1.5-carbone/services/modules/0.1/determinations/ListeImagesDeterminationsProbables.php
58,8 → 58,8
 
// Lancement du service
$this->idsImagesOrdonnees = $this->getIdsImages();
$this->modifierEnteteTotal();
$infos = $this->chargerInfos();
$this->modifierEnteteTotal();
if ($infos) {
$this->traiterResultats($infos);
$this->completerResutlats();
112,7 → 112,7
'FROM del_image AS di '.
' LEFT JOIN del_image_stat AS ds ON (di.id_image = ds.ce_image) '.
"$whereClause ".
'ORDER BY moyenne DESC '.
'ORDER BY moyenne DESC, id_image DESC '.
"LIMIT $depart, $limite ".
' -- '.__FILE__.' : '.__LINE__;
//Debug::printr($requete);
153,8 → 153,9
' LEFT JOIN del_utilisateur AS du ON (di.ce_utilisateur = du.id_utilisateur) '.
' LEFT JOIN del_image_stat AS ds ON (di.id_image = ds.ce_image) '.
"WHERE di.id_image IN ($idImgsConcat) ".
'ORDER BY moyenne DESC '.
'ORDER BY moyenne DESC, id_image DESC '.
' -- '.__FILE__.' : '.__LINE__;
//Debug::printr($requete);
return $this->bdd->recupererTous($requete);
}
 
257,6 → 258,7
$this->resultats[$index]['determination.ns'] = $this->propositions[$id_obs]['nom_sel'];
$this->resultats[$index]['determination.nn'] = $this->propositions[$id_obs]['nom_sel_nn'];
$this->resultats[$index]['determination.nt'] = $this->propositions[$id_obs]['nt'];
$this->resultats[$index]['determination.referentiel'] = $this->propositions[$id_obs]['nom_referentiel'];
}
$this->completerUrlFicheEflore($index);
}
338,9 → 340,23
private function completerUrlFicheEflore($index) {
if (isset($this->resultats[$index]['determination.nn'])) {
$urlTpl = $this->conteneur->getParametre('determinations.url_fiche_eflore_tpl');
$nn = $this->resultats[$index]['determination.nn'];
$nn = (int) $this->resultats[$index]['determination.nn'];
$ref = $this->resultats[$index]['determination.referentiel'];
$code_ref = $this->getCodeReferentiel($ref);
if (is_int($nn) && ! isset($code_ref)) {
$code_ref = 'bdtfx';
}
$this->resultats[$index]['url_fiche_eflore'] = sprintf($urlTpl, $code_ref, $nn);
}
}
 
$this->resultats[$index]['url_fiche_eflore'] = sprintf($urlTpl, $nn);
private function getCodeReferentiel($ref) {
$code = $ref;
if ($position = strpos($ref, '_')) {
$code = substr($ref, 0, $position);
} else if ($position = strpos($ref, ':')) {
$code = substr($ref, 0, $position);
}
return $code;
}
}
/branches/v1.5-carbone/services/configurations/config.defaut.ini
174,7 → 174,7
; Format d'image pour les liens du web service ListeImagesDeterminationsProbables
format_image = "L"
; Template d'URL pour la fiche eFlore d'un nom
url_fiche_eflore_tpl = "http://www.tela-botanica.org/nn%s";
url_fiche_eflore_tpl = "http://www.tela-botanica.org/%s-nn-%s";
 
[nomstaxons]
; Masque de filtrage possible pour la consultation :
/branches/v1.5-carbone/services/bibliotheque/Navigation.php
18,6 → 18,7
 
private $conteneur;
private $parametresUrl;
private $ressourcesUrl;
private $serviceNom;
private $filtresPossibles;
private $filtresActifs;
36,6 → 37,9
$this->parametresUrl = $contexte->getQS();
$this->serviceNom = $contexte->getRessource(1);
 
$ressources = $contexte->getRessource();
$this->ressourcesUrl = implode('/', array_slice($ressources, 1));
 
$this->filtresPossibles = $this->conteneur->getparametreTableau($this->serviceNom.'.masques_possibles');
$this->chargerFiltresActifs();
}
86,7 → 90,7
$parametres['navigation.depart'] = $depart;
$parametres['navigation.limite'] = $limite;
 
$urlServiceBase = $this->conteneur->getParametre('url_service_base').$this->serviceNom;
$urlServiceBase = $this->conteneur->getParametre('url_service_base').$this->ressourcesUrl;
$urlNavigation = $this->conteneur->getUrl($urlServiceBase);
$urlNavigation->setOption(Url::OPTION_ENCODER_VALEURS, true);
$urlNavigation->setRequete($parametres);