Fixing the 'formConfirm' hook on tickets (#37473)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Vincent Penel 2026-03-12 01:20:03 +01:00 committed by GitHub
parent ca957917e5
commit d2bbba5a21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -775,7 +775,7 @@ if ($action == 'create' || $action == 'presend') {
$formticket->showForm(0, 'edit', 0, null, $action, $object);
print dol_get_fiche_end();
} elseif (empty($action) || in_array($action, ['builddoc', 'view', 'addlink', 'addlinkbyref', 'dellink', 'presend', 'presend_addmessage', 'close', 'abandon', 'delete', 'editcustomer', 'progression', 'categories', 'reopen', 'edit_contrat', 'editsubject', 'edit_extras', 'update_extras', 'edit_extrafields', 'set_extrafields', 'classify', 'sel_contract', 'edit_message_init', 'set_status'])) {
} elseif ($object->id) {
if (!empty($res) && $res > 0) {
// or for unauthorized internals users
if (!$user->socid && (getDolGlobalString('TICKET_LIMIT_VIEW_ASSIGNED_ONLY') && $object->fk_user_assign != $user->id) && !$user->hasRight('ticket', 'manage')) {