diff --git a/application/controllers/GestionController.php b/application/controllers/GestionController.php index a0ae5533..4661192b 100644 --- a/application/controllers/GestionController.php +++ b/application/controllers/GestionController.php @@ -340,7 +340,7 @@ class GestionController extends Zend_Controller_Action $request = $this->getRequest(); - $idClient= $request->getParam('id', null); + $idClient= $request->getParam('idClient', null); $this->view->assign('idClient', $idClient); if ($idClient !== null) { @@ -415,18 +415,24 @@ class GestionController extends Zend_Controller_Action if ($request->getParam('submit')=='Modifier') { //Overwrite default profil for each login - $profilM = new Application_Model_EnrichissementProfils(); - $profilM->update( - array('criteres', json_encode($params['criteres'])), - "reference='default' AND idClient=".$params['idClient']); + try { + $profilM = new Application_Model_EnrichissementProfils(); + $profilM->update(array( + 'criteres' => json_encode($params['criteres']) + ), "reference='default' AND idClient=".$params['idClient']); + } catch ( Zend_Db_Adapter_Exception $e) { + Zend_Registry::get('firebug')->info($e->getMessage()); + } //Set parameters - $customerParamsM = new Application_Model_CustomerParams(); - if ( $customerParamsM->update($data, 'id='.$params['id']) ){ + try { + $customerParamsM = new Application_Model_CustomerParams(); + $customerParamsM->update($data, 'id='.$params['id']); $this->view->assign('message', "Profil enregistré"); - } else { - $this->view->assign('message', "Erreur lors de la sauvegarde"); - } + } catch ( Zend_Db_Adapter_Exception $e) { + Zend_Registry::get('firebug')->info($e->getMessage()); + $this->view->assign('message', "Erreur lors de la sauvegarde"); + } } else { //Set parameters @@ -443,7 +449,7 @@ class GestionController extends Zend_Controller_Action } } else { - $idClient = $request->getParam('id', null); + $idClient = $request->getParam('idClient', null); if ($idClient !== null) { $paramsM = new Application_Model_CustomerParams(); diff --git a/application/views/default/scripts/gestion/customerparam.phtml b/application/views/default/scripts/gestion/customerparam.phtml index ff469dd8..f0bb1f09 100644 --- a/application/views/default/scripts/gestion/customerparam.phtml +++ b/application/views/default/scripts/gestion/customerparam.phtml @@ -23,7 +23,7 @@ dateAddedinfos['dateAdded']?> -Modifier +Modifier

Logins autorisés

diff --git a/application/views/default/scripts/gestion/customerparamadd.phtml b/application/views/default/scripts/gestion/customerparamadd.phtml index 0e308239..40d2f375 100644 --- a/application/views/default/scripts/gestion/customerparamadd.phtml +++ b/application/views/default/scripts/gestion/customerparamadd.phtml @@ -1,7 +1,11 @@
+message) {?> + message?> + +
id) {?> @@ -99,4 +103,5 @@ Nombre maximal de fichier pouvant être extrait
+
\ No newline at end of file diff --git a/application/views/default/scripts/gestion/customerparams.phtml b/application/views/default/scripts/gestion/customerparams.phtml index a6a23136..c6ff89e1 100644 --- a/application/views/default/scripts/gestion/customerparams.phtml +++ b/application/views/default/scripts/gestion/customerparams.phtml @@ -24,7 +24,7 @@
-Détail +Détail