119,7 → 119,15 |
$this->format_reponse .= '/id'; |
if ($this->recherche == 'etendue') { |
$id = '%'.str_replace(' ','%', $id).'%'; |
} |
} |
if (is_numeric($id)) { |
$this->requete_condition[] = 'c.id ='.$this->getBdd()->proteger($id); |
} else { |
$id = explode('bdtfx.nn:', $id); |
if (is_numeric($id[1])) { |
$this->requete_condition[] = 'c.num_nom ='.$this->getBdd()->proteger($id[1]); |
} |
} |
|
$this->requete_champ = 'c.id AS num_nom, i.nom_sci AS titre, t1.resource AS tag, p.body AS texte'; |
$this->table = array(Config::get("bdd_correspondance_bdnff").' c', |
126,7 → 134,7 |
Config::get("bdd_triples").' t1', |
Config::get("bdd_index").' i', |
Config::get("bdd_pages").' p'); |
$this->requete_condition[] = 'c.num_nom ='.$this->getBdd()->proteger($id); |
|
$this->requete_condition[] = 'c.id = i.num_nom'; |
$this->requete_condition[] = 'i.nom_sci = t1.value'; |
$this->requete_condition[] = 't1.resource = p.tag'; |
372,7 → 380,7 |
$type = (preg_match('/^Cle.*$/', $reponse['tag'])) ? '2' : '1' ; |
$this->afficherDonnees('type', $type); |
$this->table_retour['texte'] = $reponse['texte']; |
$this->afficherDonnees('id', $reponse['num_nom']); |
//$this->afficherDonnees('id', $reponse['num_nom']); |
|
return $this->table_retour; |
} |
452,7 → 460,7 |
} elseif (in_array($champ, array('type'))) { |
$this->table_retour[$champ.'.code'] = $valeur; |
$this->table_retour[$champ] = $this->recupererSignificationCode($valeur); |
$this->table_retour[$champ.'.href'] = $this->ajouterHrefAutreProjet('ontologies', 'texteType:', $valeur, 'commun'); |
$this->table_retour[$champ.'.href'] = $this->ajouterHrefAutreProjet('ontologies', 'texteType:', $valeur, 'eflore'); |
} else { |
$this->table_retour[$champ] = $valeur; |
} |
460,7 → 468,7 |
|
|
public function recupererSignificationCode($code) { |
$url = $this->ajouterHrefAutreProjet('ontologies', 'texteType:', $code.'/nom', 'commun'); |
$url = $this->ajouterHrefAutreProjet('ontologies', 'texteType:', $code.'/nom', 'eflore'); |
$res = $this->consulterHref($url); |
return $res->nom; |
} |