Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 990 Rev 1007
Line 387... Line 387...
387
	}
387
	}
Line 388... Line 388...
388
 
388
 
389
	protected function ajouterChampsPersonnalises($champs, $reponse_id) {
389
	protected function ajouterChampsPersonnalises($champs, $reponse_id) {
390
		$champs_a_libeller = array('nom_retenu', 'rang', 'basionyme', 'hybride', 'hybride.parent_01',
390
		$champs_a_libeller = array('nom_retenu', 'rang', 'basionyme', 'hybride', 'hybride.parent_01',
-
 
391
			 'hybride.parent_02', 'presence', 'tax_sup', 'statut_origine', 'statut_culture', 'statut_introduction');
391
			 'hybride.parent_02', 'presence', 'tax_sup', 'statut_origine', 'statut_culture', 'statut_introduction');
392
		$champs_forces = array('rang'); // même s'ils sont dans "à libeller", on les prend quand même en brut, en plus
392
		if (! is_null($champs) && is_array($champs) && count($champs) > 0) {
393
		if (! is_null($champs) && is_array($champs) && count($champs) > 0) {
393
			foreach ($champs as $champ) {
394
			foreach ($champs as $champ) {
394
				if ($this->verifierValiditeChamp($champ)) {
395
				if ($this->verifierValiditeChamp($champ)) {
395
					if (strrpos($champ, '.*') !== false) {
396
					if (strrpos($champ, '.*') !== false) {
Line 399... Line 400...
399
							(isset($reponse_id[$champ.'.libelle'])) ? $reponse_id[$champ.'.libelle'] : null;
400
							(isset($reponse_id[$champ.'.libelle'])) ? $reponse_id[$champ.'.libelle'] : null;
400
					} else {
401
					} else {
401
						$champ = $this->trouverChampBddCorrespondant($champ);
402
						$champ = $this->trouverChampBddCorrespondant($champ);
402
						$this->table_retour[$champ] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
403
						$this->table_retour[$champ] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
403
					}
404
					}
-
 
405
					// champs bruts en plus, ajouté pour obtenir le rang, mais retourne rang.code avec du kk dedans :-/
-
 
406
					if (in_array($champ, $champs_forces)) {
-
 
407
						$champ = $this->trouverChampBddCorrespondant($champ);
-
 
408
						$this->table_retour[$champ] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
-
 
409
					}
404
				}
410
				}
405
			}
411
			}
406
		}
412
		}
407
	}
413
	}