diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 10c8ed29801..4bc0de8ac84 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -48,7 +48,7 @@ $langsArray=array("errors", "admin", "mails", "languages"); if (isModEnabled('adherent')) { $langsArray[]='members'; } -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langsArray[]='eventorganization'; } @@ -230,7 +230,7 @@ if (isModEnabled('expensereport') && !empty($user->rights->expensereport->lire)) if (isModEnabled('agenda')) { $elementList['actioncomm_send'] = img_picto('', 'action', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendEventPush')); } -if (!empty($conf->eventorganization->enabled) && !empty($user->rights->eventorganization->read)) { +if (isModEnabled('eventorganization') && !empty($user->rights->eventorganization->read)) { $elementList['conferenceorbooth'] = img_picto('', 'action', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendEventOrganization')); } if (!empty($conf->partnership->enabled) && !empty($user->rights->partnership->read)) { diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 402119e6e51..fcca4cf2f18 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -394,7 +394,7 @@ print "\n"; print "\n"; // Option to force stock to be enough before adding a line into document -if (!empty($conf->invoice->enabled)) { +if (isModEnabled('facture')) { print ''; print ''.$langs->trans("StockMustBeEnoughForInvoice").''; print ''; @@ -408,7 +408,7 @@ if (!empty($conf->invoice->enabled)) { print "\n"; } -if (!empty($conf->order->enabled)) { +if (isModEnabled('commande')) { print ''; print ''.$langs->trans("StockMustBeEnoughForOrder").''; print ''; diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 50aaca466e2..2d57cfe1284 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -218,7 +218,7 @@ class CActionComm } // For case module = 'myobject@eventorganization' $tmparray = preg_split("/@/", $obj->module, -1); - if (count($tmparray) > 1 && $tmparray[1] == 'eventorganization' && !empty($conf->eventorganization->enabled)) { + if (count($tmparray) > 1 && $tmparray[1] == 'eventorganization' && isModEnabled('eventorganization')) { $qualified = 1; } // For the generic case with type = 'module...' and module = 'myobject@mymodule' diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 7acd7c78261..65c04a02d41 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1221,7 +1221,7 @@ if ($resql) { if ($permissiontocancel) { $arrayofmassactions['cancelorders'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel"); } - if (!empty($conf->invoice->enabled) && $user->rights->facture->creer) { + if (isModEnabled('facture') && $user->rights->facture->creer) { $arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisCustomer"); } if ($permissiontoclose) { diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 02423980002..0c591fd8193 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -209,7 +209,7 @@ function project_prepare_head(Project $project, $moreparam = '') $h++; } - if (!empty($conf->eventorganization->enabled) && !empty($project->usage_organize_event)) { + if (isModEnabled('eventorganization') && !empty($project->usage_organize_event)) { $langs->load('eventorganization'); $head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id; $head[$h][1] = $langs->trans("EventOrganization"); diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php index ac64a16602f..368da1c889a 100644 --- a/htdocs/eventorganization/conferenceorbooth_card.php +++ b/htdocs/eventorganization/conferenceorbooth_card.php @@ -220,7 +220,7 @@ if (!empty($withproject)) { print ''; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -243,7 +243,7 @@ if (!empty($withproject)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/eventorganization/conferenceorbooth_contact.php b/htdocs/eventorganization/conferenceorbooth_contact.php index 499c6d7ac6d..9521bff2c01 100644 --- a/htdocs/eventorganization/conferenceorbooth_contact.php +++ b/htdocs/eventorganization/conferenceorbooth_contact.php @@ -205,7 +205,7 @@ if (!empty($withproject)) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -228,7 +228,7 @@ if (!empty($withproject)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php index 4a5b368df02..d056a5b900c 100644 --- a/htdocs/eventorganization/conferenceorbooth_document.php +++ b/htdocs/eventorganization/conferenceorbooth_document.php @@ -176,7 +176,7 @@ if (!empty($withproject)) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -199,7 +199,7 @@ if (!empty($withproject)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 958d1ab897d..7866a83a024 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -300,7 +300,7 @@ if ($projectid > 0) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -323,7 +323,7 @@ if ($projectid > 0) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '').'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php index b02edfc4a34..79b7b1aaa55 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_card.php +++ b/htdocs/eventorganization/conferenceorboothattendee_card.php @@ -249,7 +249,7 @@ if (!empty($withproject)) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -272,7 +272,7 @@ if (!empty($withproject)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index c1626f7bbf3..7b8b6258e5e 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -427,7 +427,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -450,7 +450,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/eventorganization/eventorganizationindex.php b/htdocs/eventorganization/eventorganizationindex.php index d770d5e1900..60f5beefd70 100644 --- a/htdocs/eventorganization/eventorganizationindex.php +++ b/htdocs/eventorganization/eventorganizationindex.php @@ -71,7 +71,7 @@ print '
'; /* BEGIN MODULEBUILDER DRAFT MYOBJECT // Draft MyObject -if (!empty($conf->eventorganization->enabled) && $user->rights->eventorganization->read) +if (isModEnabled('eventorganization') && $user->rights->eventorganization->read) { $langs->load("orders"); @@ -152,7 +152,7 @@ $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; /* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT // Last modified myobject -if (!empty($conf->eventorganization->enabled) && $user->rights->eventorganization->read) +if (isModEnabled('eventorganization') && $user->rights->eventorganization->read) { $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."eventorganization_myobject as s"; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 4c70278fd1e..451334c5d77 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; // Load translation files required by the page $langsLoad=array('projects', 'companies'); -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langsLoad[]='eventorganization'; } @@ -558,7 +558,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print '
'; // Usage (opp, task, bill time, ...) - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -598,7 +598,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print ' '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print ''; @@ -859,7 +859,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -897,7 +897,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')) . '"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print ''; @@ -1063,7 +1063,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print '
'; print $langs->trans("Usage"); print '
'.$langs->trans("ProjectLabel").'
'; print $langs->trans("Usage"); print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -1087,7 +1087,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index be130572704..ec1f739f58f 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -34,7 +34,7 @@ if (isModEnabled('categorie')) { // Load translation files required by the page $langsLoad=array('projects', 'companies'); -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langsLoad[]='eventorganization'; } @@ -315,7 +315,7 @@ if ($id > 0 || !empty($ref)) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -338,7 +338,7 @@ if ($id > 0 || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index cf5c8fbde86..594362ba05d 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -134,7 +134,7 @@ if (!empty($conf->salaries->enabled)) { if (!empty($conf->mrp->enabled)) { $langs->load("mrp"); } -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langs->load("eventorganization"); } @@ -237,7 +237,7 @@ print '
'; print '
'; print $langs->trans("Usage"); print '
'; // Usage -if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { +if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -260,7 +260,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PRO print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index dda13754d31..c5549429edb 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -137,7 +137,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -160,7 +160,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 7deaf0a1870..b22a8849820 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -42,7 +42,7 @@ if (isModEnabled('categorie')) { // Load translation files required by the page $langs->loadLangs(array('projects', 'companies', 'commercial')); -if (!empty($conf->eventorganization->enabled) && $conf->eventorganization->enabled) { +if (isModEnabled('eventorganization') && $conf->eventorganization->enabled) { $langs->loadLangs(array('eventorganization')); } diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index de9bdf7855c..73d3c238026 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -37,7 +37,7 @@ if (isModEnabled('categorie')) { // Load translation files required by the page $langsLoad=array('projects', 'users', 'companies'); -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langsLoad[]='eventorganization'; } @@ -572,7 +572,7 @@ if ($id > 0 || !empty($ref)) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -595,7 +595,7 @@ if ($id > 0 || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index bed307d65bf..1f5628bb050 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -151,7 +151,7 @@ if ($id > 0 || !empty($ref)) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -174,7 +174,7 @@ if ($id > 0 || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 680f8ecc70a..14a87b375e8 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -215,7 +215,7 @@ if ($id > 0 || !empty($ref)) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -238,7 +238,7 @@ if ($id > 0 || !empty($ref)) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index f86d9c8f441..bc313dcebfa 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -171,7 +171,7 @@ if ($object->id > 0) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -194,7 +194,7 @@ if ($object->id > 0) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 6b7142dc0f2..40f8f636e72 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -161,7 +161,7 @@ if ($object->id > 0) { print '
'; print $langs->trans("Usage"); print '
'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) { print ''; @@ -184,7 +184,7 @@ if ($object->id > 0) { print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '
'; } - if (!empty($conf->eventorganization->enabled)) { + if (isModEnabled('eventorganization')) { print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 28e641a4877..3d5c74ff5ed 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; // Load translation files required by the page $langsLoad=array('projects', 'bills', 'orders', 'companies'); -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { $langsLoad[]='eventorganization'; } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index daa0c12b2b7..f8beacdbb2e 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -59,7 +59,7 @@ if (!empty($conf->accounting->enabled)) { if (!empty($conf->accounting->enabled)) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; } -if (!empty($conf->eventorganization->enabled)) { +if (isModEnabled('eventorganization')) { require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; }
'; print $langs->trans("Usage"); print '