diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index f8e8de04c20..1354f418967 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -186,12 +186,12 @@ print ''; print '
'; print ''; print ''; -print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n"; +print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '') . "\n"; print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); -print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; -if (!empty($conf->multicompany->enabled) && !$user->entity) { - print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; +print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; +if (isModEnabled('multicompany') && !$user->entity) { + print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; } print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); print "\n"; @@ -212,14 +212,14 @@ print ''; print ''; // Limit to superadmin -if (!empty($conf->multicompany->enabled) && !$user->entity) { +if (isModEnabled('multicompany') && !$user->entity) { print ''; print '\n"; @@ -281,7 +281,7 @@ if ($result) { print ''; // Entity limit to superadmin - if (!empty($conf->multicompany->enabled) && !$user->entity) { + if (isModEnabled('multicompany') && !$user->entity) { print ''; diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 698bb187d67..d9825ad6886 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -185,13 +185,13 @@ $message .= ajax_autoselect('webdavpublicurl'); $message .= '
'; if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) { - $urlEntity = (!empty($conf->multicompany->enabled) ? '?entity='.$conf->entity : ''); - $url = ''.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.''; + $urlEntity = (isModEnabled('multicompany') ? '?entity=' . $conf->entity : ''); + $url = '' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . ''; - $message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', '')); - $message .= ''; } else { print ''; } print ''; foreach ($modules as $module => $delays) { - if (!empty($conf->$module->enabled)) { + if (isModEnabled('module')) { foreach ($delays as $delay) { - $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0); + $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0); print ''; - print ''; - print ''; + print ''; + print ''; } } } @@ -260,13 +260,13 @@ if ($action == 'edit') { print ''; foreach ($modules as $module => $delays) { - if (!empty($conf->$module->enabled)) { + if (isModEnabled('module')) { foreach ($delays as $delay) { - $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0); + $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0); print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } } } diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index e297ba02d61..e41777da9d9 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -37,7 +37,7 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; if (!$user->admin) { accessforbidden(); } -if (empty($conf->emailcollector->enabled)) { +if (!isModEnabled('emailcollector')) { accessforbidden(); } @@ -547,20 +547,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; $arrayoftypes = array( - 'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")), - 'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")), - 'recordjoinpiece'=>'AttachJoinedDocumentsToObject', - 'recordevent'=>'RecordEvent'); + 'loadthirdparty' => $langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")), + 'loadandcreatethirdparty' => $langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")), + 'recordjoinpiece' => 'AttachJoinedDocumentsToObject', + 'recordevent' => 'RecordEvent' + ); $arrayoftypesnocondition = $arrayoftypes; - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $arrayoftypes['project'] = 'CreateLeadAndThirdParty'; } $arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty'; - if (!empty($conf->ticket->enabled)) { + if (isModEnabled('ticket')) { $arrayoftypes['ticket'] = 'CreateTicketAndThirdParty'; } $arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty'; - if (!empty($conf->recruitment->enabled)) { + if (isModEnabled('recruitment')) { $arrayoftypes['candidature'] = 'CreateCandidature'; } $arrayoftypesnocondition['candidature'] = 'CreateCandidature'; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 64cf24ca6fa..2418ec3e26c 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2011-2022 Philippe Grand * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -148,7 +148,7 @@ if ($action == 'updateMask') { $res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); $res3 = 0; - if (!empty($conf->project->enabled) && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided + if (isModEnabled('project') && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided $res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity); } @@ -471,7 +471,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htm print ''; print ''."\n"; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { print ''; } diff --git a/htdocs/admin/knowledgemanagement.php b/htdocs/admin/knowledgemanagement.php index 041216014b0..b1710a53839 100644 --- a/htdocs/admin/knowledgemanagement.php +++ b/htdocs/admin/knowledgemanagement.php @@ -208,12 +208,12 @@ if ($action == 'edit') { print ''; // Synchro contact active -if (isModEnabled("societe")) { +if (isModEnabled('societe')) { print ''; + print ''; } // Synchro member active -if (!empty($conf->adherent->enabled)) { - print ''; + print ''; } // Synchro member type active -if (!empty($conf->adherent->enabled)) { - print ''; + print ''; } // Fields from hook diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 1209f41c48e..d644f2bd2f6 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -36,7 +36,7 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $currencycode = GETPOST('currencycode', 'alpha'); -if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { +if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { // When MULTICURRENCY_USE_LIMIT_BY_CURRENCY is on, we use always a defined currency code instead of '' even for default. $currencycode = (!empty($currencycode) ? $currencycode : $conf->currency); } @@ -105,12 +105,12 @@ print load_fiche_titre($title, '', 'title_setup'); $aCurrencies = array($conf->currency); // Default currency always first position -if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { - require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php'; +if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { + require_once DOL_DOCUMENT_ROOT . '/core/lib/multicurrency.lib.php'; - $sql = "SELECT rowid, code FROM ".MAIN_DB_PREFIX."multicurrency"; - $sql .= " WHERE entity = ".((int) $conf->entity); - $sql .= " AND code <> '".$db->escape($conf->currency)."'"; // Default currency always first position + $sql = "SELECT rowid, code FROM " . MAIN_DB_PREFIX . "multicurrency"; + $sql .= " WHERE entity = " . ((int) $conf->entity); + $sql .= " AND code <> '" . $db->escape($conf->currency) . "'"; // Default currency always first position $resql = $db->query($sql); if ($resql) { while ($obj = $db->fetch_object($resql)) { @@ -129,11 +129,11 @@ print ''.$langs->trans("LimitsDesc")."
\n" print "
\n"; if ($action == 'edit') { - print ''; - print ''; + print ''; + print ''; print ''; - if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { - print ''; + if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { + print ''; } clearstatcache(); @@ -194,7 +194,7 @@ if ($action == 'edit') { print ''; } -if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { +if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { if (!empty($aCurrencies) && count($aCurrencies) > 1) { print dol_get_fiche_end(); } diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 72b2a15d678..3c777e1f187 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -26,7 +26,7 @@ require '../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; } @@ -76,7 +76,7 @@ if ($action == 'update') { llxHeader(); $form = new Form($db); -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); } @@ -100,14 +100,14 @@ foreach ($list as $key) { // Param $label = $langs->trans($key); - print ''; + print ''; // Value print ''; } diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 79ddda792e0..f7203d88474 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -294,16 +294,16 @@ if ($action == 'edit') { } print ''; } @@ -326,15 +326,15 @@ if ($action == 'edit') { } print ''; @@ -342,14 +342,14 @@ if ($action == 'edit') { // ID if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { $mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_ID_EMAILING : ''); - print ''; } @@ -357,14 +357,14 @@ if ($action == 'edit') { // PW if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { $mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_PW_EMAILING : ''); - print ''; } @@ -533,16 +533,16 @@ if ($action == 'edit') { if (!empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') { if ($conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'mail' || !$linuxlike) { if (function_exists('fsockopen') && $port && $server) { - print ''.$langs->trans("DoTestServerAvailability").''; + print '' . $langs->trans("DoTestServerAvailability") . ''; } } else { - print ''.$langs->trans("DoTestServerAvailability").''; + print '' . $langs->trans("DoTestServerAvailability") . ''; } - print ''.$langs->trans("DoTestSend").''; + print '' . $langs->trans("DoTestSend") . ''; - if (!empty($conf->fckeditor->enabled)) { - print ''.$langs->trans("DoTestSendHTML").''; + if (isModEnabled('fckeditor')) { + print '' . $langs->trans("DoTestSendHTML") . ''; } }
'; print ''; - print ''; + print ''; print ''; } else { print ''; - print ''; + print ''; } print ''; print "'; print ''; print ''; - print ''; // We see environment, but to change it we must switch on other entity + print ''; // We see environment, but to change it we must switch on other entity print ''; - print ''; + print ''; print ''; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 2ae77b03d07..af8fed1c197 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -172,7 +172,7 @@ if (!isset($conf->global->MAIN_DELAY_ORDERS_TO_PROCESS)) { if ($action == 'update') { foreach ($modules as $module => $delays) { - if (!empty($conf->$module->enabled)) { + if (isModEnabled('module')) { foreach ($delays as $delay) { if (GETPOST($delay['code']) != '') { dolibarr_set_const($db, $delay['code'], GETPOST($delay['code']), 'chaine', 0, '', $conf->entity); @@ -226,13 +226,13 @@ if ($action == 'edit') { print ''.$langs->trans("LateWarningAfter").'
'.img_object('', $delay['img']).''.$langs->trans('Delays_'.$delay['code']).''; - print ' '.$langs->trans("days").'
' . img_object('', $delay['img']) . '' . $langs->trans('Delays_' . $delay['code']) . ''; + print ' ' . $langs->trans("days") . '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'.img_object('', $delay['img']).''.$langs->trans('Delays_'.$delay['code']).''.$value.' '.$langs->trans("days").'
' . img_object('', $delay['img']) . '' . $langs->trans('Delays_' . $delay['code']) . '' . $value . ' ' . $langs->trans("days") . '
'; print $langs->trans('ProjectIsRequiredOnExpenseReports'); print ''; diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index 3bc1e3a12d4..c568e6de39c 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -492,14 +492,14 @@ if ($action == 'edit') { print ''; if ($val['type'] == 'textarea') { - print '\n"; - } elseif ($val['type']== 'integer') { - print '' . "\n"; - } elseif ($val['type']== 'html') { + } elseif ($val['type'] == 'integer') { + print '' . "\n"; + } elseif ($val['type'] == 'html') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); } elseif ($val['type'] == 'yesno') { print $form->selectyesno($constname, $conf->global->{$constname}, 1); @@ -532,25 +532,25 @@ if ($action == 'edit') { print img_picto('', 'category', 'class="pictofixedwidth"'); print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); } elseif (preg_match('/thirdparty_type/', $val['type'])) { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; $formcompany = new FormCompany($db); print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname); } elseif ($val['type'] == 'securekey') { - print ''; + print ''; if (!empty($conf->use_javascript_ajax)) { - print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); + print ' ' . img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token' . $constname . '" class="linkobject"'); } // Add button to autosuggest a key - include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); + include_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php'; + print dolJSToSetRandomPassword($constname, 'generate_token' . $constname); } elseif ($val['type'] == 'product') { - if (isModEnabled("product") || isModEnabled("service")) { + if (isModEnabled('product') || isModEnabled('service')) { $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $form->select_produits($selected, $constname, '', 0); } } else { - print ''; + print ''; } print '
'; if ($val['type'] == 'textarea') { - print '\n"; - } elseif ($val['type']== 'html') { + } elseif ($val['type'] == 'html') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); } elseif ($val['type'] == 'yesno') { print $form->selectyesno($constname, $conf->global->{$constname}, 1); diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 84d6a052196..568664b92b7 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -158,24 +158,24 @@ if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && empty($conf->global->LDAP_USER print '
'.$langs->trans("LDAPDnContactActive").''; print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR)); - print ''.$langs->trans("LDAPDnContactActiveExample").'
' . $langs->trans("LDAPDnContactActiveExample") . '
'.$langs->trans("LDAPDnMemberActive").''; +if (isModEnabled('adherent')) { + print '
' . $langs->trans("LDAPDnMemberActive") . ''; print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_ACTIVE'), 'activemembers', array(), 2); - print ''.$langs->trans("LDAPDnMemberActiveExample").'
' . $langs->trans("LDAPDnMemberActiveExample") . '
'.$langs->trans("LDAPDnMemberTypeActive").''; +if (isModEnabled('adherent')) { + print '
' . $langs->trans("LDAPDnMemberTypeActive") . ''; print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE'), 'activememberstypes', array(), 2); - print ''.$langs->trans("LDAPDnMemberTypeActiveExample").'
' . $langs->trans("LDAPDnMemberTypeActiveExample") . '
'; - if (!empty($conf->accounting->enabled)) { + if (isModEnabled('accounting')) { print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1); } else { - print ''; + print ''; } print '
'; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; - print ''; - print ''.$langs->trans("SeeLocalSendMailSetup").''; - print ' '.$langs->trans("SeeLinkToOnlineDocumentation").''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; + print ''; + print '' . $langs->trans("SeeLocalSendMailSetup") . ''; + print ' ' . $langs->trans("SeeLinkToOnlineDocumentation") . ''; } else { $text = !empty($mainserver) ? $mainserver : $smtpserver; $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); - print ''; + print ''; } print ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; - print ''; - print ''.$langs->trans("SeeLocalSendMailSetup").''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; + print ''; + print '' . $langs->trans("SeeLocalSendMailSetup") . ''; } else { $text = (!empty($mainport) ? $mainport : $smtpport); $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); - print ''; + print ''; } } print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; + print '
' . $langs->trans("MAIN_MAIL_SMTPS_ID") . ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING, $htmltext, 1, 'superadmin'); - print ''; + print ''; } print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; + print '
' . $langs->trans("MAIN_MAIL_SMTPS_PW") . ''; // SuperAdministrator access only - if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { - print ''; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING, $htmltext, 1, 'superadmin'); - print ''; + print ''; } print '