Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 770 Rev 870
Line 738... Line 738...
738
		} else {
738
		} else {
739
			$code = $this->transformerChampEnCode($champ);
739
			$code = $this->transformerChampEnCode($champ);
740
			if (preg_match('/^([^_-]+)(?:_|-)([^_-]+)$/', $code, $match)) {
740
			if (preg_match('/^([^_-]+)(?:_|-)([^_-]+)$/', $code, $match)) {
741
				$code = $match[1].ucfirst($match[2]);
741
				$code = $match[1].ucfirst($match[2]);
742
			}
742
			}
743
			$res = $this->getBdd()->recuperer(sprintf('SELECT * FROM %s WHERE id IN (SELECT id FROM %s WHERE code = "%s" AND classe_id = (SELECT id FROM %s WHERE code = "%s")) LIMIT 0, 100 -- %s:%s', 'bdnt_ontologies_v4_30', 'bdnt_ontologies_v4_30', $valeur, 'bdnt_ontologies_v4_30', $code, __FILE__,  __LINE__), Bdd::MODE_OBJET);
743
			$requete = sprintf('SELECT * FROM %s WHERE id IN (SELECT id FROM %s WHERE code = "%s" AND classe_id = (SELECT id FROM %s WHERE code = "%s")) LIMIT 0, 100 -- %s:%s', Config::get('bdd_table_ontologies'), Config::get('bdd_table_ontologies'), $valeur, Config::get('bdd_table_ontologies'), $code, __FILE__,  __LINE__);
-
 
744
			$res = $this->getBdd()->recuperer($requete);
744
			$nom_code = $valeur;
745
			$nom_code = $valeur;
745
			if (is_object($res)) {
746
			if (is_array($res)) {
746
				$nom_code = $res->nom;
747
				$nom_code = $res['nom'];
747
			}
748
			}
748
			$this->mettreEnCacheOntologie($champ, $valeur, $nom_code);
749
			$this->mettreEnCacheOntologie($champ, $valeur, $nom_code);
749
		}
750
		}
750
		return $nom_code;
751
		return $nom_code;
751
	}
752
	}