Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 332 Rev 357
Line 332... Line 332...
332
		$this->ajouterChampsPersonnalises($champs, $reponse_id);
332
		$this->ajouterChampsPersonnalises($champs, $reponse_id);
333
		return $this->table_retour;
333
		return $this->table_retour;
334
	}
334
	}
Line 335... Line 335...
335
 
335
 
-
 
336
	protected function ajouterChampsPersonnalises($champs, $reponse_id) {
-
 
337
		$champs_a_libeller = array('nom_retenu', 'rang', 'basionyme', 'hybride', 'hybride.parent_01',
336
	protected function ajouterChampsPersonnalises($champs, $reponse_id) {
338
			 'hybride.parent_02', 'presence', 'tax_sup', 'statut_origine', 'statut_culture', 'statut_introduction');
337
		if (! is_null($champs) && is_array($champs) && count($champs) > 0) {
339
		if (! is_null($champs) && is_array($champs) && count($champs) > 0) {
338
			foreach ($champs as $champ) {
340
			foreach ($champs as $champ) {
339
				if ($this->verifierValiditeChamp($champ)) {
341
				if ($this->verifierValiditeChamp($champ)) {
340
					if (strrpos($champ, '.*') !== false) {
342
					if (strrpos($champ, '.*') !== false) {
341
						$this->afficherPointEtoile($champ, $reponse_id);
343
						$this->afficherPointEtoile($champ, $reponse_id);
342
					} elseif (strrpos($champ, '.') === false) {
344
					} elseif (in_array($champ, $champs_a_libeller)) {
343
						$this->table_retour[$champ.'.libelle'] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
345
						$this->table_retour[$champ.'.libelle'] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
344
					} else {
346
					} else {
345
						$champ = $this->trouverChampBddCorrespondant($champ);
347
						$champ = $this->trouverChampBddCorrespondant($champ);
346
						$this->table_retour[$champ] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
348
						$this->table_retour[$champ] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
Line 654... Line 656...
654
			$this->table_retour['nom_sci_complet'] = $this->resultat_req['nom_sci'].
656
			$this->table_retour['nom_sci_complet'] = $this->resultat_req['nom_sci'].
655
				$this->ajouterCompositionNom($this->resultat_req);
657
				$this->ajouterCompositionNom($this->resultat_req);
656
		} elseif ($this->correspondAUnId($champ) || $champ == 'id') {
658
		} elseif ($this->correspondAUnId($champ) || $champ == 'id') {
657
			$nom = $this->recupererNomSci($valeur);
659
			$nom = $this->recupererNomSci($valeur);
658
			if ($nom != array()) {
660
			if ($nom != array()) {
659
				$this->table_retour[$champ] = $nom['nom_sci'];
661
				$this->table_retour[$champ.'.libelle'] = $nom['nom_sci'];
660
				$this->table_retour[$champ.'_html'] = $nom['nom_sci_html'];
662
				$this->table_retour[$champ.'_html'] = $nom['nom_sci_html'];
661
				$this->table_retour[$champ.'_complet'] = $nom['nom_sci_complet'];
663
				$this->table_retour[$champ.'_complet'] = $nom['nom_sci_complet'];
662
				$this->table_retour[$champ.'_html_complet'] = $nom['nom_sci_complet_html'];
664
				$this->table_retour[$champ.'_html_complet'] = $nom['nom_sci_complet_html'];
663
				$this->service_href = $nom['service'];
665
				$this->service_href = $nom['service'];
664
			}
666
			}
665
		} elseif ($this->correspondAUnCode($champ)) {
667
		} elseif ($this->correspondAUnCode($champ)) {
666
			$this->table_retour[$champ] = $this->ajouterSignificationCode($champ, $valeur);
668
			$this->table_retour[$champ.'.libelle'] = $this->ajouterSignificationCode($champ, $valeur);
667
		}
669
		}
668
	}
670
	}
Line 669... Line 671...
669
 
671
 
670
	/** Permet d'afficher les élements nomenclatural du nom_sci lors de l'appel dans le service noms/id/champ du champ^nom_sci.*/
672
	/** Permet d'afficher les élements nomenclatural du nom_sci lors de l'appel dans le service noms/id/champ du champ^nom_sci.*/