Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 1067 Rev 1114
Line 687... Line 687...
687
		$champs = null;
687
		$champs = null;
688
		if (array_key_exists('retour.champs', $this->parametres)) {
688
		if (array_key_exists('retour.champs', $this->parametres)) {
689
			$champs = explode(',', $this->parametres['retour.champs']);
689
			$champs = explode(',', $this->parametres['retour.champs']);
690
		}
690
		}
Line -... Line 691...
-
 
691
 
-
 
692
		// Structure des données: objet ou liste ?
-
 
693
		$modeListe = false;
-
 
694
		if (array_key_exists('retour.structure', $this->parametres)) {
-
 
695
			$modeListe = ($this->parametres['retour.structure'] === "liste");
-
 
696
		}
691
 
697
 
692
		$noms = array();
698
		$noms = array();
693
		foreach ($resultat as $tab) {
699
		foreach ($resultat as $tab) {
694
			$this->table_retour = array();
700
			$this->table_retour = array();
695
			$num = $tab['num_nom'];
701
			$num = $tab['num_nom'];
Line 700... Line 706...
700
				$reponse_id = $this->formaterId($tab);
706
				$reponse_id = $this->formaterId($tab);
701
				$this->table_retour = array();
707
				$this->table_retour = array();
702
				$this->ajouterChampsPersonnalises($champs, $reponse_id);
708
				$this->ajouterChampsPersonnalises($champs, $reponse_id);
703
				$retour = array_merge($retour, $this->table_retour);
709
				$retour = array_merge($retour, $this->table_retour);
704
			}
710
			}
-
 
711
			if ($modeListe) {
-
 
712
				$retour['num_nom'] = intval($num);
-
 
713
				$noms[] = $retour;
-
 
714
			} else {
705
			$noms[$num] = $retour;
715
				$noms[$num] = $retour;
-
 
716
			}
706
		}
717
		}
Line 707... Line 718...
707
 
718
 
708
		return $noms;
719
		return $noms;