Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 449 Rev 458
Line 182... Line 182...
182
			$message = 'La requête SQL formée comporte une erreur!';
182
			$message = 'La requête SQL formée comporte une erreur!';
183
			$code = RestServeur::HTTP_CODE_RESSOURCE_INTROUVABLE;
183
			$code = RestServeur::HTTP_CODE_RESSOURCE_INTROUVABLE;
184
			throw new Exception($message, $code);
184
			throw new Exception($message, $code);
185
		}elseif ($resultat) {
185
		}elseif ($resultat) {
186
			if ((count($this->ressources)) != 0) {
186
			if ((count($this->ressources)) != 0) {
187
				$Atraiter = array_filter($resultat[0],function($var){return ($var != '');});
187
				//$Atraiter = array_filter($resultat[0],function($var){return ($var != '');});
-
 
188
				foreach ($resultat[0] as $champs => $valeur) {
-
 
189
					if ($valeur !== '') {
-
 
190
						$Atraiter[$champs] = $valeur;
-
 
191
					}
-
 
192
				}
188
				if (!empty($Atraiter)) {
193
				if (!empty($Atraiter)) {
189
					$this->traiterValeursEcologiques($Atraiter);
194
					$this->traiterValeursEcologiques($Atraiter);
190
					$svg = $this->genererSVG();
195
					$svg = $this->genererSVG();
191
					$resultat = new ResultatService();
196
					$resultat = new ResultatService();
192
					$resultat->corps = ($this->parametres['retour'] == 'image/png') ? $this->convertirEnPNG($svg) : $svg;
197
					$resultat->corps = ($this->parametres['retour'] == 'image/png') ? $this->convertirEnPNG($svg) : $svg;