Subversion Repositories eFlore/Applications.coel-consultation

Rev

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

Rev 132 Rev 144
Line 7... Line 7...
7
 * @package		Collection
7
 * @package		Collection
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: aControleur.php 132 2010-07-12 10:25:11Z jpm $
12
 * @version		SVN: $Id: aControleur.php 144 2010-08-30 16:22:52Z jpm $
13
 */
13
 */
14
abstract class aControleur extends Controleur {
14
abstract class aControleur extends Controleur {
Line 15... Line 15...
15
	
15
	
16
	const FMT_DATE = '%d/%m/%Y';// Supporte les formats de dates non valides (1989-00-00)
16
	const FMT_DATE = '%d/%m/%Y';// Supporte les formats de dates non valides (1989-00-00)
Line 386... Line 386...
386
		$this->url->unsetVariablesRequete(array('module', 'id'));
386
		$this->url->unsetVariablesRequete(array('module', 'id'));
387
		return $url;
387
		return $url;
388
	}
388
	}
Line 389... Line 389...
389
	
389
	
-
 
390
	protected function obtenirUrlFicheCollection($id_collection) {
-
 
391
		$url = $this->obtenirObjetUrlFicheCollection($id_collection);
-
 
392
		return $url->getURL();
-
 
393
	}
-
 
394
	
390
	protected function obtenirUrlFicheCollection($id_collection) {
395
	protected function obtenirObjetUrlFicheCollection($id_collection) {
391
		$this->url->setRequete(false);
396
		$this->url->setRequete(false);
392
		$this->url->setVariableRequete('module', 'FicheCollection');
397
		$this->url->setVariableRequete('module', 'FicheCollection');
393
		$this->url->setVariableRequete('id', $id_collection);
398
		$this->url->setVariableRequete('id', $id_collection);
394
		$url = $this->url->getURL();
399
		$url = clone $this->url;
395
		$this->url->unsetVariablesRequete(array('module', 'id'));
400
		$this->url->unsetVariablesRequete(array('module', 'id'));
396
		return $url;
401
		return $url;
Line 397... Line 402...
397
	}
402
	}
Line 416... Line 421...
416
		if (count($tableau) > 0) {
421
		if (count($tableau) > 0) {
417
			foreach ($tableau as $cle => &$valeur) {
422
			foreach ($tableau as $cle => &$valeur) {
418
				if ($valeur == '') {
423
				if ($valeur == '') {
419
					$valeur = '&nbsp;';
424
					$valeur = '&nbsp;';
420
				} else if (is_string($valeur)) {
425
				} else if (is_string($valeur)) {
421
					$valeur = preg_replace('/&(?!amp;)/i', '&amp;', $valeur, -1);
426
					$valeur = $this->remplacerEsperluette($valeur);
422
				} else if (is_array($valeur)) {
427
				} else if (is_array($valeur)) {
423
					$this->postraiterDonnees($valeur);
428
					$this->postraiterDonnees($valeur);
424
				}
429
				}
425
			}
430
			}
426
		}
431
		}
427
	}
432
	}
Line -... Line 433...
-
 
433
	
-
 
434
	private function remplacerEsperluette($txt) {
-
 
435
		$txt = preg_replace('/&(?!([a-z]+|#[0-9]+|#x[0-9a-f]+);)/i', '&amp;', $txt, -1);
-
 
436
		return $txt;
-
 
437
	}
428
	
438
	
429
	protected function chargerPiedDePage() {
439
	protected function chargerPiedDePage() {
430
		$donnees['appli'] = Application::getInfo();
440
		$donnees['appli'] = Application::getInfo();
431
		$this->setSortie(self::RENDU_PIED, $this->getVue('pied', $donnees));
441
		$this->setSortie(self::RENDU_PIED, $this->getVue('pied', $donnees));
432
	}
442
	}
433
}
443
}