Subversion Repositories eFlore/Applications.del

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1921 → Rev 1922

/trunk/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;
}
}
Property changes:
Added: svnkit:entry:sha1-checksum
+474012b08dfb5d9bd5f4a18e3e5eeb6903cfb084
\ No newline at end of property