Subversion Repositories eFlore/Applications.coel-consultation

Rev

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

Rev 246 Rev 264
Line 7... Line 7...
7
 * @category	Php5
7
 * @category	Php5
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @copyright	2010 Tela-Botanica
9
 * @copyright	2010 Tela-Botanica
10
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
10
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
 * @version		SVN: $Id: Recherche.php 246 2015-03-03 09:13:36Z mathias $
12
 * @version		SVN: $Id: Recherche.php 264 2016-12-19 13:27:31Z mathias $
13
 */
13
 */
14
class Recherche extends aControleur {
14
class Recherche extends aControleur {
Line 15... Line 15...
15
	
15
	
16
	//protected $chaine_recherche = null;
16
	//protected $chaine_recherche = null;
Line 141... Line 141...
141
 
141
 
142
		// Affichage de la liste de résultats
142
		// Affichage de la liste de résultats
143
		if (isset($masque['cible'])) {
143
		if (isset($masque['cible'])) {
144
			switch ($masque['cible']) {
144
			switch ($masque['cible']) {
-
 
145
				case 'collections':
145
				case 'collections':
146
					if (! empty($resultats)) {
146
					foreach ($resultats as $resultat) {
147
						foreach ($resultats as $resultat) {
147
						// Ajout des données concernant la structure si ce n'est pas déjà fait
148
							// Ajout des données concernant la structure si ce n'est pas déjà fait
148
						$structure_id = $resultat['cs_id_structure'];
149
							$structure_id = $resultat['cs_id_structure'];
149
						if (!isset($donnees['infos'][$structure_id])) {
150
							if (!isset($donnees['infos'][$structure_id])) {
Line 162... Line 163...
162
								'url' => $this->obtenirUrlFicheCollection($resultat['cc_id_collection'])
163
									'url' => $this->obtenirUrlFicheCollection($resultat['cc_id_collection'])
163
							);
164
								);
164
							$donnees['infos'][$structure_id]['collections'][] = $collection;
165
								$donnees['infos'][$structure_id]['collections'][] = $collection;
165
						}
166
							}
166
					}
167
						}
-
 
168
					}
167
				break;
169
				break;
Line 168... Line 170...
168
	
170
	
-
 
171
				case 'personnes':
169
				case 'personnes':
172
					if (! empty($resultats)) {
170
					foreach ($resultats as $resultat) {
173
						foreach ($resultats as $resultat) {
171
						//echo "<pre>".print_r($resultat,true)."</pre>";
174
							//echo "<pre>".print_r($resultat,true)."</pre>";
172
						if (!empty($resultat['cp_id_personne'])) {
175
							if (!empty($resultat['cp_id_personne'])) {
173
							$personne = array(
176
								$personne = array(
Line 177... Line 180...
177
								'url' => $this->obtenirUrlFichePersonne($resultat['cp_id_personne'])
180
									'url' => $this->obtenirUrlFichePersonne($resultat['cp_id_personne'])
178
							);
181
								);
179
							$donnees['infos']['personnes'][] = $personne;
182
								$donnees['infos']['personnes'][] = $personne;
180
						}
183
							}
181
					}
184
						}
-
 
185
					}
182
				break;
186
				break;
Line 183... Line 187...
183
	
187
	
184
				default:
188
				default:
185
			}
189
			}