Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2014-02-15 15:23:47 +01:00
commit fd22c9b69a
3 changed files with 5 additions and 5 deletions

View File

@ -107,7 +107,7 @@ if ($action == 'update')
{ {
foreach($delays as $delay) foreach($delays as $delay)
{ {
if (GETPOST($delay['code'])) if (GETPOST($delay['code']) != '')
{ {
dolibarr_set_const($db, $delay['code'], GETPOST($delay['code']), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, $delay['code'], GETPOST($delay['code']), 'chaine', 0, '', $conf->entity);
} }

View File

@ -226,7 +226,7 @@ if ($action == 'add_action')
// On cree l'action // On cree l'action
$idaction=$object->add($user); $idaction=$object->add($user);
if ($idaction > 0) if ($idaction > 0)
{ {
if (! $object->error) if (! $object->error)
@ -261,8 +261,8 @@ if ($action == 'add_action')
{ {
$db->rollback(); $db->rollback();
$langs->load("errors"); $langs->load("errors");
$error=$langs->trans($object->error); if (! empty($object->error)) setEventMessage($langs->trans($object->error), 'errors');
setEventMessage($error,'errors'); if (count($object->errors)) setEventMessage($object->errors, 'errors');
$action = 'create'; $action = 'create';
} }
} }

View File

@ -167,8 +167,8 @@ class Interfaces
// Action KO // Action KO
$nbtotal++; $nbtotal++;
$nbko++; $nbko++;
if (! empty($objMod->error)) $this->errors[]=$objMod->error;
if (! empty($objMod->errors)) $this->errors=array_merge($this->errors,$objMod->errors); if (! empty($objMod->errors)) $this->errors=array_merge($this->errors,$objMod->errors);
else if (! empty($objMod->error)) $this->errors[]=$objMod->error;
} }
} }
else else