Debug enregistrement profil

This commit is contained in:
Michael RICOIS 2013-01-29 14:01:59 +00:00
parent fd589a5708
commit 700499dd47

View File

@ -100,17 +100,22 @@ class ProfilController extends Zend_Controller_Action
$id = $request->getParam('id', null);
if ( $id != null ) {
if ( $profilM->update($data, 'id='.$id) ){
echo '';
} else {
echo 'Erreur';
}
try {
$result = $profilM->update($data, 'id='.$id);
} catch (Zend_Exception $e) {
Zend_Registry::get('firebug')->info($e->getMessage());
}
} else {
if ( $profilM->insert($data) ){
echo '';
} else {
echo 'Erreur';
}
try {
$result = $profilM->insert($data);
} catch (Zend_Exception $e) {
Zend_Registry::get('firebug')->info($e->getMessage());
}
}
if ( $result ){
echo '';
} else {
echo 'Erreur';
}
}