';
if (getDolGlobalString('MEMBER_NEWFORM_TEXT')) {
- print $langs->trans($conf->global->MEMBER_NEWFORM_TEXT)."
\n";
+ print $langs->trans(getDolGlobalString('MEMBER_NEWFORM_TEXT'))."
\n";
} else {
print $langs->trans("NewSubscriptionDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
\n";
}
@@ -593,7 +593,7 @@ if (getDolGlobalString('MEMBER_SKIP_TABLE') || getDolGlobalString('MEMBER_NEWFOR
print $form->selectarray("typeid", $adht->liste_array(1), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty);
print ''."\n";
} else {
- $adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE);
+ $adht->fetch(getDolGlobalString('MEMBER_NEWFORM_FORCETYPE'));
print '
';
}
@@ -769,7 +769,7 @@ if (getDolGlobalString('MEMBER_SKIP_TABLE') || getDolGlobalString('MEMBER_NEWFOR
$amount = empty($amountbytype[$typeid]) ? (isset($amount) ? $amount : 0) : $amountbytype[$typeid];
// - If not found, take the default amount only of the user is authorized to edit it
if ($caneditamount && empty($amount) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) {
- $amount = $conf->global->MEMBER_NEWFORM_AMOUNT;
+ $amount = getDolGlobalString('MEMBER_NEWFORM_AMOUNT');
}
// - If not set, we accept ot have amount defined as parameter (for backward compatibility).
if (empty($amount)) {
@@ -787,7 +787,7 @@ if (getDolGlobalString('MEMBER_SKIP_TABLE') || getDolGlobalString('MEMBER_NEWFOR
print '
';
if (empty($amount) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) {
- $amount = $conf->global->MEMBER_NEWFORM_AMOUNT;
+ $amount = getDolGlobalString('MEMBER_NEWFORM_AMOUNT');
}
if ($caneditamount) {
diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php
index 7495c44d4a0..22a0557b4cc 100644
--- a/htdocs/public/onlinesign/newonlinesign.php
+++ b/htdocs/public/onlinesign/newonlinesign.php
@@ -262,9 +262,9 @@ $logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
$paramlogo = 'ONLINE_SIGN_LOGO_'.$suffix;
if (!empty($conf->global->$paramlogo)) {
- $logosmall = $conf->global->$paramlogo;
+ $logosmall = getDolGlobalString($paramlogo);
} elseif (getDolGlobalString('ONLINE_SIGN_LOGO')) {
- $logosmall = $conf->global->ONLINE_SIGN_LOGO;
+ $logosmall = getDolGlobalString('ONLINE_SIGN_LOGO');
}
//print ''."\n";
// Define urllogo
diff --git a/htdocs/public/opensurvey/index.php b/htdocs/public/opensurvey/index.php
index 568e6374f95..4668789c9c0 100644
--- a/htdocs/public/opensurvey/index.php
+++ b/htdocs/public/opensurvey/index.php
@@ -135,9 +135,9 @@ $logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
$paramlogo = 'ONLINE_OPENSURVEY_LOGO_'.$suffix;
if (!empty($conf->global->$paramlogo)) {
- $logosmall = $conf->global->$paramlogo;
+ $logosmall = getDolGlobalString($paramlogo);
} elseif (getDolGlobalString('ONLINE_OPENSURVEY_LOGO')) {
- $logosmall = $conf->global->ONLINE_OPENSURVEY_LOGO_;
+ $logosmall = getDolGlobalString('ONLINE_OPENSURVEY_LOGO_');
}
//print ''."\n";
// Define urllogo
diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php
index 73c2e3baa17..c8cc832b183 100644
--- a/htdocs/public/partnership/new.php
+++ b/htdocs/public/partnership/new.php
@@ -422,7 +422,7 @@ if (empty($reshook) && $action == 'add') {
if (!empty($backtopage)) {
$urlback = $backtopage;
} elseif (getDolGlobalString('PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION')) {
- $urlback = $conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION;
+ $urlback = getDolGlobalString('PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION');
// TODO Make replacement of __AMOUNT__, etc...
} else {
$urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken();
@@ -558,7 +558,7 @@ print '';
print '
';
if (getDolGlobalString('PARTNERSHIP_NEWFORM_TEXT')) {
- print $langs->trans($conf->global->PARTNERSHIP_NEWFORM_TEXT)."
\n";
+ print $langs->trans(getDolGlobalString('PARTNERSHIP_NEWFORM_TEXT'))."
\n";
} else {
print $langs->trans("NewPartnershipRequestDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
\n";
}
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index 4abd4485c34..121a39f9bf7 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -340,9 +340,9 @@ $creditor = $mysoc->name;
$paramcreditor = 'ONLINE_PAYMENT_CREDITOR';
$paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix;
if (!empty($conf->global->$paramcreditorlong)) {
- $creditor = $conf->global->$paramcreditorlong; // use label long of the seller to show
+ $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show
} elseif (!empty($conf->global->$paramcreditor)) {
- $creditor = $conf->global->$paramcreditor; // use label short of the seller to show
+ $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show
}
$mesg = '';
@@ -433,7 +433,7 @@ if ($action == 'dopayment') {
if ($paymentmethod == 'paybox') {
$PRICE = price2num(GETPOST("newamount"), 'MT');
- $email = $conf->global->ONLINE_PAYMENT_SENDEMAIL;
+ $email = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL');
$thirdparty_id = GETPOST('thirdparty_id', 'int');
$origfulltag = GETPOST("fulltag", 'alpha');
@@ -892,9 +892,9 @@ $logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
if (!empty($conf->global->$paramlogo)) {
- $logosmall = $conf->global->$paramlogo;
+ $logosmall = getDolGlobalString($paramlogo);
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
- $logosmall = $conf->global->ONLINE_PAYMENT_LOGO;
+ $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
}
//print ''."\n";
// Define urllogo
@@ -1799,11 +1799,11 @@ if ($source == 'donation') {
if (empty($valtoshow)) {
if (getDolGlobalString('DONATION_NEWFORM_EDITAMOUNT')) {
if (getDolGlobalString('DONATION_NEWFORM_AMOUNT')) {
- $valtoshow = $conf->global->DONATION_NEWFORM_AMOUNT;
+ $valtoshow = getDolGlobalString('DONATION_NEWFORM_AMOUNT');
}
} else {
if (getDolGlobalString('DONATION_NEWFORM_AMOUNT')) {
- $amount = $conf->global->DONATION_NEWFORM_AMOUNT;
+ $amount = getDolGlobalString('DONATION_NEWFORM_AMOUNT');
}
}
}
diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php
index 01fabbde20c..ac61888b738 100644
--- a/htdocs/public/payment/paymentko.php
+++ b/htdocs/public/payment/paymentko.php
@@ -167,7 +167,7 @@ if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice
// Send an email
$sendemail = '';
if (getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL')) {
- $sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL;
+ $sendemail = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL');
}
// Send warning of error to administrator
@@ -230,9 +230,9 @@ $logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
if (!empty($conf->global->$paramlogo)) {
- $logosmall = $conf->global->$paramlogo;
+ $logosmall = getDolGlobalString($paramlogo);
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
- $logosmall = $conf->global->ONLINE_PAYMENT_LOGO;
+ $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
}
//print ''."\n";
// Define urllogo
diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php
index 1a548dd382f..81544107d0d 100644
--- a/htdocs/public/payment/paymentok.php
+++ b/htdocs/public/payment/paymentok.php
@@ -70,19 +70,19 @@ $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox",
if (isModEnabled('paypal')) {
$PAYPAL_API_USER = "";
if (getDolGlobalString('PAYPAL_API_USER')) {
- $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER;
+ $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
}
$PAYPAL_API_PASSWORD = "";
if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
- $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD;
+ $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
}
$PAYPAL_API_SIGNATURE = "";
if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
- $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE;
+ $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
}
$PAYPAL_API_SANDBOX = "";
if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
- $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX;
+ $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
}
$PAYPAL_API_OK = "";
if ($urlok) {
@@ -212,9 +212,9 @@ $logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
if (!empty($conf->global->$paramlogo)) {
- $logosmall = $conf->global->$paramlogo;
+ $logosmall = getDolGlobalString($paramlogo);
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
- $logosmall = $conf->global->ONLINE_PAYMENT_LOGO;
+ $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
}
//print ''."\n";
// Define urllogo
@@ -436,13 +436,13 @@ if ($ispaymentok) {
if ($result1 > 0 && $result2 > 0) {
$paymentTypeId = 0;
if ($paymentmethod == 'paybox') {
- $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'paypal') {
- $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'stripe') {
- $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS');
}
if (empty($paymentTypeId)) {
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
@@ -475,7 +475,7 @@ if ($ispaymentok) {
$amountexpected = empty($amountbytype[$typeid]) ? 0 : $amountbytype[$typeid];
// - If not found, take the default amount
if (empty($amountexpected) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) {
- $amountexpected = $conf->global->MEMBER_NEWFORM_AMOUNT;
+ $amountexpected = getDolGlobalString('MEMBER_NEWFORM_AMOUNT');
}
if ($amountexpected && $amountexpected != $FinalPaymentAmt) {
@@ -557,13 +557,13 @@ if ($ispaymentok) {
// Payment informations
$accountid = 0;
if ($paymentmethod == 'paybox') {
- $accountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS;
+ $accountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($paymentmethod == 'paypal') {
- $accountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS;
+ $accountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($paymentmethod == 'stripe') {
- $accountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS;
+ $accountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($accountid < 0) {
$error++;
@@ -743,7 +743,7 @@ if ($ispaymentok) {
$outputlangs->loadLangs(array("main", "members"));
// Get email content from template
$arraydefaultmessage = null;
- $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION;
+ $labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION');
if (!empty($labeltouse)) {
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
@@ -831,13 +831,13 @@ if ($ispaymentok) {
$paymentTypeId = 0;
if ($paymentmethod === 'paybox') {
- $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod === 'paypal') {
- $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod === 'stripe') {
- $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS');
}
if (empty($paymentTypeId)) {
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
@@ -896,11 +896,11 @@ if ($ispaymentok) {
if (!$error && isModEnabled("banque")) {
$bankaccountid = 0;
if ($paymentmethod == 'paybox') {
- $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'paypal') {
- $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'stripe') {
- $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($bankaccountid > 0) {
@@ -946,13 +946,13 @@ if ($ispaymentok) {
$paymentTypeId = 0;
if ($paymentmethod == 'paybox') {
- $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'paypal') {
- $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'stripe') {
- $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS');
}
if (empty($paymentTypeId)) {
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
@@ -1013,11 +1013,11 @@ if ($ispaymentok) {
if (!$error && isModEnabled("banque")) {
$bankaccountid = 0;
if ($paymentmethod == 'paybox') {
- $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'paypal') {
- $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'stripe') {
- $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($bankaccountid > 0) {
@@ -1069,13 +1069,13 @@ if ($ispaymentok) {
if ($result) {
$paymentTypeId = 0;
if ($paymentmethod == 'paybox') {
- $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'paypal') {
- $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'stripe') {
- $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS');
}
if (empty($paymentTypeId)) {
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
@@ -1139,11 +1139,11 @@ if ($ispaymentok) {
if (!$error && isModEnabled("banque")) {
$bankaccountid = 0;
if ($paymentmethod == 'paybox') {
- $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'paypal') {
- $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'stripe') {
- $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($bankaccountid > 0) {
@@ -1190,13 +1190,13 @@ if ($ispaymentok) {
if ($result) {
$paymentTypeId = 0;
if ($paymentmethod == 'paybox') {
- $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'paypal') {
- $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'stripe') {
- $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS');
}
if (empty($paymentTypeId)) {
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
@@ -1258,11 +1258,11 @@ if ($ispaymentok) {
if (!$error && isModEnabled("banque")) {
$bankaccountid = 0;
if ($paymentmethod == 'paybox') {
- $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'paypal') {
- $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'stripe') {
- $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($bankaccountid > 0) {
@@ -1328,7 +1328,7 @@ if ($ispaymentok) {
// Get email content from template
$arraydefaultmessage = null;
- $idoftemplatetouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT; // Email to send for Event organization registration
+ $idoftemplatetouse = getDolGlobalString('EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'); // Email to send for Event organization registration
if (!empty($idoftemplatetouse)) {
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $idoftemplatetouse, 1, '');
@@ -1409,13 +1409,13 @@ if ($ispaymentok) {
$paymentTypeId = 0;
if ($paymentmethod == 'paybox') {
- $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'paypal') {
- $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'stripe') {
- $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS');
}
if (empty($paymentTypeId)) {
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
@@ -1477,11 +1477,11 @@ if ($ispaymentok) {
if (!$error && isModEnabled("banque")) {
$bankaccountid = 0;
if ($paymentmethod == 'paybox') {
- $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'paypal') {
- $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'stripe') {
- $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($bankaccountid > 0) {
@@ -1544,7 +1544,7 @@ if ($ispaymentok) {
// Get email content from template
$arraydefaultmessage = null;
- $idoftemplatetouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH; // Email sent after registration for a Booth
+ $idoftemplatetouse = getDolGlobalString('EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH'); // Email sent after registration for a Booth
if (!empty($idoftemplatetouse)) {
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $idoftemplatetouse, 1, '');
@@ -1565,7 +1565,7 @@ if ($ispaymentok) {
$texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
$sendto = $thirdparty->email;
- $from = $conf->global->MAILING_EMAIL_FROM;
+ $from = getDolGlobalString('MAILING_EMAIL_FROM');
$urlback = $_SERVER["REQUEST_URI"];
$ishtml = dol_textishtml($texttosend); // May contain urls
@@ -1607,13 +1607,13 @@ if ($ispaymentok) {
$paymentTypeId = 0;
if ($paymentmethod == 'paybox') {
- $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'paypal') {
- $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS');
}
if ($paymentmethod == 'stripe') {
- $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
+ $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS');
}
if (empty($paymentTypeId)) {
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
@@ -1677,11 +1677,11 @@ if ($ispaymentok) {
if (!$error && isModEnabled("banque")) {
$bankaccountid = 0;
if ($paymentmethod == 'paybox') {
- $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'paypal') {
- $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS');
} elseif ($paymentmethod == 'stripe') {
- $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS;
+ $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');
}
if ($bankaccountid > 0) {
@@ -1779,7 +1779,7 @@ if ($ispaymentok) {
$sendemail = '';
if (getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL')) {
- $sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL;
+ $sendemail = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL');
}
$tmptag = dolExplodeIntoArray($fulltag, '.', '=');
@@ -1903,15 +1903,15 @@ if ($ispaymentok) {
$sendemail = '';
if (getDolGlobalString('PAYMENTONLINE_SENDEMAIL')) {
- $sendemail = $conf->global->PAYMENTONLINE_SENDEMAIL;
+ $sendemail = getDolGlobalString('PAYMENTONLINE_SENDEMAIL');
}
// TODO Remove local option to keep only the generic one ?
if ($paymentmethod == 'paypal' && getDolGlobalString('PAYPAL_PAYONLINE_SENDEMAIL')) {
- $sendemail = $conf->global->PAYPAL_PAYONLINE_SENDEMAIL;
+ $sendemail = getDolGlobalString('PAYPAL_PAYONLINE_SENDEMAIL');
} elseif ($paymentmethod == 'paybox' && getDolGlobalString('PAYBOX_PAYONLINE_SENDEMAIL')) {
- $sendemail = $conf->global->PAYBOX_PAYONLINE_SENDEMAIL;
+ $sendemail = getDolGlobalString('PAYBOX_PAYONLINE_SENDEMAIL');
} elseif ($paymentmethod == 'stripe' && getDolGlobalString('STRIPE_PAYONLINE_SENDEMAIL')) {
- $sendemail = $conf->global->STRIPE_PAYONLINE_SENDEMAIL;
+ $sendemail = getDolGlobalString('STRIPE_PAYONLINE_SENDEMAIL');
}
// Send warning of error to administrator
diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php
index 9b35ac796ac..0555850583e 100644
--- a/htdocs/public/project/new.php
+++ b/htdocs/public/project/new.php
@@ -361,7 +361,7 @@ if (empty($reshook) && $action == 'add') {
$outputlangs->loadLangs(array("main", "members", "projects"));
// Get email content from template
$arraydefaultmessage = null;
- $labeltouse = $conf->global->PROJECT_EMAIL_TEMPLATE_AUTOLEAD;
+ $labeltouse = getDolGlobalString('PROJECT_EMAIL_TEMPLATE_AUTOLEAD');
if (!empty($labeltouse)) {
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'project', $user, $outputlangs, 0, 1, $labeltouse);
@@ -396,7 +396,7 @@ if (empty($reshook) && $action == 'add') {
if (!empty($backtopage)) {
$urlback = $backtopage;
} elseif (getDolGlobalString('PROJECT_URL_REDIRECT_LEAD')) {
- $urlback = $conf->global->PROJECT_URL_REDIRECT_LEAD;
+ $urlback = getDolGlobalString('PROJECT_URL_REDIRECT_LEAD');
// TODO Make replacement of __AMOUNT__, etc...
} else {
$urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken();
@@ -463,7 +463,7 @@ print '
';
print '
';
if (getDolGlobalString('PROJECT_NEWFORM_TEXT')) {
- print $langs->trans($conf->global->PROJECT_NEWFORM_TEXT)."
\n";
+ print $langs->trans(getDolGlobalString('PROJECT_NEWFORM_TEXT'))."
\n";
} else {
print $langs->trans("FormForNewLeadDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
\n";
}
diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php
index 20be7cf9e5a..bac61fbda67 100644
--- a/htdocs/public/project/suggestbooth.php
+++ b/htdocs/public/project/suggestbooth.php
@@ -316,7 +316,7 @@ if (empty($reshook) && $action == 'add') {
// Adding supplier tag and tag from setup to thirdparty
$category = new Categorie($db);
- $resultcategory = $category->fetch($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH);
+ $resultcategory = $category->fetch(getDolGlobalString('EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'));
if ($resultcategory<=0) {
$error++;
@@ -416,7 +416,7 @@ if (empty($reshook) && $action == 'add') {
// If this is a paying booth, we have to redirect to payment page and create an invoice
if (!empty((float) $project->price_booth)) {
$productforinvoicerow = new Product($db);
- $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_BOOTH_LOCATION);
+ $resultprod = $productforinvoicerow->fetch(getDolGlobalString('SERVICE_BOOTH_LOCATION'));
if ($resultprod < 0) {
$error++;
$errmsg .= $productforinvoicerow->error;
@@ -516,7 +516,7 @@ if (empty($reshook) && $action == 'add') {
$texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
$sendto = $thirdparty->email;
- $from = $conf->global->MAILING_EMAIL_FROM;
+ $from = getDolGlobalString('MAILING_EMAIL_FROM');
$urlback = $_SERVER["REQUEST_URI"];
$trackid = 'proj'.$project->id;
diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php
index 072459df428..da8de48cde6 100644
--- a/htdocs/public/project/suggestconference.php
+++ b/htdocs/public/project/suggestconference.php
@@ -316,7 +316,7 @@ if (empty($reshook) && $action == 'add') {
// Adding supplier tag and tag from setup to thirdparty
$category = new Categorie($db);
- $resultcategory = $category->fetch($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_CONF);
+ $resultcategory = $category->fetch(getDolGlobalString('EVENTORGANIZATION_CATEG_THIRDPARTY_CONF'));
if ($resultcategory<=0) {
$error++;
@@ -447,7 +447,7 @@ if (empty($reshook) && $action == 'add') {
$texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
$sendto = $thirdparty->email;
- $from = $conf->global->MAILING_EMAIL_FROM;
+ $from = getDolGlobalString('MAILING_EMAIL_FROM');
$urlback = $_SERVER["REQUEST_URI"];
$trackid = 'proj'.$project->id;
diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php
index caf386f6eff..e754ea62539 100644
--- a/htdocs/public/project/viewandvote.php
+++ b/htdocs/public/project/viewandvote.php
@@ -235,9 +235,9 @@ $logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix;
if (!empty($conf->global->$paramlogo)) {
- $logosmall = $conf->global->$paramlogo;
+ $logosmall = getDolGlobalString($paramlogo);
} elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) {
- $logosmall = $conf->global->ONLINE_PAYMENT_LOGO;
+ $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO');
}
//print ''."\n";
// Define urllogo
diff --git a/htdocs/public/recruitment/index.php b/htdocs/public/recruitment/index.php
index 2661fb89a7e..d64a32492b4 100644
--- a/htdocs/public/recruitment/index.php
+++ b/htdocs/public/recruitment/index.php
@@ -136,9 +136,9 @@ $logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
if (!empty($conf->global->$paramlogo)) {
- $logosmall = $conf->global->$paramlogo;
+ $logosmall = getDolGlobalString($paramlogo);
} elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) {
- $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO_;
+ $logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO_');
}
//print ''."\n";
// Define urllogo
diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php
index eef609ff9b4..60b5191d468 100644
--- a/htdocs/public/recruitment/view.php
+++ b/htdocs/public/recruitment/view.php
@@ -199,9 +199,9 @@ $logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
if (!empty($conf->global->$paramlogo)) {
- $logosmall = $conf->global->$paramlogo;
+ $logosmall = getDolGlobalString($paramlogo);
} elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) {
- $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO;
+ $logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO');
}
//print ''."\n";
// Define urllogo
diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php
index bee8b99ab0d..e7fc6cc57ff 100644
--- a/htdocs/public/stripe/ipn.php
+++ b/htdocs/public/stripe/ipn.php
@@ -59,21 +59,21 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
// You can find your endpoint's secret in your webhook settings
if (isset($_GET['connect'])) {
if (isset($_GET['test'])) {
- $endpoint_secret = $conf->global->STRIPE_TEST_WEBHOOK_CONNECT_KEY;
+ $endpoint_secret = getDolGlobalString('STRIPE_TEST_WEBHOOK_CONNECT_KEY');
$service = 'StripeTest';
$servicestatus = 0;
} else {
- $endpoint_secret = $conf->global->STRIPE_LIVE_WEBHOOK_CONNECT_KEY;
+ $endpoint_secret = getDolGlobalString('STRIPE_LIVE_WEBHOOK_CONNECT_KEY');
$service = 'StripeLive';
$servicestatus = 1;
}
} else {
if (isset($_GET['test'])) {
- $endpoint_secret = $conf->global->STRIPE_TEST_WEBHOOK_KEY;
+ $endpoint_secret = getDolGlobalString('STRIPE_TEST_WEBHOOK_KEY');
$service = 'StripeTest';
$servicestatus = 0;
} else {
- $endpoint_secret = $conf->global->STRIPE_LIVE_WEBHOOK_KEY;
+ $endpoint_secret = getDolGlobalString('STRIPE_LIVE_WEBHOOK_KEY');
$service = 'StripeLive';
$servicestatus = 1;
}
@@ -90,7 +90,7 @@ if (empty($endpoint_secret)) {
if (getDolGlobalString('STRIPE_USER_ACCOUNT_FOR_ACTIONS')) {
// We set the user to use for all ipn actions in Dolibarr
$user = new User($db);
- $user->fetch($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS);
+ $user->fetch(getDolGlobalString('STRIPE_USER_ACCOUNT_FOR_ACTIONS'));
$user->getrights();
} else {
httponly_accessforbidden('Error: Setup of module Stripe not complete for mode '.dol_escape_htmltag($service).'. The STRIPE_USER_ACCOUNT_FOR_ACTIONS is not defined.', 400, 1);
@@ -162,9 +162,9 @@ if (isModEnabled('multicompany') && !empty($conf->stripeconnect->enabled) && is_
$stripe = new Stripe($db);
// Subject
-$societeName = $conf->global->MAIN_INFO_SOCIETE_NOM;
+$societeName = getDolGlobalString('MAIN_INFO_SOCIETE_NOM');
if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
- $societeName = $conf->global->MAIN_APPLICATION_TITLE;
+ $societeName = getDolGlobalString('MAIN_APPLICATION_TITLE');
}
top_httphead();
@@ -227,10 +227,10 @@ if ($event->type == 'payout.created') {
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$accountfrom = new Account($db);
- $accountfrom->fetch($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS);
+ $accountfrom->fetch(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'));
$accountto = new Account($db);
- $accountto->fetch($conf->global->STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS);
+ $accountto->fetch(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS'));
if (($accountto->id != $accountfrom->id) && empty($error)) {
$bank_line_id_from = 0;
diff --git a/htdocs/public/test/test_badges.php b/htdocs/public/test/test_badges.php
index d3ed6476f95..5d5c4c63090 100644
--- a/htdocs/public/test/test_badges.php
+++ b/htdocs/public/test/test_badges.php
@@ -297,7 +297,7 @@ header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain
Use status helper function
Using the dolGetStatus function provide in core/lib/functions.lib.php. This function is recommended for code uniformisation and easy maintain
global->MAIN_STATUS_USES_CSS;
+ $saveGlobalConf = getDolGlobalString('MAIN_STATUS_USES_CSS');
$conf->global->MAIN_STATUS_USES_CSS = 1;
?>
Using hidden global conf MAIN_STATUS_USES_CSS=1
diff --git a/htdocs/public/website/index.php b/htdocs/public/website/index.php
index 83e972c2244..8c3c3fadd57 100644
--- a/htdocs/public/website/index.php
+++ b/htdocs/public/website/index.php
@@ -148,7 +148,7 @@ if (empty($pageid)) {
$appli = constant('DOL_APPLICATION_TITLE');
if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
- $appli = $conf->global->MAIN_APPLICATION_TITLE;
+ $appli = getDolGlobalString('MAIN_APPLICATION_TITLE');
}
diff --git a/htdocs/public/website/javascript.js.php b/htdocs/public/website/javascript.js.php
index 8ded5364c29..7da5d3621d9 100644
--- a/htdocs/public/website/javascript.js.php
+++ b/htdocs/public/website/javascript.js.php
@@ -82,7 +82,7 @@ $type = '';
$appli = constant('DOL_APPLICATION_TITLE');
if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
- $appli = $conf->global->MAIN_APPLICATION_TITLE;
+ $appli = getDolGlobalString('MAIN_APPLICATION_TITLE');
}
//print 'Directory with '.$appli.' websites.
';
diff --git a/htdocs/public/website/styles.css.php b/htdocs/public/website/styles.css.php
index 31d74c08649..db63b396295 100644
--- a/htdocs/public/website/styles.css.php
+++ b/htdocs/public/website/styles.css.php
@@ -82,7 +82,7 @@ $type = '';
$appli = constant('DOL_APPLICATION_TITLE');
if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
- $appli = $conf->global->MAIN_APPLICATION_TITLE;
+ $appli = getDolGlobalString('MAIN_APPLICATION_TITLE');
}
//print 'Directory with '.$appli.' websites.
';
diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php
index 5a63a356703..1b25fa41e63 100644
--- a/htdocs/reception/class/reception.class.php
+++ b/htdocs/reception/class/reception.class.php
@@ -170,7 +170,7 @@ class Reception extends CommonObject
$mybool = false;
$file = getDolGlobalString('RECEPTION_ADDON_NUMBER') . ".php";
- $classname = $conf->global->RECEPTION_ADDON_NUMBER;
+ $classname = getDolGlobalString('RECEPTION_ADDON_NUMBER');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -2051,7 +2051,7 @@ class Reception extends CommonObject
if ($this->model_pdf) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('RECEPTION_ADDON_PDF')) {
- $modele = $conf->global->RECEPTION_ADDON_PDF;
+ $modele = getDolGlobalString('RECEPTION_ADDON_PDF');
}
}
diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php
index 0fc4e0d6bf2..ec80627738a 100644
--- a/htdocs/recruitment/class/recruitmentcandidature.class.php
+++ b/htdocs/recruitment/class/recruitmentcandidature.class.php
@@ -954,7 +954,7 @@ class RecruitmentCandidature extends CommonObject
$mybool = false;
$file = getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON') . ".php";
- $classname = $conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON;
+ $classname = getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -1013,7 +1013,7 @@ class RecruitmentCandidature extends CommonObject
if (!dol_strlen($modele)) {
if (getDolGlobalString('RECRUITMENTCANDIDATURE_ADDON_PDF')) {
- $modele = $conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF;
+ $modele = getDolGlobalString('RECRUITMENTCANDIDATURE_ADDON_PDF');
} else {
$modele = ''; // No default value. For job application, we allow to disable all PDF generation
}
diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php
index 77454f09ce3..c5e85e3d41c 100644
--- a/htdocs/recruitment/class/recruitmentjobposition.class.php
+++ b/htdocs/recruitment/class/recruitmentjobposition.class.php
@@ -1011,7 +1011,7 @@ class RecruitmentJobPosition extends CommonObject
$mybool = false;
$file = getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON') . ".php";
- $classname = $conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON;
+ $classname = getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -1070,7 +1070,7 @@ class RecruitmentJobPosition extends CommonObject
if (!dol_strlen($modele)) {
if (getDolGlobalString('RECRUITMENTJOBPOSITION_ADDON_PDF')) {
- $modele = $conf->global->RECRUITMENTJOBPOSITION_ADDON_PDF;
+ $modele = getDolGlobalString('RECRUITMENTJOBPOSITION_ADDON_PDF');
} else {
$modele = ''; // No default value. For job position, we allow to disable all PDF generation
}
diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php
index 67b23014aaa..6a7030d5882 100644
--- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php
+++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php
@@ -215,7 +215,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
$hidetop = 0;
if (getDolGlobalString('MAIN_PDF_DISABLE_COL_HEAD_TITLE')) {
- $hidetop = $conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE;
+ $hidetop = getDolGlobalString('MAIN_PDF_DISABLE_COL_HEAD_TITLE');
}
// Loop on each lines to detect if there is at least one image to show
diff --git a/htdocs/recruitment/index.php b/htdocs/recruitment/index.php
index 62513824e7c..237eb45bb1e 100644
--- a/htdocs/recruitment/index.php
+++ b/htdocs/recruitment/index.php
@@ -329,7 +329,7 @@ END MODULEBUILDER DRAFT MYOBJECT */
print '
';
-$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$NBMAX = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT');
$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
// Last modified job position
diff --git a/htdocs/recruitment/recruitmentcandidature_agenda.php b/htdocs/recruitment/recruitmentcandidature_agenda.php
index f843675a722..a42fd797d37 100644
--- a/htdocs/recruitment/recruitmentcandidature_agenda.php
+++ b/htdocs/recruitment/recruitmentcandidature_agenda.php
@@ -128,7 +128,7 @@ $form = new Form($db);
if ($object->id > 0) {
$title = $object->ref." - ".$langs->trans('Agenda');
- //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
+ //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
$help_url = 'Module_Agenda_En|DE:Modul_Terminplanung';
llxHeader('', $title, $help_url);
diff --git a/htdocs/recruitment/recruitmentjobposition_agenda.php b/htdocs/recruitment/recruitmentjobposition_agenda.php
index f831712418b..9a9638bf10d 100644
--- a/htdocs/recruitment/recruitmentjobposition_agenda.php
+++ b/htdocs/recruitment/recruitmentjobposition_agenda.php
@@ -127,7 +127,7 @@ $form = new Form($db);
if ($object->id > 0) {
$title = $object->ref." - ".$langs->trans('Agenda');
- //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
+ //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
$help_url = '';
llxHeader('', $title, $help_url);
diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index b129fde860e..ac7d894b36b 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -192,7 +192,7 @@ abstract class ActionsCardCommon
$this->tpl['supplier_enabled'] = 1;
// Load object modCodeFournisseur
- $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON');
if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') {
$module = substr($module, 0, dol_strlen($module) - 4);
}
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index cb3ca2527ac..b2e1d90266d 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -941,7 +941,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
// Prospect / Customer
if (GETPOST("type", 'aZ') == 'c') {
if (getDolGlobalString('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
- $object->client = $conf->global->THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT;
+ $object->client = getDolGlobalString('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT');
} else {
$object->client = 3;
}
@@ -1816,7 +1816,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
if ($modCodeClient->code_auto) {
$prefixCustomerIsUsed = $modCodeClient->verif_prefixIsUsed();
}
- $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON');
if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') {
$module = substr($module, 0, dol_strlen($module) - 4);
}
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index ebe825b7c0b..a5dc591b4e4 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -870,9 +870,9 @@ class Societe extends CommonObject
$this->status = 1;
if (getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST')) {
- $this->fields['address']['showoncombobox'] = $conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST;
- $this->fields['zip']['showoncombobox'] = $conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST;
- $this->fields['town']['showoncombobox'] = $conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST;
+ $this->fields['address']['showoncombobox'] = getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST');
+ $this->fields['zip']['showoncombobox'] = getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST');
+ $this->fields['town']['showoncombobox'] = getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST');
//$this->fields['fk_pays']['showoncombobox'] = $conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST;
}
}
@@ -3354,7 +3354,7 @@ class Societe extends CommonObject
// phpcs:enable
global $conf;
if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) {
- $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON');
$dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
foreach ($dirsociete as $dirroot) {
@@ -3386,7 +3386,7 @@ class Societe extends CommonObject
// phpcs:enable
global $conf;
if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) {
- $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON');
$dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
foreach ($dirsociete as $dirroot) {
@@ -3415,7 +3415,7 @@ class Societe extends CommonObject
// phpcs:enable
global $conf;
if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) {
- $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON');
$dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
foreach ($dirsociete as $dirroot) {
@@ -3455,7 +3455,7 @@ class Societe extends CommonObject
// phpcs:enable
global $conf;
if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) {
- $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON');
$dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
foreach ($dirsociete as $dirroot) {
@@ -3501,7 +3501,7 @@ class Societe extends CommonObject
// phpcs:enable
global $conf;
if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) {
- $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON');
$dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
foreach ($dirsociete as $dirroot) {
@@ -3542,7 +3542,7 @@ class Societe extends CommonObject
// phpcs:enable
global $conf;
if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) {
- $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON');
$dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
foreach ($dirsociete as $dirroot) {
@@ -3581,7 +3581,7 @@ class Societe extends CommonObject
global $conf;
if (getDolGlobalString('SOCIETE_CODECOMPTA_ADDON')) {
- $module=$conf->global->SOCIETE_CODECOMPTA_ADDON;
+ $module=getDolGlobalString('SOCIETE_CODECOMPTA_ADDON');
$res = false;
$dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
foreach ($dirsociete as $dirroot) {
@@ -4533,7 +4533,7 @@ class Societe extends CommonObject
$this->logo_squarred_mini = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI');
// Define if company use vat or not
- $this->tva_assuj = $conf->global->FACTURE_TVAOPTION;
+ $this->tva_assuj = getDolGlobalString('FACTURE_TVAOPTION');
// Define if company use local taxes
$this->localtax1_assuj = ((isset($conf->global->FACTURE_LOCAL_TAX1_OPTION) && (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == '1' || getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')) ? 1 : 0);
@@ -5030,7 +5030,7 @@ class Societe extends CommonObject
// Positionne le modele sur le nom du modele a utiliser
if (!dol_strlen($modele)) {
if (getDolGlobalString('COMPANY_ADDON_PDF')) {
- $modele = $conf->global->COMPANY_ADDON_PDF;
+ $modele = getDolGlobalString('COMPANY_ADDON_PDF');
} else {
print $langs->trans("Error")." ".$langs->trans("Error_COMPANY_ADDON_PDF_NotDefined");
return 0;
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index 836c8e83294..03ebec4b890 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -58,10 +58,10 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
if (getDolGlobalString('MAIN_DOC_SORT_FIELD')) {
- $sortfield = $conf->global->MAIN_DOC_SORT_FIELD;
+ $sortfield = getDolGlobalString('MAIN_DOC_SORT_FIELD');
}
if (getDolGlobalString('MAIN_DOC_SORT_ORDER')) {
- $sortorder = $conf->global->MAIN_DOC_SORT_ORDER;
+ $sortorder = getDolGlobalString('MAIN_DOC_SORT_ORDER');
}
if (!$sortorder) {
diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php
index cd0573b6457..854be79efc2 100644
--- a/htdocs/societe/index.php
+++ b/htdocs/societe/index.php
@@ -215,7 +215,7 @@ if (isModEnabled('categorie') && getDolGlobalString('CATEGORY_GRAPHSTATS_ON_THIR
$sql .= " FROM ".MAIN_DB_PREFIX."categorie_societe as cs";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
$sql .= " WHERE c.type = 2";
- if (!is_numeric($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) {
+ if (!is_numeric(getDolGlobalString('CATEGORY_GRAPHSTATS_ON_THIRDPARTIES'))) {
$sql .= " AND c.label like '".$db->escape($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)."'";
}
$sql .= " AND c.entity IN (".getEntity('category').")";
diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php
index ffa6f523208..b3cc52d6ce6 100644
--- a/htdocs/societe/paymentmodes.php
+++ b/htdocs/societe/paymentmodes.php
@@ -1681,7 +1681,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
$modelselected = $arraykeys[0];
}
if (getDolGlobalString('BANKADDON_PDF')) {
- $modelselected = $conf->global->BANKADDON_PDF;
+ $modelselected = getDolGlobalString('BANKADDON_PDF');
}
$out .= $form->selectarray('modelrib'.$rib->id, $modellist, $modelselected, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth125');
diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php
index e411764ec3f..f9635e37adb 100644
--- a/htdocs/societe/price.php
+++ b/htdocs/societe/price.php
@@ -343,7 +343,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
// Price
print '
';
$text = $langs->trans('SellingPrice');
- print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
+ print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
print ' ';
print ' ';
print ' ';
@@ -351,7 +351,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
// Price minimum
print '
';
$text = $langs->trans('MinPrice');
- print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
+ print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
print ' ';
print '';
@@ -412,7 +412,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
// Price
print '
';
$text = $langs->trans('SellingPrice');
- print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
+ print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
print ' ';
if ($prodcustprice->price_base_type == 'TTC') {
print ' ';
@@ -424,7 +424,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
// Price minimum
print ' ';
$text = $langs->trans('MinPrice');
- print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
+ print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
print ' ';
if ($prodcustprice->price_base_type == 'TTC') {
print ' ';
diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php
index 00e89220bc3..7757f24be8b 100644
--- a/htdocs/stripe/class/stripe.class.php
+++ b/htdocs/stripe/class/stripe.class.php
@@ -1275,9 +1275,9 @@ class Stripe extends CommonObject
// With Stripe Connect
$fee = $amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE;
if ($fee >= $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL && $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL > $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
- $fee = $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL;
+ $fee = getDolGlobalString('STRIPE_APPLICATION_FEE_MAXIMAL');
} elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
- $fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL;
+ $fee = getDolGlobalString('STRIPE_APPLICATION_FEE_MINIMAL');
}
if (!in_array($currency, $arrayzerounitcurrency)) {
diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php
index ae3818239c4..ffe975640e2 100644
--- a/htdocs/supplier_proposal/class/supplier_proposal.class.php
+++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php
@@ -1149,7 +1149,7 @@ class SupplierProposal extends CommonObject
// Set ref
require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php';
- $obj = $conf->global->SUPPLIER_PROPOSAL_ADDON;
+ $obj = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON');
$modSupplierProposal = new $obj();
$this->ref = $modSupplierProposal->getNextValue($objsoc, $this);
@@ -2419,7 +2419,7 @@ class SupplierProposal extends CommonObject
$mybool = false;
$file = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') . ".php";
- $classname = $conf->global->SUPPLIER_PROPOSAL_ADDON;
+ $classname = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -2704,7 +2704,7 @@ class SupplierProposal extends CommonObject
if ($this->model_pdf) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF')) {
- $modele = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF;
+ $modele = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF');
}
}
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index a14c4d5ea2e..2e507d8dce2 100644
--- a/htdocs/takepos/index.php
+++ b/htdocs/takepos/index.php
@@ -1250,7 +1250,7 @@ if (isset($_SESSION["takeposterminal"]) && $_SESSION["takeposterminal"]) {
if (count($maincategories) == 0) {
if (getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID') > 0) {
$tmpcategory = new Categorie($db);
- $tmpcategory->fetch($conf->global->TAKEPOS_ROOT_CATEGORY_ID);
+ $tmpcategory->fetch(getDolGlobalString('TAKEPOS_ROOT_CATEGORY_ID'));
setEventMessages($langs->trans("TakeposNeedsAtLeastOnSubCategoryIntoParentCategory", $tmpcategory->label), null, 'errors');
} else {
setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors');
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index f5731f4c563..68016210f6a 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -236,7 +236,7 @@ if (empty($reshook)) {
dol_syslog('Sale without lines');
dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1);
} elseif (isModEnabled('stock') && getDolGlobalString($constantforkey) != "1" && !isModEnabled('productbatch')) {
- $savconst = $conf->global->STOCK_CALCULATE_ON_BILL;
+ $savconst = getDolGlobalString('STOCK_CALCULATE_ON_BILL');
if (isModEnabled('productbatch') && !getDolGlobalInt('CASHDESK_FORCE_DECREASE_STOCK')) {
$conf->global->STOCK_CALCULATE_ON_BILL = 0; // To not change the stock (not yet compatible with batch management)
@@ -459,7 +459,7 @@ if (empty($reshook)) {
$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
if (isModEnabled('stock') && getDolGlobalString($constantforkey) != "1") {
- $savconst = $conf->global->STOCK_CALCULATE_ON_BILL;
+ $savconst = getDolGlobalString('STOCK_CALCULATE_ON_BILL');
$conf->global->STOCK_CALCULATE_ON_BILL = 1;
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
dol_syslog("Validate invoice with stock change into warehouse defined into constant ".$constantforkey." = ".getDolGlobalString($constantforkey));
diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php
index dfc606475fa..bfccf8ef34e 100644
--- a/htdocs/takepos/pay.php
+++ b/htdocs/takepos/pay.php
@@ -124,7 +124,7 @@ function fetchConnectionToken() {
global->STRIPE_LOCATION);
+ $urlconnexiontoken .= '&location='.urlencode(getDolGlobalString('STRIPE_LOCATION'));
}
if (!empty($stripeacc)) {
$urlconnexiontoken .= '&stripeacc='.urlencode($stripeacc);
@@ -564,7 +564,7 @@ $action_buttons = array(
"class" => "poscolordelete"
),
);
-$numpad = $conf->global->TAKEPOS_NUMPAD;
+$numpad = getDolGlobalString('TAKEPOS_NUMPAD');
if (isModEnabled('stripe') && isset($keyforstripeterminalbank) && getDolGlobalString('STRIPE_CARD_PRESENT')) {
print '';
dol_htmloutput_mesg($langs->trans('ConnectingToStripeTerminal', 'Stripe'), '', 'warning', 1);
diff --git a/htdocs/theme/eldy/manifest.json.php b/htdocs/theme/eldy/manifest.json.php
index 2cae631d25b..0e91146fe61 100644
--- a/htdocs/theme/eldy/manifest.json.php
+++ b/htdocs/theme/eldy/manifest.json.php
@@ -88,7 +88,7 @@ $manifest->id = constant('DOL_MAIN_URL_ROOT');
if (getDolGlobalString('MAIN_MANIFEST_APPLI_LOGO_URL')) {
$icon = new stdClass();
- $icon->src = $conf->global->MAIN_MANIFEST_APPLI_LOGO_URL;
+ $icon->src = getDolGlobalString('MAIN_MANIFEST_APPLI_LOGO_URL');
if ($conf->global->MAIN_MANIFEST_APPLI_LOGO_URL_SIZE) {
$icon->sizes = getDolGlobalString('MAIN_MANIFEST_APPLI_LOGO_URL_SIZE') . "x" . getDolGlobalString('MAIN_MANIFEST_APPLI_LOGO_URL_SIZE');
} else {
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 01b946752bc..f6f9f68ee1b 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -103,7 +103,7 @@ $path = ''; // This value may be used in future for external module to overwrite
$theme = 'eldy'; // Value of theme
if (getDolGlobalString('MAIN_OVERWRITE_THEME_RES')) {
$path = '/' . getDolGlobalString('MAIN_OVERWRITE_THEME_RES');
- $theme = $conf->global->MAIN_OVERWRITE_THEME_RES;
+ $theme = getDolGlobalString('MAIN_OVERWRITE_THEME_RES');
}
// Define image path files and other constants
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 19dec5d2392..a4249781a0d 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -105,7 +105,7 @@ $path = ''; // This value may be used in future for external module to overwrite
$theme = 'md'; // Value of theme
if (getDolGlobalString('MAIN_OVERWRITE_THEME_RES')) {
$path = '/' . getDolGlobalString('MAIN_OVERWRITE_THEME_RES');
- $theme = $conf->global->MAIN_OVERWRITE_THEME_RES;
+ $theme = getDolGlobalString('MAIN_OVERWRITE_THEME_RES');
}
// Define image path files and other constants
diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php
index 3a5e333cbb1..fd6cc58281e 100644
--- a/htdocs/ticket/class/actions_ticket.class.php
+++ b/htdocs/ticket/class/actions_ticket.class.php
@@ -215,7 +215,7 @@ class ActionsTicket extends CommonHookActions
$msg = GETPOSTISSET('message_initial') ? GETPOST('message_initial', 'restricthtml') : $object->message;
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$uselocalbrowser = true;
- $ckeditorenabledforticket = $conf->global->FCKEDITOR_ENABLE_TICKET;
+ $ckeditorenabledforticket = getDolGlobalString('FCKEDITOR_ENABLE_TICKET');
$doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $ckeditorenabledforticket, ROWS_9, '95%');
$doleditor->Create();
} else {
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index f3da2f3e84e..9b6bcd90be8 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -2632,9 +2632,9 @@ class Ticket extends CommonObject
if (empty($sendto)) {
if (getDolGlobalString('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL')) {
- $sendto[getDolGlobalString('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL')] = $conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL;
+ $sendto[getDolGlobalString('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL')] = getDolGlobalString('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL');
} elseif (getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')) {
- $sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
+ $sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO');
}
}
@@ -2642,7 +2642,7 @@ class Ticket extends CommonObject
if (getDolGlobalString('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS') &&
getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO') && !array_key_exists($conf->global->TICKET_NOTIFICATION_EMAIL_TO, $sendto)
) {
- $sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
+ $sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO');
}
if (!empty($sendto)) {
diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php
index f474ee48121..31c24fbfd53 100644
--- a/htdocs/ticket/list.php
+++ b/htdocs/ticket/list.php
@@ -1156,10 +1156,10 @@ while ($i < $imaxinloop) {
$creation_date = $object->datec;
$hour_diff_creation = ($now - $creation_date) / 3600 ;
if ($hour_diff_creation > $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE) {
- print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE), 'warning', 'style="color: red;"', false, 0, 0, '', '');
+ print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', getDolGlobalString('TICKET_DELAY_BEFORE_FIRST_RESPONSE')), 'warning', 'style="color: red;"', false, 0, 0, '', '');
}
} elseif (getDolGlobalString('TICKET_DELAY_SINCE_LAST_RESPONSE') && $hour_diff > $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) {
- print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayFromLastResponseTooLong', $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE), 'warning');
+ print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayFromLastResponseTooLong', getDolGlobalString('TICKET_DELAY_SINCE_LAST_RESPONSE')), 'warning');
}
}
} else { // Example: key=fk_soc, obj->key=123 val=array('type'=>'integer', ...
diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php
index 4e424024bfb..730d2215306 100644
--- a/htdocs/user/agenda_extsites.php
+++ b/htdocs/user/agenda_extsites.php
@@ -45,7 +45,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'us
if (!getDolGlobalString('AGENDA_EXT_NB')) {
$conf->global->AGENDA_EXT_NB = 5;
}
-$MAXAGENDA = $conf->global->AGENDA_EXT_NB;
+$MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB');
// List of available colors
$colorlist = array('BECEDD', 'DDBECE', 'BFDDBE', 'F598B4', 'F68654', 'CBF654', 'A4A4A5');
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 65ae96cce90..a0f0fa1f3cd 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -596,7 +596,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
print '';
// Max number of elements in small lists
- $MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+ $MAXLIST = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT');
// Latest payments of salaries
if (isModEnabled('salaries') &&
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index a0eed471a0b..b53596be705 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -2503,7 +2503,7 @@ class User extends CommonObject
if (!$changelater) {
$url = $urlwithroot.'/';
if (getDolGlobalString('URL_REDIRECTION_AFTER_CHANGEPASSWORD')) {
- $url = $conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD;
+ $url = getDolGlobalString('URL_REDIRECTION_AFTER_CHANGEPASSWORD');
}
dol_syslog(get_class($this)."::send_password changelater is off, url=".$url);
@@ -3232,7 +3232,7 @@ class User extends CommonObject
if ($mode == 0) {
$dn = getDolGlobalString('LDAP_KEY_USERS') . "=".$info[getDolGlobalString('LDAP_KEY_USERS')]."," . getDolGlobalString('LDAP_USER_DN');
} elseif ($mode == 1) {
- $dn = $conf->global->LDAP_USER_DN;
+ $dn = getDolGlobalString('LDAP_USER_DN');
} elseif ($mode == 2) {
$dn = getDolGlobalString('LDAP_KEY_USERS') . "=".$info[getDolGlobalString('LDAP_KEY_USERS')];
}
@@ -3925,7 +3925,7 @@ class User extends CommonObject
// Positionne le modele sur le nom du modele a utiliser
if (!dol_strlen($modele)) {
if (getDolGlobalString('USER_ADDON_PDF')) {
- $modele = $conf->global->USER_ADDON_PDF;
+ $modele = getDolGlobalString('USER_ADDON_PDF');
} else {
$modele = 'bluesky';
}
diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php
index a96028a5993..2f984f8472a 100644
--- a/htdocs/user/class/usergroup.class.php
+++ b/htdocs/user/class/usergroup.class.php
@@ -898,7 +898,7 @@ class UserGroup extends CommonObject
$dn = getDolGlobalString('LDAP_KEY_GROUPS') . "=".$info[getDolGlobalString('LDAP_KEY_GROUPS')]."," . getDolGlobalString('LDAP_GROUP_DN');
}
if ($mode == 1) {
- $dn = $conf->global->LDAP_GROUP_DN;
+ $dn = getDolGlobalString('LDAP_GROUP_DN');
}
if ($mode == 2) {
$dn = getDolGlobalString('LDAP_KEY_GROUPS') . "=".$info[getDolGlobalString('LDAP_KEY_GROUPS')];
@@ -996,7 +996,7 @@ class UserGroup extends CommonObject
// Positionne le modele sur le nom du modele a utiliser
if (!dol_strlen($modele)) {
if (getDolGlobalString('USERGROUP_ADDON_PDF')) {
- $modele = $conf->global->USERGROUP_ADDON_PDF;
+ $modele = getDolGlobalString('USERGROUP_ADDON_PDF');
} else {
$modele = 'grass';
}
diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php
index fea12e1b372..4c3eaeea90e 100644
--- a/htdocs/user/clicktodial.php
+++ b/htdocs/user/clicktodial.php
@@ -159,7 +159,7 @@ if ($id > 0) {
print '
ClickToDial URL ';
print '';
if (getDolGlobalString('CLICKTODIAL_URL')) {
- $url = $conf->global->CLICKTODIAL_URL;
+ $url = getDolGlobalString('CLICKTODIAL_URL');
}
if (!empty($object->clicktodial_url)) {
$url = $object->clicktodial_url;
diff --git a/htdocs/user/list.php b/htdocs/user/list.php
index d57c37bfd67..f59b473c767 100644
--- a/htdocs/user/list.php
+++ b/htdocs/user/list.php
@@ -175,7 +175,7 @@ $searchCategoryUserOperator = 0;
if (GETPOSTISSET('formfilteraction')) {
$searchCategoryUserOperator = GETPOSTINT('search_category_user_operator');
} elseif (getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT')) {
- $searchCategoryUserOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT;
+ $searchCategoryUserOperator = getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT');
}
$searchCategoryUserList = GETPOST('search_category_user_list', 'array');
$catid = GETPOST('catid', 'int');
diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php
index 4713d4e9e97..75f2fa6f069 100644
--- a/htdocs/user/logout.php
+++ b/htdocs/user/logout.php
@@ -80,7 +80,7 @@ if ($urlfrom) {
$url = DOL_URL_ROOT.$urlfrom;
}
if (getDolGlobalString('MAIN_LOGOUT_GOTO_URL')) {
- $url = $conf->global->MAIN_LOGOUT_GOTO_URL;
+ $url = getDolGlobalString('MAIN_LOGOUT_GOTO_URL');
}
if (GETPOST('dol_hide_topmenu')) {
diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php
index ab81effa2e4..2758204547f 100644
--- a/htdocs/user/passwordforgotten.php
+++ b/htdocs/user/passwordforgotten.php
@@ -182,7 +182,7 @@ $dol_url_root = DOL_URL_ROOT;
// Title
$title = 'Dolibarr '.DOL_VERSION;
if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
- $title = $conf->global->MAIN_APPLICATION_TITLE;
+ $title = getDolGlobalString('MAIN_APPLICATION_TITLE');
}
// Select templates
diff --git a/htdocs/variants/admin/admin.php b/htdocs/variants/admin/admin.php
index 449c7495847..0d96d52822b 100644
--- a/htdocs/variants/admin/admin.php
+++ b/htdocs/variants/admin/admin.php
@@ -77,7 +77,7 @@ print $form->selectyesno("PRODUIT_ATTRIBUTES_HIDECHILD", getDolGlobalString('PRO
print ' '.$langs->trans('CombinationsSeparator').' ';
if (isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) {
- $separator = $conf->global->PRODUIT_ATTRIBUTES_SEPARATOR;
+ $separator = getDolGlobalString('PRODUIT_ATTRIBUTES_SEPARATOR');
} else {
$separator = "_";
}
diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php
index 3030617098b..c13638662eb 100644
--- a/htdocs/webhook/class/target.class.php
+++ b/htdocs/webhook/class/target.class.php
@@ -994,7 +994,7 @@ class Target extends CommonObject
if (!empty($this->model_pdf)) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('TARGET_ADDON_PDF')) {
- $modele = $conf->global->TARGET_ADDON_PDF;
+ $modele = getDolGlobalString('TARGET_ADDON_PDF');
}
}
diff --git a/htdocs/webhook/webhookindex.php b/htdocs/webhook/webhookindex.php
index 2212fe61a46..2886d3f5e1c 100644
--- a/htdocs/webhook/webhookindex.php
+++ b/htdocs/webhook/webhookindex.php
@@ -143,7 +143,7 @@ END MODULEBUILDER DRAFT MYOBJECT */
print '';
-$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$NBMAX = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT');
$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index e25f1d4b2ab..03356eaee47 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -3079,7 +3079,7 @@ if (!GETPOST('hide_websitemenu')) {
}
if (getDolGlobalString('WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER')) {
$htmltext .= '';
- $htmltext .= ' '.$langs->trans($conf->global->WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER);
+ $htmltext .= ' '.$langs->trans(getDolGlobalString('WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER'));
} else {
$htmltext .= $langs->trans("SetHereVirtualHost", $dataroot);
$htmltext .= ' ';
diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php
index 543ded86b6c..71db06da835 100644
--- a/htdocs/workstation/class/workstation.class.php
+++ b/htdocs/workstation/class/workstation.class.php
@@ -841,7 +841,7 @@ class Workstation extends CommonObject
$mybool = false;
$file = getDolGlobalString('WORKSTATION_WORKSTATION_ADDON') . ".php";
- $classname = $conf->global->WORKSTATION_WORKSTATION_ADDON;
+ $classname = getDolGlobalString('WORKSTATION_WORKSTATION_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -906,7 +906,7 @@ class Workstation extends CommonObject
if ($this->model_pdf) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('WORKSTATION_ADDON_PDF')) {
- $modele = $conf->global->WORKSTATION_ADDON_PDF;
+ $modele = getDolGlobalString('WORKSTATION_ADDON_PDF');
}
}