Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 761 Rev 764
Line 344... Line 344...
344
//+--------------------------traitement ontologies -------------------------------------------+
344
//+--------------------------traitement ontologies -------------------------------------------+
Line 345... Line 345...
345
 
345
 
346
	public function recupererOntologies($valeur, $champs){
346
	public function recupererOntologies($valeur, $champs){
347
		$url = Config::get('url_service_base').Config::get('nom_projet').
347
		$url = Config::get('url_service_base').Config::get('nom_projet').
348
			'/ontologies/'.$this->champs_ontologiques[$champs].':'.urlencode(urlencode($valeur));
348
			'/ontologies/'.$this->champs_ontologiques[$champs].':'.urlencode(urlencode($valeur));
-
 
349
		$val = $this->getBdd()->recuperer(sprintf(
-
 
350
			"SELECT a.nom FROM baseflor_ontologies a LEFT JOIN baseflor_ontologies b ON a.id = b.id LEFT JOIN baseflor_ontologies c ON b.classe_id = c.id WHERE".
-
 
351
			" b.code = BINARY '%s' AND c.code = BINARY '%s' LIMIT 0, 100",
-
 
352
			$valeur,
-
 
353
				$this->champs_ontologiques[$champs]),
-
 
354
										  Bdd::MODE_OBJET);
349
		$val = $this->consulterHref($url);
355
 
350
		$this->resultat_json[$champs.'.libelle'] = $val->nom;
356
		$this->resultat_json[$champs.'.libelle'] = isset($val->nom) ? $val->nom : NULL; // eg: VEMO:0
351
		$this->resultat_json[$champs.'.code'] = $valeur;
357
		$this->resultat_json[$champs.'.code'] = $valeur;
352
		$this->resultat_json[$champs.'.href'] = $url;
358
		$this->resultat_json[$champs.'.href'] = $url;
Line 353... Line 359...
353
	}
359
	}