635,7 → 635,7 |
$this->afficherTableDetails($champ, $valeur); |
break; |
case 'signification' : |
//$this->afficherSignification($champ, $valeur); |
$this->afficherSignification($champ, $valeur); |
break; |
case 'href' : |
$url = $this->creerUrl($champ, $valeur); |
724,21 → 724,20 |
} |
|
public function ajouterSignificationCode($champ, $valeur) { |
$categorie = $champ; |
if($this->termeOntologieEstEnCache($categorie, $valeur)) { |
$nom_code = $this->obtenirTermeOntologieParCache($categorie, $valeur); |
if($this->termeOntologieEstEnCache($champ, $valeur)) { |
$nom_code = $this->obtenirTermeOntologieParCache($champ, $valeur); |
} else { |
$champ = ($champ == 'rang') ? 'rangTaxo' : rtrim($champ, '_Co,_Ga'); |
if (preg_match('/^([^_-]+)(?:_|-)([^_-]+)$/', $champ, $match)) { |
$champ = $match[1].ucfirst($match[2]); |
$code = $this->transformerChampEnCode($champ); |
if (preg_match('/^([^_-]+)(?:_|-)([^_-]+)$/', $code, $match)) { |
$code = $match[1].ucfirst($match[2]); |
} |
$url = Config::get('url_ontologie').$champ.':'.$valeur.'/nom'; |
$url = Config::get('url_ontologie').$code.':'.$valeur.'/nom'; |
$res = $this->consulterHref($url); //dans commun.php |
$nom_code = $valeur; |
if (is_object($res)) { |
$nom_code = $res->nom; |
} |
$this->mettreEnCacheOntologie($categorie, $valeur, $nom_code); |
$this->mettreEnCacheOntologie($champ, $valeur, $nom_code); |
} |
return $nom_code; |
} |