From eaf5c765dff89d24e526afd2799a7d5ebbd68828 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 2 Sep 2011 16:43:18 +0000 Subject: [PATCH] Qual: Uniformize code --- htdocs/admin/agenda.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 605cb8ed290..0a13ad70362 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -79,12 +79,9 @@ if ($action == "save" && empty($_POST["cancel"])) //print "param=".$param." - ".$_POST[$param]; if (! empty($_POST[$param])) $res = dolibarr_set_const($db,$param,$_POST[$param],'chaine',0,'',$conf->entity); else $res = dolibarr_del_const($db,$param,$conf->entity); + if (! $res > 0) $error++; } - - $db->commit(); - if (! $res > 0) $error++; - if (! $error) { $db->commit();