Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 750 Rev 790
Line 16... Line 16...
16
	private $parametres_origines = null;
16
	private $parametres_origines = null;
17
	private $format = null;
17
	private $format = null;
18
	private $service = null;
18
	private $service = null;
19
	private $squelette = null;
19
	private $squelette = null;
20
	private $squelette_dossier = null;
20
	private $squelette_dossier = null;
-
 
21
	private $auteurs = array();
21
	private $flux = array();
22
	private $flux = array();
Line 22... Line 23...
22
	
23
	
Line 23... Line 24...
23
	private $format_image = 'XL';
24
	private $format_image = 'XL';
Line 210... Line 211...
210
	}
211
	}
Line 211... Line 212...
211
	
212
	
212
	private function executerService($elements) {
213
	private function executerService($elements) {
213
		// Prétraitement des données
214
		// Prétraitement des données
-
 
215
		$donnees = $this->construireDonneesCommunesAuFlux($elements);
-
 
216
		foreach ($elements as $element) {
214
		$donnees = $this->construireDonneesCommunesAuFlux($elements);
217
			$identifiants[$element['identifiant']] = $element['identifiant'];
-
 
218
		}
215
		
219
		$this->auteurs = $this->creerAuteurs($identifiants);
216
		foreach ($elements as $element) {
220
		foreach ($elements as $element) {
217
			$donnees['items'][] = $this->construireDonneesCommunesAuxItems($element);
221
			$donnees['items'][] = $this->construireDonneesCommunesAuxItems($element);
Line 218... Line 222...
218
		}
222
		}
Line 252... Line 256...
252
		$item['guid'] = $this->creerGuidItem($info);
256
		$item['guid'] = $this->creerGuidItem($info);
253
		$item['lien'] = $this->creerLienItem($info);
257
		$item['lien'] = $this->creerLienItem($info);
254
		$item['categorie'] = $this->creerCategorie($item);
258
		$item['categorie'] = $this->creerCategorie($item);
255
		$item['description'] = $this->creerDescription($this->protegerCaracteresHtmlDansChamps($info), $item);
259
		$item['description'] = $this->creerDescription($this->protegerCaracteresHtmlDansChamps($info), $item);
256
		$item['description_encodee'] = htmlspecialchars($this->creerDescription($info, $item));
260
		$item['description_encodee'] = htmlspecialchars($this->creerDescription($info, $item));
257
		$item['modifier_par'] = $this->creerAuteur($info['identifiant'], $this->etreFluxAdmin());
261
		$item['modifier_par'] = $this->auteurs[$info['identifiant']];
258
		return $item;
262
		return $item;
259
	}
263
	}
Line 260... Line 264...
260
	
264
	
261
	private function creerGuidItem($element) {
265
	private function creerGuidItem($element) {
Line 338... Line 342...
338
		return $contenu;
342
		return $contenu;
339
	}
343
	}
Line 340... Line 344...
340
	
344
	
341
	private function creerTitreSimple($element) {
345
	private function creerTitreSimple($element) {
342
		if ($this->etreNull($element['nom_sel']) && $this->etreNull($element['num_nom_sel'])) {
346
		if ($this->etreNull($element['nom_sel']) && $this->etreNull($element['num_nom_sel'])) {
343
			$titre = "Ajout d'une photo par ".$this->creerAuteur($element['ci_ce_utilisateur'], $this->etreFluxAdmin());
347
			$titre = "Ajout d'une photo par ".$this->auteurs[$element['ci_ce_utilisateur']];
344
		} else {
348
		} else {
345
			$titre = $element['nom_sel'].' [nn'.$element['num_nom_sel'].'] par '.$this->creerAuteur($element['ci_ce_utilisateur'], $this->etreFluxAdmin());
349
			$titre = $element['nom_sel'].' [nn'.$element['num_nom_sel'].'] par '.$this->auteurs[$element['ci_ce_utilisateur']];
346
		}
350
		}
347
		return $titre;
351
		return $titre;
Line 348... Line 352...
348
	}
352
	}
Line 653... Line 657...
653
		}
657
		}
654
		return $tableau_criteres_pour_bdd;
658
		return $tableau_criteres_pour_bdd;
655
	}
659
	}
Line 656... Line 660...
656
 
660
 
657
	private function creerDescriptionComplet($donnees, $item) {
661
	private function creerDescriptionComplet($donnees, $item) {
Line 658... Line 662...
658
		$auteur = $this->creerAuteur($donnees['ci_ce_utilisateur'], $this->etreFluxAdmin());
662
		$auteur = $this->auteurs[$donnees['ci_ce_utilisateur']];
659
		
663
		
660
		$id_img = $donnees['ci_id_image'];
664
		$id_img = $donnees['ci_id_image'];
661
		$nom_fichier = $donnees['ci_nom_original'];
665
		$nom_fichier = $donnees['ci_nom_original'];