diff --git a/application/controllers/ComptageController.php b/application/controllers/ComptageController.php index 2c05d3c1..e7aee9b3 100644 --- a/application/controllers/ComptageController.php +++ b/application/controllers/ComptageController.php @@ -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();