Fix #3355
This commit is contained in:
parent
841cc0fe5e
commit
fd6f7dfa61
@ -782,21 +782,33 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($action=='setref') {
|
else {
|
||||||
$result = $object->fetch($id);
|
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id);
|
||||||
if ($result < 0) {
|
exit;
|
||||||
setEventMessage($object->errors, 'errors');
|
|
||||||
}
|
}
|
||||||
$object->ref=GETPOST('ref','alpha');
|
} elseif ($action=='setref') {
|
||||||
|
$cancelbutton = GETPOST('cancel');
|
||||||
|
|
||||||
$result = $object->update($user);
|
if (!$cancelbutton) {
|
||||||
if ($result < 0) {
|
$result = $object->fetch($id);
|
||||||
setEventMessage($object->errors,'errors');
|
if ($result < 0) {
|
||||||
$action='editref';
|
setEventMessage($object->errors, 'errors');
|
||||||
} else {
|
}
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
$object->ref = GETPOST('ref', 'alpha');
|
||||||
exit;
|
|
||||||
}
|
$result = $object->update($user);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessage($object->errors, 'errors');
|
||||||
|
$action = 'editref';
|
||||||
|
} else {
|
||||||
|
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generation doc (depuis lien ou depuis cartouche doc)
|
// Generation doc (depuis lien ou depuis cartouche doc)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user