';
print '';
print "".$langs->trans("Parameter")." ";
-print "".$langs->trans("Value")." ";
+print " ";
//print "".$langs->trans("Examples")." ";
print " ";
print " ";
@@ -180,8 +180,8 @@ print "\n";
clearstatcache();
-//if ($mesg) print " $mesg ";
-print " ";
+
+print " ";
// Define $urlwithroot
diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index c54ca5dc0f4..b4e9267eec0 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -412,7 +412,7 @@ if ($action == 'edit') {
print '';
} else {
print '';
- $mainserver = (getDolGlobalString('MAIN_MAIL_SMTP_SERVER') ? $conf->global->MAIN_MAIL_SMTP_SERVER : '');
+ $mainserver = getDolGlobalString('MAIN_MAIL_SMTP_SERVER');
$smtpserver = ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined");
if ($linuxlike) {
print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
@@ -443,7 +443,7 @@ if ($action == 'edit') {
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
} else {
- $mainport = (getDolGlobalString('MAIN_MAIL_SMTP_PORT') ? $conf->global->MAIN_MAIL_SMTP_PORT : '');
+ $mainport = getDolGlobalString('MAIN_MAIL_SMTP_PORT');
$smtpport = ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined");
if ($linuxlike) {
print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
@@ -495,14 +495,14 @@ if ($action == 'edit') {
// ID
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) {
- $mainstmpid = (getDolGlobalString('MAIN_MAIL_SMTPS_ID') ? $conf->global->MAIN_MAIL_SMTPS_ID : '');
+ $mainstmpid = getDolGlobalString('MAIN_MAIL_SMTPS_ID');
print ' '.$langs->trans("MAIN_MAIL_SMTPS_ID").' ';
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print ' ';
} else {
$htmltext = $langs->trans("ContactSuperAdminForChange");
- print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID, $htmltext, 1, 'superadmin');
+ print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_ID'), $htmltext, 1, 'superadmin');
print ' ';
}
print ' ';
@@ -549,7 +549,7 @@ if ($action == 'edit') {
print ''.$langs->trans("MAIN_MAIL_EMAIL_TLS").' ';
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_TLS', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS') ? $conf->global->MAIN_MAIL_EMAIL_TLS : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_TLS', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS') ? getDolGlobalString('MAIN_MAIL_EMAIL_TLS') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -562,7 +562,7 @@ if ($action == 'edit') {
print ' '.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").' ';
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS') ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS') ? getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -575,7 +575,7 @@ if ($action == 'edit') {
print ' '.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").' ';
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED') ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED') ? getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -588,7 +588,7 @@ if ($action == 'edit') {
print ' '.$langs->trans("MAIN_MAIL_EMAIL_DKIM_ENABLED").' ';
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('swiftmailer')))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_DKIM_ENABLED', (getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_ENABLED') ? $conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_DKIM_ENABLED', (getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_ENABLED') ? getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_ENABLED') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -599,17 +599,17 @@ if ($action == 'edit') {
// DKIM Domain
print ' '.$langs->trans("MAIN_MAIL_EMAIL_DKIM_DOMAIN").' ';
- print ' ';
// DKIM Selector
print ''.$langs->trans("MAIN_MAIL_EMAIL_DKIM_SELECTOR").' ';
- print ' ';
// DKIM PRIVATE KEY
print ''.$langs->trans("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").' ';
- print '';
+ print ' ';
print ' ';
print '
';
@@ -632,13 +632,13 @@ if ($action == 'edit') {
print $langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ? ini_get('sendmail_from') : $langs->transnoentities("Undefined"));
print ' '.$help;
print '';
- print ''.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").' ';
- if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn(getDolGlobalInt('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING'));
} else {
@@ -773,8 +773,8 @@ if ($action == 'edit') {
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->trackid = (($action == 'testhtml') ? "testhtml" : "test");
- $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : $conf->global->MAIN_MAIL_EMAIL_FROM);
- $formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail', 'restricthtml') : $conf->global->MAIN_MAIL_EMAIL_FROM);
+ $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : getDolGlobalString('MAIN_MAIL_EMAIL_FROM'));
+ $formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail', 'restricthtml') : getDolGlobalString('MAIN_MAIL_EMAIL_FROM'));
$formmail->fromid = $user->id;
$formmail->fromalsorobot = 1;
$formmail->withfromreadonly = 0;
diff --git a/htdocs/admin/mails_ingoing.php b/htdocs/admin/mails_ingoing.php
index 12bd4d93ce8..734d83f619c 100644
--- a/htdocs/admin/mails_ingoing.php
+++ b/htdocs/admin/mails_ingoing.php
@@ -127,7 +127,7 @@ print '';
// SMTPS oauth service
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') === "XOAUTH2") {
- $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE];
+ $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')];
if (empty($text)) {
$text = $langs->trans("Undefined").img_warning();
}
diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php
index 29c8d203342..5f3b07ce7ee 100644
--- a/htdocs/admin/mails_passwordreset.php
+++ b/htdocs/admin/mails_passwordreset.php
@@ -358,7 +358,7 @@ if ($action == 'edit') {
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
- print $form->selectarray('MAIN_MAIL_SENDMODE_PASSWORDRESET', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET);
+ print $form->selectarray('MAIN_MAIL_SENDMODE_PASSWORDRESET', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'));
} else {
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET')];
if (empty($text)) {
@@ -381,7 +381,7 @@ if ($action == 'edit') {
print '';
} else {
print '';
- $mainserver = (getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_PASSWORDRESET : '');
+ $mainserver = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET');
$smtpserver = ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined");
if ($linuxlike) {
print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
@@ -413,7 +413,7 @@ if ($action == 'edit') {
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
} else {
- $mainport = (getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_PORT_PASSWORDRESET : '');
+ $mainport = getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET');
$smtpport = ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined");
if ($linuxlike) {
print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
@@ -436,7 +436,7 @@ if ($action == 'edit') {
print ' ';
// AUTH method
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
print ''.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").' ';
$vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET';
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
@@ -464,22 +464,22 @@ if ($action == 'edit') {
}
// ID
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) {
- $mainstmpid = (getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTPS_ID_PASSWORDRESET : '');
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
+ $mainstmpid = getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET');
print ' '.$langs->trans("MAIN_MAIL_SMTPS_ID").' ';
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print ' ';
} else {
$htmltext = $langs->trans("ContactSuperAdminForChange");
- print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_PASSWORDRESET, $htmltext, 1, 'superadmin');
+ print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET'), $htmltext, 1, 'superadmin');
print ' ';
}
print ' ';
}
// PW
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
$mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET');
print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").' ';
// SuperAdministrator access only
@@ -494,11 +494,11 @@ if ($action == 'edit') {
}
// OAUTH service provider
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
print ' '.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").' ';
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
- print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET);
+ print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET'));
} else {
$text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET')];
if (empty($text)) {
@@ -514,9 +514,9 @@ if ($action == 'edit') {
// TLS
print ' '.$langs->trans("MAIN_MAIL_EMAIL_TLS").' ';
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_TLS_PASSWORDRESET : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET') ? getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -528,9 +528,9 @@ if ($action == 'edit') {
// STARTTLS
print ' '.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").' ';
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET') ? getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -541,9 +541,9 @@ if ($action == 'edit') {
// SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET
print ' '.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").' ';
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET') ? getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -587,14 +587,14 @@ if ($action == 'edit') {
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail')) {
//print ' '.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").' '.$langs->trans("SeeLocalSendMailSetup").' ';
} else {
- print ''.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).' '.(getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_PASSWORDRESET : '').' ';
+ print ''.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).' '.getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET').' ';
}
// Port
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail')) {
//print ''.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").' '.$langs->trans("SeeLocalSendMailSetup").' ';
} else {
- print ''.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).' '.(getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_PORT_PASSWORDRESET : '').' ';
+ print ''.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).' '.getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET').' ';
}
// AUTH method
@@ -612,12 +612,12 @@ if ($action == 'edit') {
}
// SMTPS ID
- if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
print ''.$langs->trans("MAIN_MAIL_SMTPS_ID").' ' . getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET').' ';
}
// SMTPS PW
- if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET') != "XOAUTH2") {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET') != "XOAUTH2") {
print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").' '.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET')).' ';
}
@@ -635,7 +635,7 @@ if ($action == 'edit') {
// Nothing
} else {
print ''.$langs->trans("MAIN_MAIL_EMAIL_TLS").' ';
- if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET'));
} else {
@@ -652,7 +652,7 @@ if ($action == 'edit') {
// Nothing
} else {
print ' '.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").' ';
- if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET'));
} else {
@@ -669,7 +669,7 @@ if ($action == 'edit') {
// Nothing
} else {
print ' '.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").' ';
- if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn(getDolGlobalInt('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET'));
} else {
diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php
index 4ffa822f966..6666861cf89 100644
--- a/htdocs/admin/mails_ticket.php
+++ b/htdocs/admin/mails_ticket.php
@@ -358,7 +358,7 @@ if ($action == 'edit') {
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
- print $form->selectarray('MAIN_MAIL_SENDMODE_TICKET', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_TICKET);
+ print $form->selectarray('MAIN_MAIL_SENDMODE_TICKET', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'));
} else {
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET')];
if (empty($text)) {
@@ -381,7 +381,7 @@ if ($action == 'edit') {
print ' ';
} else {
print '';
- $mainserver = (getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : '');
+ $mainserver = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET');
$smtpserver = ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined");
if ($linuxlike) {
print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
@@ -413,7 +413,7 @@ if ($action == 'edit') {
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
} else {
- $mainport = (getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET') ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '');
+ $mainport = getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET');
$smtpport = ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined");
if ($linuxlike) {
print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
@@ -436,7 +436,7 @@ if ($action == 'edit') {
print ' ';
// AUTH method
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
print ''.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").' ';
$vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET';
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
@@ -464,22 +464,22 @@ if ($action == 'edit') {
}
// ID
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
- $mainstmpid = (getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET') ? $conf->global->MAIN_MAIL_SMTPS_ID_TICKET : '');
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
+ $mainstmpid = getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET');
print ' '.$langs->trans("MAIN_MAIL_SMTPS_ID").' ';
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print ' ';
} else {
$htmltext = $langs->trans("ContactSuperAdminForChange");
- print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_TICKET, $htmltext, 1, 'superadmin');
+ print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET'), $htmltext, 1, 'superadmin');
print ' ';
}
print ' ';
}
// PW
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
$mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_TICKET');
print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").' ';
// SuperAdministrator access only
@@ -494,11 +494,11 @@ if ($action == 'edit') {
}
// OAUTH service provider
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
print ' '.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").' ';
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
- print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET);
+ print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET'));
} else {
$text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET')];
if (empty($text)) {
@@ -513,9 +513,9 @@ if ($action == 'edit') {
// TLS
print ' '.$langs->trans("MAIN_MAIL_EMAIL_TLS").' ';
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET') ? $conf->global->MAIN_MAIL_EMAIL_TLS_TICKET : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET') ? getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -526,9 +526,9 @@ if ($action == 'edit') {
// STARTTLS
print ' '.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").' ';
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET') ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET') ? getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -539,9 +539,9 @@ if ($action == 'edit') {
// SMTP_ALLOW_SELF_SIGNED_TICKET
print ' '.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").' ';
- if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
+ if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
- print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET') ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET : 0), 1);
+ print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET') ? getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET') : 0), 1);
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@@ -585,14 +585,14 @@ if ($action == 'edit') {
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail')) {
//print ' '.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").' '.$langs->trans("SeeLocalSendMailSetup").' ';
} else {
- print ''.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).' '.(getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : '').' ';
+ print ''.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).' '.getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET').' ';
}
// Port
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail')) {
//print ''.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").' '.$langs->trans("SeeLocalSendMailSetup").' ';
} else {
- print ''.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).' '.(getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET') ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '').' ';
+ print ''.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).' '.getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET').' ';
}
// AUTH method
@@ -610,12 +610,12 @@ if ($action == 'edit') {
}
// SMTPS ID
- if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) {
- print ''.$langs->trans("MAIN_MAIL_SMTPS_ID").' ' . getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET').' ';
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
+ print ''.$langs->trans("MAIN_MAIL_SMTPS_ID").' '.getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET').' ';
}
// SMTPS PW
- if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') != "XOAUTH2") {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') != "XOAUTH2") {
print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").' '.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW_TICKET')).' ';
}
@@ -633,7 +633,7 @@ if ($action == 'edit') {
// Nothing
} else {
print ''.$langs->trans("MAIN_MAIL_EMAIL_TLS").' ';
- if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET'));
} else {
@@ -650,7 +650,7 @@ if ($action == 'edit') {
// Nothing
} else {
print ' '.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").' ';
- if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET'));
} else {
@@ -667,7 +667,7 @@ if ($action == 'edit') {
// Nothing
} else {
print ' '.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").' ';
- if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) {
+ if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn(getDolGlobalInt('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET'));
} else {
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 6b6faa7d481..f9cde4b5363 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -290,9 +290,8 @@ if ($action == 'install' && $allowonlineinstall) {
if (!is_numeric($checkRes) && $checkRes != '') {
$langs->load("errors");
setEventMessages($modulename.' : '.$langs->trans($checkRes), null, 'errors');
+ $error++;
}
-
- $error++;
} catch (Exception $e) {
// Nothing done
}
diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php
index 701d9238627..bd39f0fae3f 100644
--- a/htdocs/commande/class/api_orders.class.php
+++ b/htdocs/commande/class/api_orders.class.php
@@ -1090,6 +1090,7 @@ class Orders extends DolibarrApi
$shipment = new Expedition($this->db);
$shipment->socid = $this->commande->socid;
$shipment->origin_id = $this->commande->id;
+ $shipment->origin = $this->commande->element;
$result = $shipment->create(DolibarrApiAccess::$user);
if ($result <= 0) {
throw new RestException(500, 'Error on creating expedition :'.$this->db->lasterror());
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 02e4d63e5f0..3848b19cc28 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -1082,6 +1082,11 @@ class Conf extends stdClass
$this->global->USE_STRICT_CSV_RULES = 2;
}
+ // By default, accept to create members with no login
+ if (!isset($this->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
+ $this->global->ADHERENT_LOGIN_NOT_REQUIRED = 1;
+ }
+
// Use a SCA ready workflow with Stripe module (STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION by default if nothing defined)
if (!isset($this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) && empty($this->global->STRIPE_USE_NEW_CHECKOUT)) {
$this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 1;
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 6aca908bffd..4009a3f749e 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -1499,7 +1499,7 @@ class ExtraFields
$sql .= $sqlwhere;
//print $sql;
- $sql .= ' ORDER BY '.implode(', ', $fields_label);
+ $sql .= $this->db->order(implode(',', $fields_label));
dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG);
$resql = $this->db->query($sql);
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index fadbbcad13a..b7eb9066850 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -2144,7 +2144,7 @@ function email_admin_prepare_head()
$h++;
}
- if (getDolGlobalString('MAIN_MAIL_ALLOW_CUSTOM_SENDING_METHOD_FOR_PASSWORD_RESET')) {
+ if (!getDolGlobalString('MAIN_MAIL_HIDE_CUSTOM_SENDING_METHOD_FOR_PASSWORD_RESET')) {
$head[$h][0] = DOL_URL_ROOT."/admin/mails_passwordreset.php";
$head[$h][1] = $langs->trans("OutGoingEmailSetupForEmailing", $langs->transnoentitiesnoconv("PasswordReset"));
$head[$h][2] = 'common_passwordreset';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 06ce0567f53..9c411ea7caf 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -7577,7 +7577,7 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer,
$buyer_country_code = $thirdparty_buyer->country_code;
$buyer_in_cee = isInEEC($thirdparty_buyer);
- dol_syslog("get_default_tva: seller use vat=".$seller_use_vat.", seller country=".$seller_country_code.", seller in cee=".((string) (int) $seller_in_cee).", buyer vat number=".$thirdparty_buyer->tva_intra." buyer country=".$buyer_country_code.", buyer in cee=".((string) (int) $buyer_in_cee).", idprod=".$idprod.", idprodfournprice=".$idprodfournprice.", SERVICE_ARE_ECOMMERCE_200238EC=".(getDolGlobalString('SERVICES_ARE_ECOMMERCE_200238EC') ? $conf->global->SERVICES_ARE_ECOMMERCE_200238EC : ''));
+ dol_syslog("get_default_tva: seller use vat=".$seller_use_vat.", seller country=".$seller_country_code.", seller in cee=".((string) (int) $seller_in_cee).", buyer vat number=".$thirdparty_buyer->tva_intra." buyer country=".$buyer_country_code.", buyer in cee=".((string) (int) $buyer_in_cee).", idprod=".$idprod.", idprodfournprice=".$idprodfournprice.", SERVICE_ARE_ECOMMERCE_200238EC=".(getDolGlobalString('SERVICE_ARE_ECOMMERCE_200238EC') ? $conf->global->SERVICE_ARE_ECOMMERCE_200238EC : ''));
// If services are eServices according to EU Council Directive 2002/38/EC (http://ec.europa.eu/taxation_customs/taxation/vat/traders/e-commerce/article_1610_en.htm)
// we use the buyer VAT.
diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php
index 59ef1023b2b..3964d67232d 100644
--- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php
+++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php
@@ -14,7 +14,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-
+/**
+ * @var Conf $conf
+ * @var Translate $langs
+ * @var string $servicename
+ */
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php
index 272c21ded9d..d01fb3a5f99 100644
--- a/htdocs/core/tpl/passwordforgotten.tpl.php
+++ b/htdocs/core/tpl/passwordforgotten.tpl.php
@@ -23,7 +23,24 @@
if (!defined('NOBROWSERNOTIF')) {
define('NOBROWSERNOTIF', 1);
}
-
+/**
+ * @var Conf $conf
+ * @var DoliDB $db
+ * @var HookManager $hookmanager
+ * @var Translate $langs
+ *
+ * @var string $action
+ * @var string $captcha
+ * @var string $disabled
+ * @var string $dol_url_root
+ * @var string $focus_element
+ * @var string $mode
+ * @var string $message
+ * @var string $title
+ * @var string $urllogo
+ * @var string $user
+ * @var string $username
+ */
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
@@ -39,14 +56,6 @@ if ($size > 10000) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
-/**
- * @var HookManager $hookmanager
- * @var string $action
- * @var string $captcha
- * @var string $message
- * @var string $title
- */
-
/*
* View
diff --git a/htdocs/core/tpl/passwordreset.tpl.php b/htdocs/core/tpl/passwordreset.tpl.php
index 61a27c6853a..4754c76c4fb 100644
--- a/htdocs/core/tpl/passwordreset.tpl.php
+++ b/htdocs/core/tpl/passwordreset.tpl.php
@@ -22,7 +22,29 @@
if (!defined('NOBROWSERNOTIF')) {
define('NOBROWSERNOTIF', 1);
}
-
+/**
+ * @var Conf $conf
+ * @var DoliDB $db
+ * @var HookManager $hookmanager
+ * @var Translate $langs
+ *
+ * @var string $action
+ * @var string $captcha
+ * @var string $disabled
+ * @var string $dol_url_root
+ * @var string $focus_element
+ * @var string $mode
+ * @var string $message
+ * @var string $newpass1
+ * @var string $newpass2
+ * @var string $passworduidhash
+ * @var string $title
+ * @var string $urllogo
+ * @var string $user
+ * @var string $username
+ *
+ * @var int $setnewpassword
+ */
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
@@ -38,14 +60,6 @@ if ($size > 10000) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
-/**
- * @var HookManager $hookmanager
- * @var string $action
- * @var string $captcha
- * @var string $message
- * @var string $title
- */
-
/*
* View
diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql
index 71037e6248e..5299e018576 100644
--- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql
+++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql
@@ -384,3 +384,4 @@ INSERT INTO llx_c_type_contact (element, source, code, libelle, active ) values
ALTER TABLE llx_facture_rec ADD COLUMN fk_societe_rib integer DEFAULT NULL;
ALTER TABLE llx_facture ADD COLUMN is_also_delivery_note tinyint DEFAULT 0 NOT NULL;
+ALTER TABLE llx_user MODIFY COLUMN signature LONGTEXT;
diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql
index 065c6bd4f0d..66d3acc0db3 100644
--- a/htdocs/install/mysql/tables/llx_user.sql
+++ b/htdocs/install/mysql/tables/llx_user.sql
@@ -60,7 +60,7 @@ create table llx_user
email varchar(255),
personal_email varchar(255),
email_oauth2 varchar(255), -- an email to validate OAuth2 authentication when email differs from the OAuth2 email
- signature text DEFAULT NULL,
+ signature longtext DEFAULT NULL,
socialnetworks text DEFAULT NULL, -- json with socialnetworks
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index c612d5367f8..31340596a94 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -113,6 +113,9 @@ if ((!$versionfrom || preg_match('/version/', $versionfrom)) && (!$versionto ||
$path = __DIR__.'/';
if (substr($sapi_type, 0, 3) == 'cli') {
print 'Syntax from command line: '.$script_file." x.y.z a.b.c [MAIN_MODULE_NAME1_TO_ENABLE,MAIN_MODULE_NAME2_TO_ENABLE...]\n";
+ print 'Example, upgrade from 19 to 20: '.$script_file." 19.0.0 20.0.0\n";
+ print 'Example, enable a module only: '.$script_file." 0.0.0 0.0.0 MAIN_MODULE_Adherent\n";
+ print "\n";
}
exit;
}