Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 1123 | Rev 1135 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1123 Rev 1130
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe mère du module Liste.
4
 * Classe mère du module Liste.
5
 *
5
 *
6
 * @category	PHP 5.2
6
 * @category	PHP 5.2
7
 * @package		eflore-consultation
7
 * @package		eflore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @copyright	2011 Tela-Botanica
10
 * @copyright	2011 Tela-Botanica
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @version		$Id$
13
 * @version		$Id$
14
 */
14
 */
15
class Illustrations extends aControleur {
15
class Illustrations extends aControleur {
16
 
16
 
17
	private $conteneur = null;
17
	private $conteneur = null;
18
	private $nomCourant = null;
18
	private $nomCourant = null;
19
	private $images = null;
19
	private $images = null;
20
	private $appUrls = null;
20
	private $appUrls = null;
21
	private $meta = null;
21
	private $meta = null;
22
	private $referentiel = 'bdtfx';
22
	private $referentiel = 'bdtfx';
23
	private $donnees = array();
23
	private $donnees = array();
24
 
24
 
25
	public function __construct(Conteneur $conteneur) {
25
	public function __construct(Conteneur $conteneur) {
26
		$this->conteneur = $conteneur;
26
		$this->conteneur = $conteneur;
27
		$this->nomCourant = $this->conteneur->getNomCourant();
27
		$this->nomCourant = $this->conteneur->getNomCourant();
28
		$this->referentiel = $this->conteneur->getParametre('referentiel');
28
		$this->referentiel = $this->conteneur->getParametre('referentiel');
29
		$this->images = $this->conteneur->getApiImages();
29
		$this->images = $this->conteneur->getApiImages();
30
		$this->appUrls = $this->conteneur->getAppUrls();
30
		$this->appUrls = $this->conteneur->getAppUrls();
31
		$this->meta = $this->conteneur->getApiMetaDonnees();
31
		$this->meta = $this->conteneur->getApiMetaDonnees();
32
	}
32
	}
33
 
33
 
34
	public function obtenirDonnees() {
34
	public function obtenirDonnees() {
35
		$this->donnees['nt'] = $this->nomCourant->getNt();
35
		$this->donnees['nt'] = $this->nomCourant->getNt();
36
		$this->donnees['nnr'] = $this->nomCourant->getNnr();
36
		$this->donnees['nnr'] = $this->nomCourant->getNnr();
37
		$this->donnees['nomSciRetenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html');
37
		$this->donnees['nomSciRetenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html');
38
		$infosNomRetenu = $this->nomCourant->getNomRetenu()->getInfos();
38
		$infosNomRetenu = $this->nomCourant->getNomRetenu()->getInfos();
39
		$this->donnees['nomComplet'] = $infosNomRetenu['nom_complet'];
39
		$this->donnees['nomComplet'] = $infosNomRetenu['nom_complet'];
40
		$this->getPhotos();
40
		$this->getPhotos();
41
		$this->getDessin();
41
		$this->getDessin();
42
		$this->getPhotosOrganes();
42
		$this->getPhotosOrganes();
43
		$this->getPhotosCaracteresIdentification();
43
		$this->getPhotosCaracteresIdentification();
44
		$pso = $this->getPhotosSixOrganes();
44
		$pso = $this->getPhotosSixOrganes();
45
		$this->setCheminSquelette('modules/fiche/squelettes/'); // @FIXME le chemin devrait déjà être défini correctement !?
45
		$this->setCheminSquelette('modules/fiche/squelettes/'); // @FIXME le chemin devrait déjà être défini correctement !?
46
		$this->donnees['illustrationsOrganes'] = $this->getVue('fiche_illustrations_organes',
46
		$this->donnees['illustrationsOrganes'] = $this->getVue('fiche_illustrations_organes',
47
				array('organes' => $pso, 'nnr' => $this->donnees['nnr'], 'nomComplet' => $this->donnees['nomComplet']));
47
				array('organes' => $pso, 'nnr' => $this->donnees['nnr'], 'nomComplet' => $this->donnees['nomComplet']));
48
		return $this->donnees;
48
		return $this->donnees;
49
	}
49
	}
50
	
50
	
51
	public function obtenirDonneesExport() {
51
	public function obtenirDonneesExport() {
52
		$this->donnees['nt'] = $this->nomCourant->getNt();
52
		$this->donnees['nt'] = $this->nomCourant->getNt();
53
		$this->donnees['nomSciRetenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html');
53
		$this->donnees['nomSciRetenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html');
54
		$this->donnees['cel'] = $this->getCelExport();
54
		$this->donnees['cel'] = $this->getCelExport();
55
		$this->donnees['coste'] = $this->getCoste();
55
		$this->donnees['coste'] = $this->getCoste();
56
		return $this->donnees;
56
		return $this->donnees;
57
	}
57
	}
58
 
58
 
59
	public function getBloc() {
59
	public function getBloc() {
60
		$this->donnees = $this->getPhoto('cel');
60
		$this->donnees = $this->getPhoto('cel');
61
		if (empty($this->donnees)) {
61
		if (empty($this->donnees)) {
62
			$infos_image = $this->getDessin();
62
			$infos_image = $this->getDessin();
63
			if (empty($infos_image) == false ){
63
			if (empty($infos_image) == false ){
64
				$this->donnees['imageUrl'] =  array_shift($infos_image['images']);
64
				$this->donnees['imageUrl'] =  array_shift($infos_image['images']);
65
			}
65
			}
66
		}
66
		}
67
		if (empty($this->donnees)) {
67
		if (empty($this->donnees)) {
68
			$this->donnees = $this->getPhoto('photoflora');
68
			$this->donnees = $this->getPhoto('photoflora');
69
		}
69
		}
70
		return $this->donnees;
70
		return $this->donnees;
71
	}
71
	}
72
	
72
	
73
	
73
	
74
	public function getPhoto($source) {
74
	public function getPhoto($source) {
75
		$donnees = array();
75
		$donnees = array();
76
		$this->images->setProjet($source);
76
		$this->images->setProjet($source);
77
		$nnr = $this->nomCourant->getNnr();
77
		$nnr = $this->nomCourant->getNnr();
78
		$infos_image = $this->images->setApi(Eflore::API_EFLORE)->getInfosPremiereImageParIdsNoms(array($nnr));
78
		$infos_image = $this->images->setApi(Eflore::API_EFLORE)->getInfosPremiereImageParIdsNoms(array($nnr));
79
		if ($infos_image != array()) {
79
		if ($infos_image != array()) {
80
			$image = array_shift($infos_image);
80
			$image = array_shift($infos_image);
81
			$donnees['imageUrl'] =  $image['binaire.href'];
81
			$donnees['imageUrl'] =  $image['binaire.href'];
82
		}
82
		}
83
		return $donnees;
83
		return $donnees;
84
	}
84
	}
85
 
85
 
86
	public function getCoste() {
86
	public function getCoste() {
87
		$coste = array();
87
		$coste = array();
88
		$tax = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
88
		$tax = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
89
		$this->images->setProjet('coste');
89
		$this->images->setProjet('coste');
90
		$this->images->setNnTaxon($tax);
90
		$this->images->setNnTaxon($tax);
91
		$costeImg = $this->images->setApi(Eflore::API_EFLORE)->getInfosImagesTaxons();
91
		$costeImg = $this->images->setApi(Eflore::API_EFLORE)->getInfosImagesTaxons();
92
		foreach ($costeImg as $infos) {
92
		foreach ($costeImg as $infos) {
93
			$coste['images'][] = $infos['binaire.href'];
93
			$coste['images'][] = $infos['binaire.href'];
94
		}
94
		}
95
		$this->meta->setProjet('coste');
95
		$this->meta->setProjet('coste');
96
		$meta = $this->meta->getMetaDonnees();
96
		$meta = $this->meta->getMetaDonnees();
97
		$coste['meta']['titre']= $meta[0]['titre'];
97
		$coste['meta'] = $meta[0];
98
		$coste['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('coste');
98
		$coste['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('coste');
99
		return $coste;
99
		return $coste;
100
	}
100
	}
101
 
101
 
102
	public function getDessin() {
102
	public function getDessin() {
103
		$projet = Config::get($this->referentiel.'.baseDessins');
103
		$projet = Config::get($this->referentiel.'.baseDessins');
104
		if ($projet != "") {
104
		if ($projet != "") {
105
			$dessin = array();
105
			$dessin = array();
106
			$tax = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
106
			$tax = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
107
			$this->images->setProjet($projet);
107
			$this->images->setProjet($projet);
108
			$this->images->setNnTaxon($tax);
108
			$this->images->setNnTaxon($tax);
109
			$costeImg = $this->images->setApi(Eflore::API_EFLORE)->getInfosImagesTaxons();
109
			$costeImg = $this->images->setApi(Eflore::API_EFLORE)->getInfosImagesTaxons();
110
				foreach ($costeImg as $infos) {
110
				foreach ($costeImg as $infos) {
111
					$dessin['images'][] = $infos['binaire.href'];
111
					$dessin['images'][] = $infos['binaire.href'];
112
				}
112
				}
113
			$this->meta->setProjet('coste');
113
			$this->meta->setProjet('coste');
114
			$meta = $this->meta->getMetaDonnees();
114
			$meta = $this->meta->getMetaDonnees();
115
			$dessin['meta']['titre']= $meta[0]['titre'];
115
			$dessin['meta'] = $meta[0];
116
			$dessin['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees($projet);
116
			$dessin['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees($projet);
117
			$this->donnees['coste'] = $dessin;
117
			$this->donnees['coste'] = $dessin;
118
		}
118
		}
119
	}
119
	}
120
	
120
	
121
	public function getPhotos() {
121
	public function getPhotos() {
122
		$projets[] = Config::get($this->referentiel.'.baseImages');
122
		$projets[] = Config::get($this->referentiel.'.baseImages');
123
		$projets[] = Config::get($this->referentiel.'.baseImagesSupp');
123
		$projets[] = Config::get($this->referentiel.'.baseImagesSupp');
124
		foreach ($projets as $projet) {
124
		foreach ($projets as $projet) {
125
			if ($projet != "") {
125
			if ($projet != "") {
126
				if ($projet == "cel") {
126
				if ($projet == "cel") {
127
					$this->images->setApi(Eflore::API_EFLORE); // prêt à passer à API_DEL
127
					$this->images->setApi(Eflore::API_EFLORE); // prêt à passer à API_DEL
128
				} else {
128
				} else {
129
					$this->images->setApi(Eflore::API_EFLORE);
129
					$this->images->setApi(Eflore::API_EFLORE);
130
				}
130
				}
131
				$images = $this->initialiserPhotos($projet);
131
				$images = $this->initialiserPhotos($projet);
132
				$this->formaterListePhotos($projet, $images);
132
				$this->formaterListePhotos($projet, $images);
133
				$this->formaterMetaPhotos($projet);
133
				$this->formaterMetaPhotos($projet);
134
			}
134
			}
135
		}
135
		}
136
	}
136
	}
137
	
137
	
138
	public function getPhotosSixOrganes() {
138
	public function getPhotosSixOrganes() {
139
		$organes = array(
139
		$organes = array(
140
				'fleur' => array(),
140
				'fleur' => array(),
141
				'feuille' => array(),
141
				'feuille' => array(),
142
				'fruit' => array(),
142
				'fruit' => array(),
143
				'ecorce' => array(),
143
				'ecorce' => array(),
144
				'port' => array(),
144
				'port' => array(),
145
				'rameau' => array());
145
				'rameau' => array());
146
		$nnr = $this->nomCourant->getNnr();
146
		$nnr = $this->nomCourant->getNnr();
147
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 6, 'CRX2S');
147
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 6, 'CRX2S');
148
		$vide = true;
148
		$vide = true;
149
		foreach ($infosOrganes as $tag => $organe) {
149
		foreach ($infosOrganes as $tag => $organe) {
150
			$organes[$tag] = $organe;
150
			$organes[$tag] = $organe;
151
			$nbImages = count($organe);
151
			$nbImages = count($organe);
152
			if ($nbImages != 0) {
152
			if ($nbImages != 0) {
153
				$vide = false;
153
				$vide = false;
154
				for ($i = 6; $i > $nbImages; $i--) {
154
				for ($i = 6; $i > $nbImages; $i--) {
155
					$organes[$tag][] = null;
155
					$organes[$tag][] = null;
156
				}
156
				}
157
			}
157
			}
158
		}
158
		}
159
		if ($vide) {
159
		if ($vide) {
160
			$organes = array();
160
			$organes = array();
161
		}
161
		}
162
		return $organes;
162
		return $organes;
163
	}
163
	}
164
	
164
	
165
	public function getPhotosOrganes() {
165
	public function getPhotosOrganes() {
166
		$organes = array(
166
		$organes = array(
167
				'fleur' => array(),
167
				'fleur' => array(),
168
				'feuille' => array(),
168
				'feuille' => array(),
169
				'fruit' => array(),
169
				'fruit' => array(),
170
				'ecorce' => array(),
170
				'ecorce' => array(),
171
				'port' => array(),
171
				'port' => array(),
172
				'rameau' => array());
172
				'rameau' => array());
173
		$nnr = $this->nomCourant->getNnr();
173
		$nnr = $this->nomCourant->getNnr();
174
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 1);
174
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 1);
175
		$vide = true;
175
		$vide = true;
176
		foreach ($infosOrganes as $tag => $organe) {
176
		foreach ($infosOrganes as $tag => $organe) {
177
			$nbImages = count($organe);
177
			$nbImages = count($organe);
178
			// une image par organe seulement
178
			// une image par organe seulement
179
			$organes[$tag] = array_pop($organe);
179
			$organes[$tag] = array_pop($organe);
180
			if ($nbImages != 0) {
180
			if ($nbImages != 0) {
181
				$vide = false;
181
				$vide = false;
182
			}
182
			}
183
		}
183
		}
184
		if ($vide) {
184
		if ($vide) {
185
			$organes = array();
185
			$organes = array();
186
		}
186
		}
187
		$this->donnees['organes'] = $organes;
187
		$this->donnees['organes'] = $organes;
188
	}
188
	}
189
	
189
	
190
	public function getPhotosCaracteresIdentification() {
190
	public function getPhotosCaracteresIdentification() {
191
		$caracteres = array();
191
		$caracteres = array();
192
		$nnr = $this->nomCourant->getNnr();
192
		$nnr = $this->nomCourant->getNnr();
193
		$infosCaracteres = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CARACTERES, 3);
193
		$infosCaracteres = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CARACTERES, 3);
194
		if (! empty($infosCaracteres) && ! empty($infosCaracteres[''])) { // le tag est vide, ici
194
		if (! empty($infosCaracteres) && ! empty($infosCaracteres[''])) { // le tag est vide, ici
195
			$caracteres = $infosCaracteres[''];
195
			$caracteres = $infosCaracteres[''];
196
		}
196
		}
197
		$this->donnees['caracteres'] = $caracteres;
197
		$this->donnees['caracteres'] = $caracteres;
198
	}
198
	}
199
 
199
 
200
	// XXX: webservice:
200
	// XXX: webservice:
201
	// /service:eflore:0.1/cel/images?masque.nn=XXX&referentiel=bdtfx&retour.format=CS&navigation.limite=801
201
	// /service:eflore:0.1/cel/images?masque.nn=XXX&referentiel=bdtfx&retour.format=CS&navigation.limite=801
202
	private function initialiserPhotos($projet) {
202
	private function initialiserPhotos($projet) {
203
		$this->images->setProjet($projet);
203
		$this->images->setProjet($projet);
204
		$nnr = $this->nomCourant->getNnr();
204
		$nnr = $this->nomCourant->getNnr();
205
		$ret = $this->images->getInfosImagesParIdsNoms(array($nnr));
205
		$ret = $this->images->getInfosImagesParIdsNoms(array($nnr));
206
		return $ret;
206
		return $ret;
207
	}
207
	}
208
	
208
	
209
	private function formaterListePhotos($projet, $images) {
209
	private function formaterListePhotos($projet, $images) {
210
		foreach ($images as $idImg => $img) {
210
		foreach ($images as $idImg => $img) {
211
			$infosImg = array();
211
			$infosImg = array();
212
			$infosImg['src'] = $img['binaire.href'];
212
			$infosImg['src'] = $img['binaire.href'];
213
			$infosImg['nomSci'] = $img['determination.nom_sci'];
213
			$infosImg['nomSci'] = $img['determination.nom_sci'];
214
			$infosImg['station'] = $img['station.libelle'];
214
			$infosImg['station'] = $img['station.libelle'];
215
			$infosImg['date'] = $this->formaterDateImg($img['date']);
215
			$infosImg['date'] = $this->formaterDateImg($img['date']);
216
			$infosImg['auteur'] = $img['auteur.libelle'];
216
			$infosImg['auteur'] = $img['auteur.libelle'];
217
			if ($projet == "cel") {
217
			if ($projet == "cel") {
218
				$infosImg['urlDetailImg'] = $this->appUrls->obtenirUrlPopUpIllustrations($idImg);
218
				$infosImg['urlDetailImg'] = $this->appUrls->obtenirUrlPopUpIllustrations($idImg);
219
				$infosImg['urlContact'] = $this->appUrls->obtenirUrlPopUpContact($img['auteur.id'], $idImg);
219
				$infosImg['urlContact'] = $this->appUrls->obtenirUrlPopUpContact($img['auteur.id'], $idImg);
220
				$infosImg['urlProfil'] = $this->appUrls->obtenirUrlProfilAnnuaire($img['auteur.id']);
220
				$infosImg['urlProfil'] = $this->appUrls->obtenirUrlProfilAnnuaire($img['auteur.id']);
221
				$infosImg['urlMauvaiseIdentification'] =  $this->appUrls->obtenirUrlMauvaiseIdentification($img['observation.id']);
221
				$infosImg['urlMauvaiseIdentification'] =  $this->appUrls->obtenirUrlMauvaiseIdentification($img['observation.id']);
222
			}
222
			}
223
			$this->donnees[$projet]['images'][$idImg] = $infosImg;
223
			$this->donnees[$projet]['images'][$idImg] = $infosImg;
224
		}
224
		}
225
	}
225
	}
226
	
226
	
227
	private function formaterMetaPhotos($projet) {
227
	private function formaterMetaPhotos($projet) {
228
		$this->meta->setProjet($projet);
228
		$this->meta->setProjet($projet);
229
		$meta = $this->meta->getMetaDonnees();
229
		$meta = $this->meta->getMetaDonnees();
230
		$titreMeta = $meta[0]['titre'];
230
		$titreMeta = $meta[0];
231
		$this->donnees[$projet]['meta']['titre'] = $titreMeta;
231
		$this->donnees[$projet]['meta'] = $titreMeta;
232
		$this->donnees[$projet]['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees($projet);
232
		$this->donnees[$projet]['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees($projet);
233
	}
233
	}
234
	
234
	
235
	
235
	
236
	
236
	
237
	public function getCelExport() {
237
	public function getCelExport() {
238
		$cel = array();
238
		$cel = array();
239
		$this->images->setProjet('cel');
239
		$this->images->setProjet('cel');
240
		$nnr = $this->nomCourant->getNnr();
240
		$nnr = $this->nomCourant->getNnr();
241
		$img = $this->images->getUrlPremiereImageParIdsNoms(array($nnr));
241
		$img = $this->images->getUrlPremiereImageParIdsNoms(array($nnr));
242
		if($img) {
242
		if($img) {
243
			$img = array_values($img);
243
			$img = array_values($img);
244
			$cel['images']['src'] = $img[0]['binaire.href'];
244
			$cel['images']['src'] = $img[0]['binaire.href'];
245
			$cel['images']['nomSci'] = $img[0]['determination.nom_sci'];
245
			$cel['images']['nomSci'] = $img[0]['determination.nom_sci'];
246
			$cel['images']['station'] = $img[0]['station.libelle'];
246
			$cel['images']['station'] = $img[0]['station.libelle'];
247
			$cel['images']['date'] = $this->formaterDateImg($img[0]['date']);
247
			$cel['images']['date'] = $this->formaterDateImg($img[0]['date']);
248
			$cel['images']['auteur'] = $img[0]['auteur.libelle'];
248
			$cel['images']['auteur'] = $img[0]['auteur.libelle'];
249
			$this->meta->setProjet('cel');
249
			$this->meta->setProjet('cel');
250
			$meta = $this->meta->getMetaDonnees();
250
			$meta = $this->meta->getMetaDonnees();
251
			$titreMeta = $meta[0]['titre'];
-
 
252
			$cel['meta']['titre'] = $titreMeta;
251
			$cel['meta'] = $meta[0];
253
			$cel['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('cel');
252
			$cel['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('cel');
254
		}
253
		}
255
		return $cel;
254
		return $cel;
256
	}
255
	}
257
 
256
 
258
	private function formaterDateImg($date) {
257
	private function formaterDateImg($date) {
259
		$dateFmt = $date;
258
		$dateFmt = $date;
260
		if ($date == '' || $date == null || $date == '0000-00-00' || $date == '1970-01-01 01:01:01') {
259
		if ($date == '' || $date == null || $date == '0000-00-00' || $date == '1970-01-01 01:01:01') {
261
			return 'inconnue';
260
			return 'inconnue';
262
		}
261
		}
263
		$time = strtotime($date);
262
		$time = strtotime($date);
264
		if(!$time) {
263
		if(!$time) {
265
			/* TODO: php -r "echo strtotime('1891-00-00 00:00:00');"
264
			/* TODO: php -r "echo strtotime('1891-00-00 00:00:00');"
266
			   TODO: fixer le template pour affiche "en l'année X", plutôt que "le X"
265
			   TODO: fixer le template pour affiche "en l'année X", plutôt que "le X"
267
			   si FALSE pour avant 1901: problème php
266
			   si FALSE pour avant 1901: problème php
268
			   On retourne alors simplement l'année.
267
			   On retourne alors simplement l'année.
269
			   si correction, ne pas oublier modules/popup_illustrations/PopupIllustrations.php */
268
			   si correction, ne pas oublier modules/popup_illustrations/PopupIllustrations.php */
270
			$dateFmt = explode('-', $date);
269
			$dateFmt = explode('-', $date);
271
			return $dateFmt[0];
270
			return $dateFmt[0];
272
		}
271
		}
273
		return strftime('%e %B %Y', strtotime($date));
272
		return strftime('%e %B %Y', strtotime($date));
274
	}
273
	}
275
 
274
 
276
	private function formaterNomSci($nom) {
275
	private function formaterNomSci($nom) {
277
		$nomFmt = $nom;
276
		$nomFmt = $nom;
278
		if (is_null($nom) || $nom == '') {
277
		if (is_null($nom) || $nom == '') {
279
			$nomFmt = 'inconnu';
278
			$nomFmt = 'inconnu';
280
		}
279
		}
281
		return $nomFmt;
280
		return $nomFmt;
282
	}
281
	}
283
}
282
}
284
?>
283
?>