diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 847f4510536..089629234d6 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -61,7 +61,7 @@ class InterfaceTicketEmail extends DolibarrTriggers { $ok = 0; - if (empty($conf->ticket) || empty($conf->ticket->enabled)) { + if (empty($conf->ticket) || !isModEnabled('ticket')) { return 0; // Module not active, we do nothing } diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index e982a4507b8..f459a36f909 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -91,7 +91,7 @@ if (!empty($conf->global->TICKET_CREATE_THIRD_PARTY_WITH_CONTACT_IF_NOT_EXIST)) $extrafields->fetch_name_optionals_label($object->table_element); -if (empty($conf->ticket->enabled)) { +if (!isModEnabled('ticket')) { httponly_accessforbidden('Module Ticket not enabled'); } diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index bec8417b492..84652017b37 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -59,7 +59,7 @@ $track_id = GETPOST('track_id', 'alpha'); $action = GETPOST('action', 'aZ09'); $suffix = ""; -if (empty($conf->ticket->enabled)) { +if (!isModEnabled('ticket')) { httponly_accessforbidden('Module Ticket not enabled'); } diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index fb0316dcd56..3fe6253b879 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -79,7 +79,7 @@ $object = new Ticket($db); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('ticketpubliclist', 'globalcard')); -if (empty($conf->ticket->enabled)) { +if (!isModEnabled('ticket')) { httponly_accessforbidden('Module Ticket not enabled'); } diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index 4bc9071218a..3f137148a89 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -73,7 +73,7 @@ if (isset($_SESSION['email_customer'])) { $object = new ActionsTicket($db); -if (empty($conf->ticket->enabled)) { +if (!isModEnabled('ticket')) { httponly_accessforbidden('Module Ticket not enabled'); } diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 79fbf1490d5..af93db7a1cb 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -211,7 +211,7 @@ if (isModEnabled('adherent')) { if (isModEnabled('agenda')) { $tmparray['comm/action/index.php?mainmenu=agenda&leftmenu='] = 'Agenda'; } -if (!empty($conf->ticket->enabled)) { +if (isModEnabled('ticket')) { $tmparray['ticket/list.php?mainmenu=ticket&leftmenu='] = 'Tickets'; }