diff --git a/application/controllers/ComptageController.php b/application/controllers/ComptageController.php index c5fe45bd..3be4a540 100644 --- a/application/controllers/ComptageController.php +++ b/application/controllers/ComptageController.php @@ -35,11 +35,10 @@ class ComptageController extends Zend_Controller_Action $auth = Zend_Auth::getInstance(); $user = $auth->getIdentity(); - Zend_Registry::get('firebug')->info($user); - if ($user->preferences['interface']['insee']==1) { - $insee = null; - } else { - $insee = $ciblage->calculRedevanceInsee(); + if ($user->preferences['interface']['insee']==1) { + $insee = $ciblage->calculRedevanceInsee(); + } else { + $insee = null; } $fields->setNb('insee', $insee); diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 1ef82521..42a6721d 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -105,12 +105,11 @@ class IndexController extends Zend_Controller_Action $fields->setNb('total', $total); $auth = Zend_Auth::getInstance(); - $user = $auth->getIdentity(); - Zend_Registry::get('firebug')->info($user); + $user = $auth->getIdentity(); if ($user->preferences['interface']['insee']==1) { - $insee = null; - } else { $insee = $ciblage->calculRedevanceInsee(); + } else { + $insee = null; } $fields->setNb('insee', $insee); diff --git a/library/Application/Controller/Plugin/Comptage.php b/library/Application/Controller/Plugin/Comptage.php index 4982f327..44bb79da 100644 --- a/library/Application/Controller/Plugin/Comptage.php +++ b/library/Application/Controller/Plugin/Comptage.php @@ -48,9 +48,9 @@ class Application_Controller_Plugin_Comptage extends Zend_Controller_Plugin_Abst $total = $ciblage->execute(); $session->setNb('total', $total); if ($user->preferences['interface']['insee']==1) { - $insee = null; - } else { $insee = $ciblage->calculRedevanceInsee(); + } else { + $insee = null; } $session->setNb('insee', $insee); }