Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 506 Rev 522
Line 333... Line 333...
333
		$item['guid'] = $this->creerGuidItem($observation);
333
		$item['guid'] = $this->creerGuidItem($observation);
334
		$item['lien'] = $this->creerLienItem($observation);
334
		$item['lien'] = $this->creerLienItem($observation);
335
		$item['description'] = $this->creerDescription($observation, $item);
335
		$item['description'] = $this->creerDescription($observation, $item);
336
		$item['categorie'] = $this->creerCategorie($item);
336
		$item['categorie'] = $this->creerCategorie($item);
337
		$item['description_encodee'] = htmlspecialchars($item['description']);
337
		$item['description_encodee'] = htmlspecialchars($item['description']);
338
		$item['modifier_par'] = $this->creerAuteur($observation['identifiant']);
338
		$item['modifier_par'] = $this->creerAuteur($observation['identifiant'], $this->etreFluxAdmin());
339
		return $item;
339
		return $item;
340
	}
340
	}
Line 341... Line 341...
341
	
341
	
342
	private function creerTitre($obs) {
342
	private function creerTitre($obs) {
343
		$nom_plante = $obs['nom_sel'].' [nn'.$obs['num_nom_sel'].']';
343
		$nom_plante = $obs['nom_sel'].' [nn'.$obs['num_nom_sel'].']';
344
		$lieu = $obs['location'].' ('.$obs['id_location'].')';
344
		$lieu = $obs['location'].' ('.$obs['id_location'].')';
345
		$utilisateur = $this->creerAuteur($obs['identifiant']);
345
		$utilisateur = $this->creerAuteur($obs['identifiant'], $this->etreFluxAdmin());
346
		$titre = "$nom_plante à $lieu par $utilisateur";
346
		$titre = "$nom_plante à $lieu par $utilisateur";
347
		$titre = $this->nettoyerTexte($titre);
347
		$titre = $this->nettoyerTexte($titre);
348
		return $titre;
348
		return $titre;
Line 349... Line -...
349
	}
-
 
350
	
-
 
351
	private function creerAuteur($courriel) {
-
 
352
		$auteur = ($this->etreFluxAdmin()) ? $courriel : $this->tronquerCourriel($courriel);
-
 
353
		return $auteur;
-
 
354
	}
349
	}
355
	
350
	
356
	private function creerGuidItem($element) {
351
	private function creerGuidItem($element) {
357
		$guid = sprintf($this->config['settings']['guidObsTpl'], 'obs'.$element['id']);
352
		$guid = sprintf($this->config['settings']['guidObsTpl'], 'obs'.$element['id']);
Line 394... Line 389...
394
	
389
	
395
	private function etreFluxAdmin() {
390
	private function etreFluxAdmin() {
396
		return ($this->service == 'pour-admin') ? true : false;
391
		return ($this->service == 'pour-admin') ? true : false;
Line 397... Line -...
397
	}
-
 
398
	
-
 
399
	private function etreNull($valeur) {
-
 
400
		$etre_null = false;
-
 
401
		if ($valeur == '' || $valeur == null || $valeur == '000null' || $valeur == 'null') {
-
 
402
			$etre_null = true;
-
 
403
		}
-
 
404
		return $etre_null;
-
 
405
	}
392
	}
406
	
393
	
407
	private function creerUrlService() {
394
	private function creerUrlService() {
408
		$url_service = $this->getUrlServiceBase();
395
		$url_service = $this->getUrlServiceBase();
409
		if (isset($this->start) || isset($this->limit)) {
396
		if (isset($this->start) || isset($this->limit)) {