Update messaging.php

This commit is contained in:
Laurent Destailleur 2024-03-16 15:56:40 +01:00 committed by GitHub
parent 2bef2c6b87
commit 57fa0671e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,7 +96,7 @@ if ($user->socid > 0 && ($object->fk_soc != $user->socid)) {
accessforbidden();
}
// or for unauthorized internals users
if (!$user->socid && (!empty(getDolGlobalString('TICKET_LIMIT_VIEW_ASSIGNED_ONLY')) && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) {
if (!$user->socid && getDolGlobalString('TICKET_LIMIT_VIEW_ASSIGNED_ONLY') && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) {
accessforbidden();
}
@ -144,7 +144,7 @@ $userstat = new User($db);
$formticket = new FormTicket($db);
$title = $langs->trans("Ticket").' - '.$object->ref.' '.$object->name;
if (!empty(getDolGlobalString('MAIN_HTML_TITLE')) && preg_match('/ticketnameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/ticketnameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
$title = $object->ref.' '.$object->name.' - '.$langs->trans("Info");
}
$help_url = 'FR:DocumentationModuleTicket';
@ -161,7 +161,7 @@ if ($socid > 0) {
print dol_get_fiche_end();
}
if (!$user->socid && !empty(getDolGlobalString('TICKET_LIMIT_VIEW_ASSIGNED_ONLY'))) {
if (!$user->socid && getDolGlobalString('TICKET_LIMIT_VIEW_ASSIGNED_ONLY')) {
$object->next_prev_filter = "te.fk_user_assign = ".((int) $user->id);
} elseif ($user->socid > 0) {
$object->next_prev_filter = "te.fk_soc = ".((int) $user->socid);