Fix duplicate code

This commit is contained in:
Laurent Destailleur 2017-02-28 11:16:07 +01:00
parent 79c9745442
commit a71541e6de

View File

@ -318,16 +318,14 @@ if (empty($reshook)) {
$error ++; $error ++;
} }
if (!$error) { if (!$error)
{
$object->fetch($id); $object->fetch($id);
$object->oldcopy = clone $object; $object->oldcopy = clone $object;
if (!$error) {
$db->begin(); $db->begin();
$object->oldcopy = clone $object;
$object->lastname = GETPOST("lastname", 'alpha'); $object->lastname = GETPOST("lastname", 'alpha');
$object->firstname = GETPOST("firstname", 'alpha'); $object->firstname = GETPOST("firstname", 'alpha');
$object->login = GETPOST("login", 'alpha'); $object->login = GETPOST("login", 'alpha');
@ -490,7 +488,6 @@ if (empty($reshook)) {
$db->rollback(); $db->rollback();
} }
} }
}
} }
else else
{ {