Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 707 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 707 Rev 1007
Line 373... Line 373...
373
	}
373
	}
Line 374... Line 374...
374
 
374
 
375
	protected function ajouterChampsPersonnalises($champs, $reponse_id) {
375
	protected function ajouterChampsPersonnalises($champs, $reponse_id) {
376
		$champs_a_libeller = array('nom_retenu', 'rang', 'basionyme', 'hybride', 'hybride.parent_01',
376
		$champs_a_libeller = array('nom_retenu', 'rang', 'basionyme', 'hybride', 'hybride.parent_01',
-
 
377
			 'hybride.parent_02', 'presence', 'tax_sup', 'statut_origine', 'statut_culture', 'statut_introduction');
377
			 'hybride.parent_02', 'presence', 'tax_sup', 'statut_origine', 'statut_culture', 'statut_introduction');
378
		$champs_forces = array('rang'); // même s'ils sont dans "à libeller", on les prend quand même en brut, en plus
378
		if (! is_null($champs) && is_array($champs) && count($champs) > 0) {
379
		if (! is_null($champs) && is_array($champs) && count($champs) > 0) {
379
			foreach ($champs as $champ) {
380
			foreach ($champs as $champ) {
380
				if ($this->verifierValiditeChamp($champ)) {
381
				if ($this->verifierValiditeChamp($champ)) {
381
					if (strrpos($champ, '.*') !== false) {
382
					if (strrpos($champ, '.*') !== false) {
Line 385... Line 386...
385
							(isset($reponse_id[$champ.'.libelle'])) ? $reponse_id[$champ.'.libelle'] : null;
386
							(isset($reponse_id[$champ.'.libelle'])) ? $reponse_id[$champ.'.libelle'] : null;
386
					} else {
387
					} else {
387
						$champ = $this->trouverChampBddCorrespondant($champ);
388
						$champ = $this->trouverChampBddCorrespondant($champ);
388
						$this->table_retour[$champ] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
389
						$this->table_retour[$champ] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
389
					}
390
					}
-
 
391
					// champs bruts en plus, ajouté pour obtenir le rang, mais retourne rang.code avec du kk dedans :-/
-
 
392
					if (in_array($champ, $champs_forces)) {
-
 
393
						$champ = $this->trouverChampBddCorrespondant($champ);
-
 
394
						$this->table_retour[$champ] = (isset($reponse_id[$champ])) ? $reponse_id[$champ] : null;
-
 
395
					}
390
				}
396
				}
391
			}
397
			}
392
		}
398
		}
393
	}
399
	}