Fix: Do not report trigger errors twice.
Fix: Error when creating event was not reported.
This commit is contained in:
parent
ead7df3306
commit
3e3c541e4c
@ -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';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user