Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1289 → Rev 1290

/trunk/services/modules/0.1/syndication/SyndicationCommentaires.php
159,31 → 159,38
}
 
private function creerTitre($element) {
$intitule = ($element['nom_sel'] != '') ? 'Proposition' : 'Commentaire';
$idObs = $element['dob_id_observation'];
$nomSel = htmlspecialchars($element['dob_nom_sel']);
$nomPropose = htmlspecialchars($element['nom_sel']);
$intitule = ($element['nom_sel'] != '') ? "Proposition $nomPropose" : 'Commentaire';
$auteur = htmlspecialchars($this->creerAuteur($element));
$nomSelActuel = htmlspecialchars($element['dob_nom_sel']);
$zoneGeo = htmlspecialchars((($element['dob_zone_geo'] != '') ? $element['dob_zone_geo'] : '?'));
$dateObs = htmlspecialchars(strftime('%d %B %Y', strtotime($element['dob_date_observation'])));
 
$titre = "$intitule - Observation $idObs - $nomSel à $zoneGeo le $dateObs";
$titre = "$intitule par $auteur pour $nomSelActuel à $zoneGeo le $dateObs";
return $titre;
}
 
private function creerDescription($donnees, $item) {
$idCommentaire = $donnees['id_commentaire'];
$nomSel = ($donnees['nom_sel'] != '') ? htmlspecialchars($donnees['nom_sel']) : '';
$idObs = $donnees['dob_id_observation'];
$nomPropose = ($donnees['nom_sel'] != '') ? htmlspecialchars($donnees['nom_sel']) : '';
$nomSelActuel = htmlspecialchars($donnees['dob_nom_sel']);
$etreProposition = ($nomPropose != '') ? true : false;
$txt = ($donnees['texte'] != '') ? htmlspecialchars($donnees['texte']) : '';
$etreProposition = ($nomSel != '') ? true : false;
$auteur = htmlspecialchars($this->creerAuteur($donnees)).
($this->fluxAdminDemande() ? ' ('.$donnees['utilisateur_courriel'].')' : '');
$zoneGeo = htmlspecialchars((($donnees['dob_zone_geo'] != '') ? $donnees['dob_zone_geo'] : '?'));
$dateObs = htmlspecialchars(strftime('%d %B %Y', strtotime($donnees['dob_date_observation'])));
 
$contenu = '';
$contenu = "<li>Observation #$idObs : <em>$nomSelActuel</em></li>".
"<li>Lieu observation : $zoneGeo</li>".
"<li>Date observation : $dateObs</li>";
if ($etreProposition) {
$contenu = "<li>Proposition #$idCommentaire : <em>$nomSel</em></li>".
$contenu .= "<li>Proposition #$idCommentaire : <em>$nomPropose</em></li>".
((!empty($txt)) ? "<li>Argumentaire : $txt</li>" : '').
"<li>Auteur de la proposition : $auteur</li>";
} else {
$contenu = "<li>Commentaire #$idCommentaire : <pre>$txt</pre></li>".
$contenu .= "<li>Commentaire #$idCommentaire : <pre>$txt</pre></li>".
"<li>Auteur du commentaire : $auteur</li>";
}
$description = "<ul>$contenu</ul>";