Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 627 Rev 659
Line 201... Line 201...
201
	}
201
	}
Line 202... Line 202...
202
 
202
 
203
	//+------------------------------------------------------------------------------------------------------+
203
	//+------------------------------------------------------------------------------------------------------+
204
	public function assemblerLaRequete() {
204
	public function assemblerLaRequete() {
-
 
205
		$requete = ' SELECT '.$this->formerRequeteChamp().
205
		$requete = ' SELECT '.$this->formerRequeteChamp().
206
					', CASE num_statut WHEN "" THEN 1 ELSE 0 END AS is_null '.
206
					' FROM '.$this->table
207
					' FROM '.$this->table
-
 
208
					.$this->formerRequeteCondition().
207
					.$this->formerRequeteCondition()
209
					' ORDER BY is_null ASC, num_statut ASC '
208
					.$this->formerRequeteLimite();
210
					.$this->formerRequeteLimite();
209
		return $requete;
211
		return $requete;
Line 210... Line 212...
210
	}
212
	}
Line 382... Line 384...
382
				if($this->champs_supp != array()) {
384
				if($this->champs_supp != array()) {
383
					$resultat_json[$tab['num_nom_vernaculaire']] = $this->ajouterChampsOntologieLigneResultat($tab);
385
					$resultat_json[$tab['num_nom_vernaculaire']] = $this->ajouterChampsOntologieLigneResultat($tab);
384
				}
386
				}
385
			}
387
			}
386
		}
388
		}
387
				
389
		
388
		if ($this->retour_format == 'max') {
390
		if ($this->retour_format == 'max') {
389
			// On est obligé de faire un deuxième boucle pour demander tous les taxons présents en une 
391
			// On est obligé de faire un deuxième boucle pour demander tous les taxons présents en une 
390
			// fois et les attribuer aux noms car c'est beaucoup plus rapide
392
			// fois et les attribuer aux noms car c'est beaucoup plus rapide
391
			$noms_sci = $this->recupererNomTaxons();
393
			$noms_sci = $this->recupererNomTaxons();
392
			foreach ($resultat_json as $num_nom => &$tab) {
394
			foreach ($resultat_json as $num_nom => &$tab) {
Line 395... Line 397...
395
					unset($resultat_json[$num_nom]);
397
					unset($resultat_json[$num_nom]);
396
				}
398
				}
397
			}
399
			}
398
		}
400
		}
Line 399... Line -...
399
		
-
 
400
		uasort($resultat_json, array($this,'trierLigneTableau'));
401
		
401
		$table_retour_json['resultat'] = $resultat_json;
402
		$table_retour_json['resultat'] = $resultat_json;
402
		return $table_retour_json;
403
		return $table_retour_json;
Line 403... Line 404...
403
	}
404
	}