modification condition session

This commit is contained in:
Damien LASSERRE 2012-01-19 09:14:59 +00:00
parent 8ccae142da
commit 20b2acf8ab

View File

@ -12,8 +12,14 @@ class ComptageController extends Zend_Controller_Action
$request = $this->getRequest();
$key = $request->getParam('cle');
$valeur = $request->getParam('valeur');
$session->setCritere($key, $request->getParam('valeur'));
$sessionValeur = $session->getCritere($key);
if(!empty($sessionValeur) and empty($valeur)) {
$session->unsetCritere($key);
} else {
$session->setCritere($key, $valeur);
}
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();