Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:16:11 +02:00
parent e2c7cc13ca
commit a6040867c8
6 changed files with 6 additions and 6 deletions

View File

@ -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
}

View File

@ -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');
}

View File

@ -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');
}

View File

@ -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');
}

View File

@ -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');
}

View File

@ -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';
}