Line 274... |
Line 274... |
274 |
$numNomListe = implode(',', $this->ref_tax_demande[$refTax]);
|
274 |
$numNomListe = implode(',', $this->ref_tax_demande[$refTax]);
|
275 |
$depart = $this->parametres['navigation.depart'];
|
275 |
$depart = $this->parametres['navigation.depart'];
|
276 |
$limite = $this->parametres['navigation.limite'];
|
276 |
$limite = $this->parametres['navigation.limite'];
|
Line 277... |
Line 277... |
277 |
|
277 |
|
278 |
//TODO: modifier la requete lors du passage à la nouvelle base de données pour faire quelque chose
|
278 |
//TODO: modifier la requete lors du passage à la nouvelle base de données pour faire quelque chose
|
- |
|
279 |
// du numéro nomenclatural + modifier les champs appelés pour le nouveau format + supprimer table annuaire
|
279 |
// du numéro nomenclatural + modifier les champs appelés pour le nouveau format
|
280 |
$annuaireTable = $this->config['annuaire']['table'];
|
280 |
$requete = 'SELECT SQL_CALC_FOUND_ROWS '.
|
281 |
$requete = 'SELECT SQL_CALC_FOUND_ROWS '.
|
281 |
' ci.ci_id_image AS id_img, co.id AS id_obs, '.
|
282 |
' ci.ci_id_image AS id_img, co.id AS id_obs, '.
|
- |
|
283 |
' identifiant AS utilisateur_courriel, '.
|
282 |
' identifiant AS utilisateur_courriel, '.
|
284 |
' an.u_id AS utilisateur_id, '.
|
283 |
' nom_sel, num_nom_sel, '.
|
285 |
' nom_sel, num_nom_sel, '.
|
284 |
' location, id_location, lieudit, station, milieu, '.
|
286 |
' location, id_location, lieudit, station, milieu, '.
|
285 |
' ci.ci_meta_date AS date '.
|
287 |
' ci.ci_meta_date AS date '.
|
286 |
'FROM cel_images AS ci'.
|
288 |
'FROM cel_images AS ci'.
|
287 |
' LEFT JOIN cel_obs_images AS coi '.
|
289 |
' LEFT JOIN cel_obs_images AS coi '.
|
288 |
' ON (coi.coi_ce_image = ci.ci_id_image) '.
|
290 |
' ON (coi.coi_ce_image = ci.ci_id_image) '.
|
289 |
' LEFT JOIN cel_inventory AS co '.
|
291 |
' LEFT JOIN cel_inventory AS co '.
|
- |
|
292 |
' ON (coi.coi_ce_observation = co.ordre AND coi.coi_ce_utilisateur = co.identifiant) '.
|
- |
|
293 |
" LEFT JOIN $annuaireTable AS an ".
|
290 |
' ON (coi.coi_ce_observation = co.ordre AND coi.coi_ce_utilisateur = co.identifiant) '.
|
294 |
' ON (co.identifiant = an.u_mail) '.
|
291 |
$this->formerRequeteConditions($numNomListe).
|
295 |
$this->formerRequeteConditions($numNomListe).
|
292 |
' GROUP BY id_img '.
|
296 |
' GROUP BY id_img '.
|
293 |
$this->formerRequeteTri().
|
297 |
$this->formerRequeteTri().
|
Line 445... |
Line 449... |
445 |
|
449 |
|
446 |
private function formaterInfosImage($img) {
|
450 |
private function formaterInfosImage($img) {
|
447 |
$info = array();
|
451 |
$info = array();
|
448 |
$info['date'] = $img['date'];
|
452 |
$info['date'] = $img['date'];
|
449 |
$info['mime'] = self::MIME_JPEG;
|
453 |
$info['mime'] = self::MIME_JPEG;
|
- |
|
454 |
$info['auteur.libelle'] = $this->formaterAuteur($img);
|
450 |
$info['auteur'] = $this->formaterAuteur($img);
|
455 |
$info['auteur.id'] = $img['utilisateur_id'];
|
451 |
$info['binaire.href'] = $this->formaterUrlImage($img);
|
456 |
$info['binaire.href'] = $this->formaterUrlImage($img);
|
452 |
$info['determination.libelle'] = $this->formaterDetermination($img);
|
457 |
$info['determination.libelle'] = $this->formaterDetermination($img);
|
453 |
$info['determination.nom_sci'] = $img['nom_sel'];
|
458 |
$info['determination.nom_sci'] = $img['nom_sel'];
|
454 |
$info['determination.nom_sci.code'] = $this->formaterNomSciCode($img);
|
459 |
$info['determination.nom_sci.code'] = $this->formaterNomSciCode($img);
|