Subversion Repositories eFlore/Applications.del

Rev

Rev 1294 | Rev 1307 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1294 Rev 1304
Line 99... Line 99...
99
		$donnees['description'] = 'Ce flux regroupe les dernières déterminations et commentaires rédigés dans l\'application identiPlante';
99
		$donnees['description'] = 'Ce flux regroupe les dernières déterminations et commentaires rédigés dans l\'application identiPlante';
100
		$donnees['lien_service'] = $this->creerUrlService();
100
		$donnees['lien_service'] = $this->creerUrlService();
101
		$donnees['lien_del'] = $this->conteneur->getParametre('delAppliLien');
101
		$donnees['lien_del'] = $this->conteneur->getParametre('delAppliLien');
102
		$donnees['editeur'] = $this->conteneur->getParametre('editeur');
102
		$donnees['editeur'] = $this->conteneur->getParametre('editeur');
103
		$derniere_info_en_date = reset($infos);
103
		$derniere_info_en_date = reset($infos);
104
		$date_modification_timestamp = strtotime($derniere_info_en_date['date']);
104
		$date_modification_timestamp = $this->convertirDateHeureMysqlEnTimestamp($derniere_info_en_date['date']);
105
		$donnees['date_maj_RSS'] = date(DATE_RSS, $date_modification_timestamp);
105
		$donnees['date_maj_RSS'] = date(DATE_RSS, $date_modification_timestamp);
106
		$donnees['date_maj_ATOM'] = date(DATE_ATOM, $date_modification_timestamp);
106
		$donnees['date_maj_ATOM'] = date(DATE_ATOM, $date_modification_timestamp);
107
		$donnees['date_maj_W3C'] = date(DATE_W3C, $date_modification_timestamp);
107
		$donnees['date_maj_W3C'] = date(DATE_W3C, $date_modification_timestamp);
108
		$donnees['annee_courante'] = date('Y');
108
		$donnees['annee_courante'] = date('Y');
109
		$donnees['generateur'] = 'DEL - SyndicationCommentaire';
109
		$donnees['generateur'] = 'DEL - SyndicationCommentaire';
Line 116... Line 116...
116
		return $url_service;
116
		return $url_service;
117
	}
117
	}
Line 118... Line 118...
118
 
118
 
119
	private function construireDonneesCommunesAuxItems($info) {
119
	private function construireDonneesCommunesAuxItems($info) {
120
		$item = array();
120
		$item = array();
121
		$date_modification_timestamp = strtotime($info['date']);
121
		$date_modification_timestamp = $this->convertirDateHeureMysqlEnTimestamp($info['date']);
122
		$item['date_maj_simple'] = strftime('%A %d %B %Y à %H:%M', $date_modification_timestamp);
122
		$item['date_maj_simple'] = strftime('%A %d %B %Y à %H:%M', $date_modification_timestamp);
123
		$item['date_maj_RSS'] = date(DATE_RSS, $date_modification_timestamp);
123
		$item['date_maj_RSS'] = date(DATE_RSS, $date_modification_timestamp);
124
		$item['date_maj_ATOM'] = date(DATE_ATOM, $date_modification_timestamp);
124
		$item['date_maj_ATOM'] = date(DATE_ATOM, $date_modification_timestamp);
125
		$item['date_maj_W3C'] = date(DATE_W3C, $date_modification_timestamp);
125
		$item['date_maj_W3C'] = date(DATE_W3C, $date_modification_timestamp);
Line 131... Line 131...
131
		$item['description_encodee'] = htmlspecialchars($this->creerDescription($info, $item));
131
		$item['description_encodee'] = htmlspecialchars($this->creerDescription($info, $item));
132
		$item['modifier_par'] = $this->creerAuteur($info);
132
		$item['modifier_par'] = $this->creerAuteur($info);
133
		return $item;
133
		return $item;
134
	}
134
	}
Line -... Line 135...
-
 
135
 
-
 
136
	protected function convertirDateHeureMysqlEnTimestamp($date_heure_mysql){
-
 
137
		$timestamp = 1;
-
 
138
		if ($date_heure_mysql != '0000-00-00 00:00:00') {
-
 
139
			$val = explode(' ', $date_heure_mysql);
-
 
140
			$date = explode('-', $val[0]);
-
 
141
			$heure = explode(':', $val[1]);
-
 
142
			$timestamp = mktime((int) $heure[0], (int) $heure[1], (int) $heure[2], (int) $date[1], (int) $date[2], (int) $date[0]);
-
 
143
		}
-
 
144
		return $timestamp;
-
 
145
	}
135
 
146
 
136
	private function creerTitre($element) {
147
	private function creerTitre($element) {
137
		$nomPropose = htmlspecialchars($element['nom_sel']);
148
		$nomPropose = htmlspecialchars($element['nom_sel']);
138
		$intitule = ($element['nom_sel'] != '') ? "Proposition $nomPropose" : 'Commentaire';
149
		$intitule = ($element['nom_sel'] != '') ? "Proposition $nomPropose" : 'Commentaire';
139
		$auteur = htmlspecialchars($this->creerAuteur($element));
150
		$auteur = htmlspecialchars($this->creerAuteur($element));
Line 171... Line 182...
171
 
182
 
172
	private function creerDescription($donnees, $item) {
183
	private function creerDescription($donnees, $item) {
173
		$idCommentaire = $donnees['id_commentaire'];
184
		$idCommentaire = $donnees['id_commentaire'];
174
		$idObs = $donnees['dob_id_observation'];
185
		$idObs = $donnees['dob_id_observation'];
175
		$nomPropose = ($donnees['nom_sel'] != '') ? htmlspecialchars($donnees['nom_sel']) : '';
186
		$nomPropose = ($donnees['nom_sel'] != '') ? htmlspecialchars($donnees['nom_sel']) : '';
176
		$dateCommentaire = htmlspecialchars(strftime('%A %d %B %Y à %H:%M', strtotime($donnees['date'])));
187
		$dateCommentaire = htmlspecialchars(strftime('%A %d %B %Y à %H:%M', $this->convertirDateHeureMysqlEnTimestamp($donnees['date'])));
177
		$nomSelActuel = htmlspecialchars($donnees['dob_nom_sel']);
188
		$nomSelActuel = htmlspecialchars($donnees['dob_nom_sel']);
178
		$etreProposition = ($nomPropose != '') ? true : false;
189
		$etreProposition = ($nomPropose != '') ? true : false;
179
		$intitule = ($etreProposition) ? 'Proposition' : 'Commentaire';
190
		$intitule = ($etreProposition) ? 'Proposition' : 'Commentaire';
180
		$txt = ($donnees['texte'] != '') ? htmlspecialchars($donnees['texte']) : '';
191
		$txt = ($donnees['texte'] != '') ? htmlspecialchars($donnees['texte']) : '';