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 '
';
// 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 ' | ';
}
@@ -326,15 +326,15 @@ if ($action == 'edit') {
}
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 ' | ';
@@ -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 '| '.$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 ' |
';
}
@@ -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 '| '.$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 ' |
';
}
@@ -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") . '';
}
}