Line 491... |
Line 491... |
491 |
$item['guid'] = $this->creerGuidItem($observation);
|
491 |
$item['guid'] = $this->creerGuidItem($observation);
|
492 |
$item['lien'] = $this->creerLienItem($observation);
|
492 |
$item['lien'] = $this->creerLienItem($observation);
|
493 |
$item['categorie'] = $this->creerCategorie($item);
|
493 |
$item['categorie'] = $this->creerCategorie($item);
|
494 |
$item['description'] = $this->creerDescription($this->protegerCaracteresHtmlDansChamps($observation), $item);
|
494 |
$item['description'] = $this->creerDescription($this->protegerCaracteresHtmlDansChamps($observation), $item);
|
495 |
$item['description_encodee'] = htmlspecialchars($this->creerDescription($observation, $item));
|
495 |
$item['description_encodee'] = htmlspecialchars($this->creerDescription($observation, $item));
|
496 |
$item['modifier_par'] = $this->auteurs[$observation['identifiant']];
|
496 |
$item['modifier_par'] = $this->getIntituleAuteur($observation['identifiant']);
|
497 |
return $item;
|
497 |
return $item;
|
498 |
}
|
498 |
}
|
Line 499... |
Line 499... |
499 |
|
499 |
|
500 |
private function creerTitre($obs) {
|
500 |
private function creerTitre($obs) {
|
501 |
$date = $obs['date_observation'];
|
501 |
$date = $obs['date_observation'];
|
502 |
$date = date("d/m/Y", strtotime($date));
|
502 |
$date = date("d/m/Y", strtotime($date));
|
503 |
$nom_plante = $obs['nom_sel'].' [nn'.$obs['num_nom_sel'].']';
|
503 |
$nom_plante = $obs['nom_sel'].' [nn'.$obs['num_nom_sel'].']';
|
504 |
$lieu = $obs['location'].' ('.$obs['id_location'].')';
|
504 |
$lieu = $obs['location'].' ('.$obs['id_location'].')';
|
505 |
$utilisateur = $this->auteurs[$obs['identifiant']];
|
505 |
$utilisateur = $this->getIntituleAuteur($obs['identifiant']);
|
506 |
$titre = "$nom_plante à $lieu par $utilisateur le $date";
|
506 |
$titre = "$nom_plante à $lieu par $utilisateur le $date";
|
507 |
$titre = $this->nettoyerTexte($titre);
|
507 |
$titre = $this->nettoyerTexte($titre);
|
508 |
return $titre;
|
508 |
return $titre;
|
Line 524... |
Line 524... |
524 |
private function creerDescription($obs, $item) {
|
524 |
private function creerDescription($obs, $item) {
|
525 |
$id_obs = $obs['id'];
|
525 |
$id_obs = $obs['id'];
|
526 |
$famille = $obs['famille'];
|
526 |
$famille = $obs['famille'];
|
527 |
$nom_saisi = $obs['nom_sel'];
|
527 |
$nom_saisi = $obs['nom_sel'];
|
528 |
$nom_retenu = $obs['nom_ret'];
|
528 |
$nom_retenu = $obs['nom_ret'];
|
529 |
$auteur = $this->auteurs[$obs['identifiant']];
|
529 |
$auteur = $this->getIntituleAuteur($obs['identifiant']);
|
530 |
$mots_cles_obs = $this->decoderMotsClesObs($obs['identifiant'], $obs['mots_cles']);
|
530 |
$mots_cles_obs = $this->decoderMotsClesObs($obs['identifiant'], $obs['mots_cles']);
|
531 |
$lien_correction = sprintf($this->config['settings']['phpEditUrlTpl'], $obs['id']);
|
531 |
$lien_correction = sprintf($this->config['settings']['phpEditUrlTpl'], $obs['id']);
|
532 |
$lieu = $obs['location'].' ('.$obs['id_location'].') > '.$obs['lieudit'].' > '.$obs['station'];
|
532 |
$lieu = $obs['location'].' ('.$obs['id_location'].') > '.$obs['lieudit'].' > '.$obs['station'];
|
533 |
$milieu = $obs['milieu'];
|
533 |
$milieu = $obs['milieu'];
|
534 |
$coordonnees = ($this->etreNull($obs['coord_x']) && $this->etreNull($obs['coord_y'])) ? '' : $obs['coord_x'].'/'.$obs['coord_y'];
|
534 |
$coordonnees = ($this->etreNull($obs['coord_x']) && $this->etreNull($obs['coord_y'])) ? '' : $obs['coord_x'].'/'.$obs['coord_y'];
|
Line 579... |
Line 579... |
579 |
}
|
579 |
}
|
580 |
$url_service .= '?'.implode('&', $parametres_get);
|
580 |
$url_service .= '?'.implode('&', $parametres_get);
|
581 |
}
|
581 |
}
|
582 |
return $url_service;
|
582 |
return $url_service;
|
583 |
}
|
583 |
}
|
- |
|
584 |
|
- |
|
585 |
private function getIntituleAuteur($courriel) {
|
- |
|
586 |
$courriel = strtolower($courriel);
|
- |
|
587 |
$intitule = $this->auteurs[$courriel];
|
- |
|
588 |
return $intitule;
|
- |
|
589 |
}
|
584 |
}
|
590 |
}
|
585 |
|
591 |
|