Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 273 Rev 355
Line 256... Line 256...
256
		$conditions = $this->getConditions();
256
		$conditions = $this->getConditions();
257
		$requete = 'SELECT * '.
257
		$requete = 'SELECT * '.
258
					"FROM {$this->tableChorodep} ".
258
					"FROM {$this->tableChorodep} ".
259
		(isset($conditions) ? 'WHERE '.implode(' AND ', $conditions) : '');
259
		(isset($conditions) ? 'WHERE '.implode(' AND ', $conditions) : '');
260
		$resultat = $this->Bdd->recupererTous($requete);
260
		$resultat = $this->Bdd->recupererTous($requete);
261
 
-
 
262
		if (!is_array($resultat) || count($resultat) <= 0) {
-
 
263
			$message = "Aucune donnée ne correspond à la ressource demandée";
-
 
264
			$code = RestServeur::HTTP_CODE_RESSOURCE_INTROUVABLE;
-
 
265
			throw new Exception($message, $code);
-
 
266
		}
-
 
267
		$this->donnees = $resultat;
261
		$this->donnees = $resultat;
268
	}
262
	}
Line 269... Line 263...
269
 
263
 
270
	private function getConditions() {
264
	private function getConditions() {
Line 389... Line 383...
389
		}
383
		}
390
		return $zones;
384
		return $zones;
391
	}
385
	}
Line 392... Line 386...
392
 
386
 
-
 
387
	private function creerTitre() {
-
 
388
		$titre = "Carte en cours d'élaboration";
393
	private function creerTitre() {
389
		if ($this->donnees != array()) {
-
 
390
			$titre .= ' pour '.$this->creerTitreTaxon();
394
		$titre = "Carte en cours d'élaboration pour ".$this->creerTitreTaxon();
391
		}
395
		return $titre;
392
		return $titre;
Line 396... Line 393...
396
	}
393
	}
-
 
394
 
397
 
395
	private function creerTitreTaxon() {
398
	private function creerTitreTaxon() {
396
		$titre = '';
399
		$noms = array();
397
		$noms = array();
400
		foreach ($this->donnees as $donnee) {
398
		foreach ($this->donnees as $donnee) {
401
			$noms[] = $donnee['nom_sci'];
399
			$noms[] = $donnee['nom_sci'];