Subversion Repositories eFlore/Applications.coel-consultation

Rev

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

Rev 10 Rev 15
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 10 2010-03-05 14:15:42Z jpm $$
12
 * @version		SVN: $$Id: Recherche.php 15 2010-03-19 17:55:16Z jpm $$
13
 */
13
 */
14
class Recherche extends ColControleur {
14
class Recherche extends ColControleur {
Line 15... Line 15...
15
	
15
	
16
	//+----------------------------------------------------------------------------------------------------------------+
16
	//+----------------------------------------------------------------------------------------------------------------+
Line 27... Line 27...
27
	 */
27
	 */
28
	public function chargerMoteurRecherche() {
28
	public function chargerMoteurRecherche() {
29
		$donnees = array();
29
		$donnees = array();
Line 30... Line 30...
30
		
30
		
-
 
31
		// Gestion des données de la requête
-
 
32
		$chaine = $this->obtenirChaineRecherche();
31
		// Gestion des données de la requête
33
		$this->memoriserChaineRecherche($chaine);
Line 32... Line 34...
32
		$donnees['recherche'] = (isset($_GET['recherche']) ? $_GET['recherche'] : '');
34
		$donnees['recherche'] = $chaine;
33
		
35
		
34
		// Gestion de l'url
36
		// Gestion de l'url
35
		$this->url->setVariableRequete('module', 'Recherche');
37
		$this->url->setVariableRequete('module', 'Recherche');
Line 40... Line 42...
40
		
42
		
41
		// Gestion du squelette et de la sortie
43
		// Gestion du squelette et de la sortie
42
		$this->setSortie(self::RENDU_TETE, $this->getVue('moteur', $donnees));
44
		$this->setSortie(self::RENDU_TETE, $this->getVue('moteur', $donnees));
Line -... Line 45...
-
 
45
	}
-
 
46
	
-
 
47
	private function obtenirChaineRecherche() {
-
 
48
		$chaine = '';
-
 
49
		if (isset($_GET['recherche'])) {
-
 
50
			$chaine = $_GET['recherche'];
-
 
51
		} else if (isset($_SESSION['col']['recherche'])) {
-
 
52
			$chaine = $_SESSION['col']['recherche'];
-
 
53
		}
-
 
54
		return $chaine;
-
 
55
	}
-
 
56
	
-
 
57
	private function memoriserChaineRecherche($chaine) {
-
 
58
		$_SESSION['col']['recherche'] = $chaine;
43
	}
59
	}
44
	
60
	
45
	/**
61
	/**
46
	 * Recherche des collections.
62
	 * Recherche des collections.
47
	 * @return string la vue correspondante
63
	 * @return string la vue correspondante