Use isModEnabled
This commit is contained in:
parent
e2c7cc13ca
commit
a6040867c8
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
@ -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';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user