Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 662 Rev 720
Line 730... Line 730...
730
			$code = $this->transformerChampEnCode($champ);
730
			$code = $this->transformerChampEnCode($champ);
731
			if (preg_match('/^([^_-]+)(?:_|-)([^_-]+)$/', $code, $match)) {
731
			if (preg_match('/^([^_-]+)(?:_|-)([^_-]+)$/', $code, $match)) {
732
				$code = $match[1].ucfirst($match[2]);
732
				$code = $match[1].ucfirst($match[2]);
733
			}
733
			}
734
			$url = Config::get('url_ontologie').$code.':'.$valeur.'/nom';
734
			$url = Config::get('url_ontologie').$code.':'.$valeur.'/nom';
-
 
735
			try {
735
			$res = $this->consulterHref($url); //dans commun.php
736
				$res = $this->consulterHref($url); //dans commun.php
736
			$nom_code = $valeur;
737
				$nom_code = $valeur;
737
			if (is_object($res)) {
738
				if (is_object($res)) {
738
				$nom_code = $res->nom;
739
					$nom_code = $res->nom;
-
 
740
				}
-
 
741
				$this->mettreEnCacheOntologie($champ, $valeur, $nom_code);
-
 
742
			} catch (Exception $e) {
-
 
743
				$nom_code = '';
739
			}
744
			}
740
			$this->mettreEnCacheOntologie($champ, $valeur, $nom_code);
-
 
741
		}
745
		}
742
		return $nom_code;
746
		return $nom_code;
743
	}
747
	}
Line 744... Line 748...
744
 
748