diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php index 875ff695b33..f97dfe7592f 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -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);