diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php
index d1b0d10e262..faf5360c984 100644
--- a/htdocs/accountancy/admin/closure.php
+++ b/htdocs/accountancy/admin/closure.php
@@ -145,14 +145,14 @@ print '';
print '
';
print '| '.$langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT").' | ';
print '';
-print '';
+print '';
print ' |
';
// Accounting groups used for the income statement
print '';
print '| '.$langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT").' | ';
print '';
-print '';
+print '';
print ' |
';
print "\n";
diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php
index aeb9dc2009f..085c8a65e80 100644
--- a/htdocs/accountancy/closure/index.php
+++ b/htdocs/accountancy/closure/index.php
@@ -87,8 +87,8 @@ if (is_array($fiscal_periods)) {
}
}
-$accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', $conf->global->ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT)), 'strlen');
-$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', $conf->global->ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT)), 'strlen');
+$accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen');
+$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen');
/*
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index 5f647c5594f..c92d0032176 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -460,7 +460,7 @@ print ''."\n";
print ' | ';
$state_id = 0;
if (getDolGlobalString('MAIN_INFO_SOCIETE_STATE')) {
- $tmp = explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE);
+ $tmp = explode(':', getDolGlobalString('MAIN_INFO_SOCIETE_STATE'));
$state_id = $tmp[0];
}
print img_picto('', 'state', 'class="pictofixedwidth"');
diff --git a/htdocs/admin/company_socialnetworks.php b/htdocs/admin/company_socialnetworks.php
index 426b5a8eeb3..d4784351dba 100644
--- a/htdocs/admin/company_socialnetworks.php
+++ b/htdocs/admin/company_socialnetworks.php
@@ -128,11 +128,11 @@ foreach ($listofnetworks as $key => $value) {
$networkconstname = 'MAIN_INFO_SOCIETE_'.strtoupper($key).'_URL';
$networkconstid = 'MAIN_INFO_SOCIETE_'.strtoupper($key);
print ' | ';
- print '';
+ print '';
print ' | ';
- print '';
+ print '';
print ' | ';
- print ''.dol_print_socialnetworks((!empty($conf->global->$networkconstid) ? dol_escape_htmltag($conf->global->$networkconstid) : ''), 0, 0, $key, $listofnetworks).' | ';
+ print ''.dol_print_socialnetworks((!empty($conf->global->$networkconstid) ? dol_escape_htmltag(getDolGlobalString($networkconstid)) : ''), 0, 0, $key, $listofnetworks).' | ';
print '
'."\n";
}
}
diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index 804797237b8..8e4ae808f3e 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -286,7 +286,7 @@ if ($action == 'edit') {
print '
';
-if (!getDolGlobalString('MAIN_DISABLE_METEO') || $conf->global->MAIN_DISABLE_METEO != 1) {
+if (!getDolGlobalString('MAIN_DISABLE_METEO') || getDolGlobalInt('MAIN_DISABLE_METEO') != 1) {
// Show logo for weather
print ''.$langs->trans("DescWeather").' ';
diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php
index dca0d5c02f7..e85f5aa51ea 100644
--- a/htdocs/admin/external_rss.php
+++ b/htdocs/admin/external_rss.php
@@ -262,13 +262,13 @@ if ($resql) {
print '';
print '| '.$langs->trans("Title")." | ";
- print ' | ';
+ print ' | ';
print '
'."\n";
print '';
print "| ".$langs->trans("URL")." | ";
- print ' | ';
+ print ' | ';
print '
'."\n";
diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index 714dd781d28..5f8afdb7fe2 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -918,7 +918,7 @@ if ($action == 'edit') {
print '| '.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").' | ';
print '';
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_TO')) {
- $listofemail = explode(',', $conf->global->MAIN_MAIL_AUTOCOPY_TO);
+ $listofemail = explode(',', getDolGlobalString('MAIN_MAIL_AUTOCOPY_TO'));
$i = 0;
foreach ($listofemail as $key => $val) {
if ($i) {
diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php
index dbb6ad27d61..eee4b71f42b 100644
--- a/htdocs/admin/mails_emailing.php
+++ b/htdocs/admin/mails_emailing.php
@@ -533,7 +533,7 @@ if ($action == 'edit') {
}
print ' |
';
- if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') {
+ if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') && getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'default') {
// Host server
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail')) {
//print '| '.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").' | '.$langs->trans("SeeLocalSendMailSetup").' |
';
@@ -653,8 +653,8 @@ if ($action == 'edit') {
print ''.$langs->trans("Modify").'';
- if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') {
- if ($conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'mail' || !$linuxlike) {
+ if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') && getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'default') {
+ if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'mail' || !$linuxlike) {
if (function_exists('fsockopen') && $port && $server) {
print '' . $langs->trans("DoTestServerAvailability") . '';
}
diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php
index 104efa16c19..1fa1cd2bb33 100644
--- a/htdocs/admin/mails_ticket.php
+++ b/htdocs/admin/mails_ticket.php
@@ -510,7 +510,7 @@ if ($action == 'edit') {
}
print '';
- if (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') {
+ if (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') && getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') != 'default') {
// Host server
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail')) {
//print '| '.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").' | '.$langs->trans("SeeLocalSendMailSetup").' |
';
@@ -615,8 +615,8 @@ if ($action == 'edit') {
print ''.$langs->trans("Modify").'';
- if (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') {
- if ($conf->global->MAIN_MAIL_SENDMODE_TICKET != 'mail' || !$linuxlike) {
+ if (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') && getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') != 'default') {
+ if (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') != 'mail' || !$linuxlike) {
if (function_exists('fsockopen') && $port && $server) {
print ''.$langs->trans("DoTestServerAvailability").'';
}
diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php
index 038a41c66bb..0c191d9ae7b 100644
--- a/htdocs/admin/security_file.php
+++ b/htdocs/admin/security_file.php
@@ -155,7 +155,7 @@ if (isset($max)) {
}
print '';
print '';
-print ' '.$langs->trans("Kb");
+print ' '.$langs->trans("Kb");
print ' | ';
print '';
@@ -165,7 +165,7 @@ print '';
print $form->textwithpicto($langs->trans("UMask"), $langs->trans("UMaskExplanation"));
print ' | ';
print '';
-print '';
+print '';
print ' | ';
print '';
@@ -200,7 +200,7 @@ print ''.$langs->trans("AntiVirusParam").' ';
print ''.$langs->trans("AntiVirusParamExample").'';
print ' | ';
print '';
-print '';
+print '';
if (defined('MAIN_ANTIVIRUS_PARAM')) {
print ' '.$langs->trans("ValueIsForcedBySystem").'';
}
diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php
index e905af852ec..7ad70c385b5 100644
--- a/htdocs/admin/system/security.php
+++ b/htdocs/admin/system/security.php
@@ -627,13 +627,13 @@ print 'MAIN_SECURITY_HASH_ALGO = '.getDolGlobalString('MAIN_SEC
if (!getDolGlobalString('MAIN_SECURITY_HASH_ALGO')) {
print ' If unset: \'md5\'';
}
-if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
+if (getDolGlobalString('MAIN_SECURITY_HASH_ALGO') != 'password_hash') {
print ' MAIN_SECURITY_SALT = '.getDolGlobalString('MAIN_SECURITY_SALT', ''.$langs->trans("Undefined").'').' ';
} else {
print '('.$langs->trans("Recommended").': password_hash)';
print ' ';
}
-if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
+if (getDolGlobalString('MAIN_SECURITY_HASH_ALGO') != 'password_hash') {
print 'The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible. ';
print 'If you really want to switch, you must: ';
print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\' ';
diff --git a/htdocs/api/admin/explorer_withredoc.php b/htdocs/api/admin/explorer_withredoc.php
index 387da2a06af..8c94e7a6f62 100644
--- a/htdocs/api/admin/explorer_withredoc.php
+++ b/htdocs/api/admin/explorer_withredoc.php
@@ -47,7 +47,7 @@ if (getDolGlobalString('API_EXPLORER_DISABLED')) {
// Restrict API to some IPs
if (getDolGlobalString('API_RESTRICT_ON_IP')) {
- $allowedip = explode(' ', $conf->global->API_RESTRICT_ON_IP);
+ $allowedip = explode(' ', getDolGlobalString('API_RESTRICT_ON_IP'));
$ipremote = getUserRemoteIP();
if (!in_array($ipremote, $allowedip)) {
dol_syslog('Remote ip is '.$ipremote.', not into list ' . getDolGlobalString('API_RESTRICT_ON_IP'));
diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php
index 45b8be32763..292add085d2 100644
--- a/htdocs/api/class/api_setup.class.php
+++ b/htdocs/api/class/api_setup.class.php
@@ -2097,7 +2097,7 @@ class Setup extends DolibarrApi
$constvalue = (empty($constvalue) ? '0' : $constvalue);
// Value found
$value = '';
- if ($constname && $conf->global->$constname != '') {
+ if ($constname && getDolGlobalString($constname) != '') {
$value = $conf->global->$constname;
}
$valueforchecksum = (empty($value) ? '0' : $value);
diff --git a/htdocs/api/index.php b/htdocs/api/index.php
index da711f6f43b..b824c7b97dc 100644
--- a/htdocs/api/index.php
+++ b/htdocs/api/index.php
@@ -198,7 +198,7 @@ UploadFormat::$allowedMimeTypes = array('image/jpeg', 'image/png', 'text/plain',
// Restrict API to some IPs
if (getDolGlobalString('API_RESTRICT_ON_IP')) {
- $allowedip = explode(' ', $conf->global->API_RESTRICT_ON_IP);
+ $allowedip = explode(' ', getDolGlobalString('API_RESTRICT_ON_IP'));
$ipremote = getUserRemoteIP();
if (!in_array($ipremote, $allowedip)) {
dol_syslog('Remote ip is '.$ipremote.', not into list ' . getDolGlobalString('API_RESTRICT_ON_IP'));
@@ -343,7 +343,7 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' &&
// Test rules on endpoints. For example:
// $conf->global->API_ENDPOINT_RULES = 'endpoint1:1,endpoint2:1,...'
if (getDolGlobalString('API_ENDPOINT_RULES')) {
- $listofendpoints = explode(',', $conf->global->API_ENDPOINT_RULES);
+ $listofendpoints = explode(',', getDolGlobalString('API_ENDPOINT_RULES'));
$endpointisallowed = false;
foreach ($listofendpoints as $endpointrule) {
diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php
index e73f4cb1196..75acdf7b230 100644
--- a/htdocs/blockedlog/admin/blockedlog.php
+++ b/htdocs/blockedlog/admin/blockedlog.php
@@ -155,7 +155,7 @@ if ($resql) {
}
}
-$seledted = !getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY') ? array() : explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY);
+$seledted = !getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY') ? array() : explode(',', getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY'));
print $form->multiselectarray('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY', $countryArray, $seledted);
print ' ';
diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index 27a05d81e0e..a69c839f369 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -211,7 +211,7 @@ class BlockedLog
// Add more action to track from a conf variable
// For example: STOCK_MOVEMENT,...
if (getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED')) {
- $tmparrayofmoresupportedevents = explode(',', $conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED);
+ $tmparrayofmoresupportedevents = explode(',', getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED'));
foreach ($tmparrayofmoresupportedevents as $val) {
$this->trackedevents[$val] = 'log'.$val;
}
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 9a5d6305301..f008b84dfad 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -1683,7 +1683,7 @@ if (empty($mode) || $mode == 'show_month') { // View by month
$maxnbofchar = 80;
- $tmp = explode('-', $conf->global->MAIN_DEFAULT_WORKING_HOURS);
+ $tmp = explode('-', getDolGlobalString('MAIN_DEFAULT_WORKING_HOURS'));
$minhour = round($tmp[0], 0);
$maxhour = round($tmp[1], 0);
if ($minhour > 23) {
diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php
index 3f6f8be39c3..7c4e197bdec 100644
--- a/htdocs/comm/propal/stats/index.php
+++ b/htdocs/comm/propal/stats/index.php
@@ -54,7 +54,7 @@ if ($user->socid > 0) {
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
// Load translation files required by the page
diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php
index a909820ae6e..702ee59d5e9 100644
--- a/htdocs/commande/stats/index.php
+++ b/htdocs/commande/stats/index.php
@@ -75,7 +75,7 @@ if ($user->socid > 0) {
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
// Load translation files required by the page
diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php
index c9f4809998c..479f09dabde 100644
--- a/htdocs/compta/cashcontrol/cashcontrol_card.php
+++ b/htdocs/compta/cashcontrol/cashcontrol_card.php
@@ -416,7 +416,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
print ' ';
$array = array();
- $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS);
+ $numterminals = max(1, getDolGlobalString('TAKEPOS_NUM_TERMINALS'));
for ($i = 1; $i <= $numterminals; $i++) {
$array[$i] = $i;
}
diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php
index 4e41cfb8a26..381baabadae 100644
--- a/htdocs/compta/deplacement/stats/index.php
+++ b/htdocs/compta/deplacement/stats/index.php
@@ -64,7 +64,7 @@ if ($userid > 0) {
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
$mode = GETPOST("mode") ? GETPOST("mode") : 'customer';
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index cdf811dd5c3..b819569d041 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -165,7 +165,7 @@ $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatede
// retained warranty invoice available type
$retainedWarrantyInvoiceAvailableType = array();
if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')) {
- $retainedWarrantyInvoiceAvailableType = explode('+', $conf->global->INVOICE_USE_RETAINED_WARRANTY);
+ $retainedWarrantyInvoiceAvailableType = explode('+', getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY'));
}
// Security check
@@ -1684,7 +1684,7 @@ if (empty($reshook)) {
if (!isset($conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE)) {
$conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE = '5';
}
- if ($srcobject->element == 'contrat' && in_array($lines[$i]->statut, explode(',', $conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE))) {
+ if ($srcobject->element == 'contrat' && in_array($lines[$i]->statut, explode(',', getDolGlobalString('CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE')))) {
continue;
}
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index fb8949c6309..b277db0da53 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -5532,7 +5532,7 @@ class Facture extends CommonInvoice
}
if ($rounding < 0) {
- $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
+ $rounding = min(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), $conf->global->MAIN_MAX_DECIMALS_TOT);
}
if ($rounding > 0) {
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index a33215086a2..54042ae0ec8 100644
--- a/htdocs/compta/facture/stats/index.php
+++ b/htdocs/compta/facture/stats/index.php
@@ -66,7 +66,7 @@ if ($user->socid > 0) {
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php
index 4a90dd52b66..49925556725 100644
--- a/htdocs/compta/journal/purchasesjournal.php
+++ b/htdocs/compta/journal/purchasesjournal.php
@@ -104,7 +104,7 @@ $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.
report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink);
-$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
+$p = explode(":", getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY'));
$idpays = $p[0];
@@ -137,7 +137,7 @@ $result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
// les variables
- $cptfour = (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER != "") ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
+ $cptfour = ((getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') != "") ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
$cpttva = (getDolGlobalString('ACCOUNTING_VAT_BUY_ACCOUNT') ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$tabfac = array();
diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php
index 9ffa49798e0..6f76ebfcedb 100644
--- a/htdocs/compta/journal/sellsjournal.php
+++ b/htdocs/compta/journal/sellsjournal.php
@@ -107,7 +107,7 @@ if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink);
-$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
+$p = explode(":", getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY'));
$idpays = $p[0];
$sql = "SELECT f.rowid, f.ref, f.type, f.datef, f.ref_client,";
@@ -165,7 +165,7 @@ if ($result) {
while ($i < $num) {
$obj = $db->fetch_object($result);
// les variables
- $cptcli = (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER != "") ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
+ $cptcli = ((getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') != "") ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
$compta_soc = (!empty($obj->code_compta) ? $obj->code_compta : $cptcli);
$compta_prod = $obj->accountancy_code_sell;
if (empty($compta_prod)) {
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index a5605f59873..32e05251fde 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -391,7 +391,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
if ($(\'#fieldchqemetteur\').val() == \'\')
{
- var emetteur = ('.$facture->type.' == '.Facture::TYPE_CREDIT_NOTE.') ? \''.dol_escape_js(dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM)).'\' : jQuery(\'#thirdpartylabel\').val();
+ var emetteur = ('.$facture->type.' == '.Facture::TYPE_CREDIT_NOTE.') ? \''.dol_escape_js(dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_NOM'))).'\' : jQuery(\'#thirdpartylabel\').val();
$(\'#fieldchqemetteur\').val(emetteur);
}
}
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 32be42c7438..3488d1ada43 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -2125,7 +2125,7 @@ class BonPrelevement extends CommonObject
$XML_DEBITOR .= ' '.$CrLf;
$XML_DEBITOR .= ' '.$CrLf;
// Add EndToEndId. Must be a unique ID for each payment (for example by including bank, buyer or seller, date, checksum)
- $XML_DEBITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('DD-'.dol_trunc($row_idfac.'-'.$row_ref, 20, 'right', 'UTF-8', 1)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
+ $XML_DEBITOR .= ' '.((getDolGlobalString('PRELEVEMENT_END_TO_END') != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('DD-'.dol_trunc($row_idfac.'-'.$row_ref, 20, 'right', 'UTF-8', 1)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
$XML_DEBITOR .= ' '.$CrLf;
$XML_DEBITOR .= ' '.round($row_somme, 2).''.$CrLf;
$XML_DEBITOR .= ' '.$CrLf;
@@ -2171,7 +2171,7 @@ class BonPrelevement extends CommonObject
$XML_CREDITOR .= ' '.$CrLf;
$XML_CREDITOR .= ' '.$CrLf;
// Add EndToEndId. Must be a unique ID for each payment (for example by including bank, buyer or seller, date, checksum)
- $XML_CREDITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('CT-'.dol_trunc($row_idfac.'-'.$row_ref, 20, 'right', 'UTF-8', 1)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
+ $XML_CREDITOR .= ' '.((getDolGlobalString('PRELEVEMENT_END_TO_END') != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('CT-'.dol_trunc($row_idfac.'-'.$row_ref, 20, 'right', 'UTF-8', 1)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
$XML_CREDITOR .= ' '.$CrLf;
if (!empty($this->sepa_xml_pti_in_ctti)) {
$XML_CREDITOR .= ' ' . $CrLf;
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 25ca192e6fa..0a1877d49b6 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -781,7 +781,7 @@ class Contact extends CommonObject
$info = array();
// Object classes
- $info["objectclass"] = explode(',', $conf->global->LDAP_CONTACT_OBJECT_CLASS);
+ $info["objectclass"] = explode(',', getDolGlobalString('LDAP_CONTACT_OBJECT_CLASS'));
$this->fullname = $this->getFullName($langs);
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 7c991630275..6b0e29a207f 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -68,9 +68,9 @@ $origin = GETPOST('origin', 'alpha');
$originid = GETPOST('originid', 'int');
// PDF
-$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
-$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0));
-$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0));
+$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0));
+$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0));
+$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0));
$datecontrat = '';
diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php
index 8448ab513c9..c7de54e22e0 100644
--- a/htdocs/core/actions_massactions.inc.php
+++ b/htdocs/core/actions_massactions.inc.php
@@ -410,7 +410,7 @@ if (!$error && $massaction == 'confirm_presend') {
$tmp = explode(',', $user->email_aliases);
$from = trim($tmp[($reg[1] - 1)]);
} elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) {
- $tmp = explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES);
+ $tmp = explode(',', getDolGlobalString('MAIN_INFO_SOCIETE_MAIL_ALIASES'));
$from = trim($tmp[($reg[1] - 1)]);
} elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) {
$sql = "SELECT rowid, label, email FROM ".MAIN_DB_PREFIX."c_email_senderprofile WHERE rowid = ".(int) $reg[1];
diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php
index b05e13d76eb..3468773caae 100644
--- a/htdocs/core/actions_sendmails.inc.php
+++ b/htdocs/core/actions_sendmails.inc.php
@@ -286,7 +286,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
$tmp = explode(',', $user->email_aliases);
$from = trim($tmp[($reg[1] - 1)]);
} elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) {
- $tmp = explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES);
+ $tmp = explode(',', getDolGlobalString('MAIN_INFO_SOCIETE_MAIL_ALIASES'));
$from = trim($tmp[($reg[1] - 1)]);
} elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) {
$sql = 'SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile';
diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php
index 295a14159cf..c8f683a86ec 100644
--- a/htdocs/core/boxes/box_comptes.php
+++ b/htdocs/core/boxes/box_comptes.php
@@ -63,7 +63,7 @@ class box_comptes extends ModeleBoxes
$this->db = $db;
// disable module for such cases
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
if (!in_array('banque', $listofmodulesforexternal) && !empty($user->socid)) {
$this->enabled = 0; // disabled for external users
}
diff --git a/htdocs/core/boxes/box_members_by_tags.php b/htdocs/core/boxes/box_members_by_tags.php
index df8192c2055..45404727d96 100644
--- a/htdocs/core/boxes/box_members_by_tags.php
+++ b/htdocs/core/boxes/box_members_by_tags.php
@@ -63,7 +63,7 @@ class box_members_by_tags extends ModeleBoxes
$this->db = $db;
// disable module for such cases
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) {
$this->enabled = 0; // disabled for external users
}
diff --git a/htdocs/core/boxes/box_members_by_type.php b/htdocs/core/boxes/box_members_by_type.php
index 9bcb20b2826..4a684011139 100644
--- a/htdocs/core/boxes/box_members_by_type.php
+++ b/htdocs/core/boxes/box_members_by_type.php
@@ -63,7 +63,7 @@ class box_members_by_type extends ModeleBoxes
$this->db = $db;
// disable module for such cases
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) {
$this->enabled = 0; // disabled for external users
}
diff --git a/htdocs/core/boxes/box_members_last_modified.php b/htdocs/core/boxes/box_members_last_modified.php
index a961a478385..2d9d580f8b8 100644
--- a/htdocs/core/boxes/box_members_last_modified.php
+++ b/htdocs/core/boxes/box_members_last_modified.php
@@ -62,7 +62,7 @@ class box_members_last_modified extends ModeleBoxes
$this->db = $db;
// disable module for such cases
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) {
$this->enabled = 0; // disabled for external users
}
diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php
index 3d1e88627f2..b7eaad8cd13 100644
--- a/htdocs/core/boxes/box_members_last_subscriptions.php
+++ b/htdocs/core/boxes/box_members_last_subscriptions.php
@@ -62,7 +62,7 @@ class box_members_last_subscriptions extends ModeleBoxes
$this->db = $db;
// disable module for such cases
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) {
$this->enabled = 0; // disabled for external users
}
diff --git a/htdocs/core/boxes/box_members_subscriptions_by_year.php b/htdocs/core/boxes/box_members_subscriptions_by_year.php
index 999640c3ae4..9a94f6f071b 100644
--- a/htdocs/core/boxes/box_members_subscriptions_by_year.php
+++ b/htdocs/core/boxes/box_members_subscriptions_by_year.php
@@ -62,7 +62,7 @@ class box_members_subscriptions_by_year extends ModeleBoxes
$this->db = $db;
// disable module for such cases
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) {
$this->enabled = 0; // disabled for external users
}
diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php
index ff01ceb810d..748c58f2381 100644
--- a/htdocs/core/boxes/box_produits_alerte_stock.php
+++ b/htdocs/core/boxes/box_produits_alerte_stock.php
@@ -63,7 +63,7 @@ class box_produits_alerte_stock extends ModeleBoxes
$this->db = $db;
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
$tmpentry = array('enabled'=>((isModEnabled("product") || isModEnabled("service")) && isModEnabled('stock')), 'perms'=>!empty($user->rights->stock->lire), 'module'=>'product|service|stock');
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
$this->hidden = ($showmode != 1);
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index ceb65e8cfa9..5f053ae6e18 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -311,7 +311,7 @@ class CMailFile
// Add auto copy to if not already in $to (Note: Adding bcc for specific modules are also done from pages)
// For example MAIN_MAIL_AUTOCOPY_TO can be 'email@example.com, __USER_EMAIL__, ...'
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_TO')) {
- $listofemailstoadd = explode(',', $conf->global->MAIN_MAIL_AUTOCOPY_TO);
+ $listofemailstoadd = explode(',', getDolGlobalString('MAIN_MAIL_AUTOCOPY_TO'));
foreach ($listofemailstoadd as $key => $val) {
$emailtoadd = $listofemailstoadd[$key];
if (trim($emailtoadd) == '__USER_EMAIL__') {
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 9c07833a737..cdcb8f51121 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3656,7 +3656,7 @@ abstract class CommonObject
if (!empty($MODULE)) {
if (!empty($conf->global->$MODULE)) {
- $modsactivated = explode(',', $conf->global->$MODULE);
+ $modsactivated = explode(',', getDolGlobalString($MODULE));
foreach ($modsactivated as $mod) {
if (isModEnabled($mod)) {
return 1; // update was disabled by specific setup
diff --git a/htdocs/core/class/extralanguages.class.php b/htdocs/core/class/extralanguages.class.php
index 5c31e927c56..e5a07aa6ac0 100644
--- a/htdocs/core/class/extralanguages.class.php
+++ b/htdocs/core/class/extralanguages.class.php
@@ -100,7 +100,7 @@ class ExtraLanguages
$array_name_label = array();
if (getDolGlobalString('MAIN_USE_ALTERNATE_TRANSLATION_FOR')) {
- $tmpelement = explode(';', $conf->global->MAIN_USE_ALTERNATE_TRANSLATION_FOR);
+ $tmpelement = explode(';', getDolGlobalString('MAIN_USE_ALTERNATE_TRANSLATION_FOR'));
foreach ($tmpelement as $elementstring) {
$reg = array();
preg_match('/^(.*):(.*)$/', $elementstring, $reg);
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 9abb4252c05..a81f40ebc2f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6559,7 +6559,7 @@ class Form
} else {
// We will use the rate defined into MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS
$defaulttx = '';
- if ($conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS != 'none') {
+ if (getDolGlobalString('MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS') != 'none') {
$defaulttx = $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS;
}
if (preg_match('/\((.*)\)/', $defaulttx, $reg)) {
@@ -6823,7 +6823,7 @@ class Form
// You can set MAIN_POPUP_CALENDAR to 'eldy' or 'jquery'
$usecalendar = 'combo';
- if (!empty($conf->use_javascript_ajax) && (!getDolGlobalString('MAIN_POPUP_CALENDAR') || $conf->global->MAIN_POPUP_CALENDAR != "none")) {
+ if (!empty($conf->use_javascript_ajax) && (!getDolGlobalString('MAIN_POPUP_CALENDAR') || getDolGlobalString('MAIN_POPUP_CALENDAR') != "none")) {
$usecalendar = ((!getDolGlobalString('MAIN_POPUP_CALENDAR') || getDolGlobalString('MAIN_POPUP_CALENDAR') == 'eldy') ? 'jquery' : $conf->global->MAIN_POPUP_CALENDAR);
}
diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php
index eef81eb9c6a..f71f1736a33 100644
--- a/htdocs/core/class/html.formcontract.class.php
+++ b/htdocs/core/class/html.formcontract.class.php
@@ -85,7 +85,7 @@ class FormContract
// CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
if (!getDolGlobalString('CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
$sql .= " AND (c.fk_soc=".((int) $socid)." OR c.fk_soc IS NULL)";
- } elseif ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') {
+ } elseif (getDolGlobalString('CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY') != 'all') {
$sql .= " AND (c.fk_soc IN (".$this->db->sanitize(((int) $socid).",".((int) $conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)).")";
$sql .= " OR c.fk_soc IS NULL)";
}
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 2c38d45cdd1..77f0395041d 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -186,7 +186,7 @@ class FormProjets extends Form
if ($socid > 0) {
if (!getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
$sql .= " AND (p.fk_soc=" . ((int) $socid) . " OR p.fk_soc IS NULL)";
- } elseif ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') { // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
+ } elseif (getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY') != 'all') { // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
$sql .= " AND (p.fk_soc IN (" . $this->db->sanitize(((int) $socid) . ", " . getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) . ") OR p.fk_soc IS NULL)";
}
}
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index 5e68dd05bd8..c5388f367b1 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -401,7 +401,7 @@ class Translate
$overwritekey = 'MAIN_OVERWRITE_TRANS_' . $this->defaultlang;
if (!empty($conf->global->$overwritekey)) { // Overwrite translation with key1:newstring1,key2:newstring2
// Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX
- $tmparray = explode(',', $conf->global->$overwritekey);
+ $tmparray = explode(',', getDolGlobalString($overwritekey));
foreach ($tmparray as $tmp) {
$tmparray2 = explode(':', $tmp);
if (!empty($tmparray2[1])) {
@@ -637,7 +637,7 @@ class Translate
// Make some string replacement after translation
$replacekey = 'MAIN_REPLACE_TRANS_' . $this->defaultlang;
if (!empty($conf->global->$replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2
- $tmparray = explode(';', $conf->global->$replacekey);
+ $tmparray = explode(';', getDolGlobalString($replacekey));
foreach ($tmparray as $tmp) {
$tmparray2 = explode(':', $tmp);
$str = preg_replace('/' . preg_quote($tmparray2[0]) . '/', $tmparray2[1], $str);
@@ -731,7 +731,7 @@ class Translate
// Make some string replacement after translation
$replacekey = 'MAIN_REPLACE_TRANS_' . $this->defaultlang;
if (!empty($conf->global->$replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2
- $tmparray = explode(';', $conf->global->$replacekey);
+ $tmparray = explode(';', getDolGlobalString($replacekey));
foreach ($tmparray as $tmp) {
$tmparray2 = explode(':', $tmp);
$str = preg_replace('/' . preg_quote($tmparray2[0]) . '/', $tmparray2[1], $str);
@@ -872,7 +872,7 @@ class Translate
}
}
// We must keep only languages into MAIN_LANGUAGES_ALLOWED
- if (getDolGlobalString('MAIN_LANGUAGES_ALLOWED') && !in_array($dir, explode(',', $conf->global->MAIN_LANGUAGES_ALLOWED))) {
+ if (getDolGlobalString('MAIN_LANGUAGES_ALLOWED') && !in_array($dir, explode(',', getDolGlobalString('MAIN_LANGUAGES_ALLOWED')))) {
continue;
}
diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php
index 707104c0543..1711eb7f6a6 100644
--- a/htdocs/core/class/utils.class.php
+++ b/htdocs/core/class/utils.class.php
@@ -1283,7 +1283,7 @@ class Utils
if (!empty($from)) {
$from = dol_escape_htmltag($from);
} elseif (getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')) {
- $from = dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL);
+ $from = dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL'));
} else {
$error++;
}
@@ -1291,7 +1291,7 @@ class Utils
if (!empty($sendto)) {
$sendto = dol_escape_htmltag($sendto);
} elseif (getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')) {
- $from = dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL);
+ $from = dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL'));
} else {
$error++;
}
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index d8d1b8428f6..529e53a13cd 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -1871,7 +1871,7 @@ function showModulesExludedForExternal($modules)
global $conf, $langs;
$text = $langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers");
- $listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); // List of modules qualified for external user management
+ $listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')); // List of modules qualified for external user management
$i = 0;
if (!empty($modules)) {
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 27fefc5ccf1..1bedbe21fdf 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1101,7 +1101,7 @@ if (!function_exists('dol_getprefix')) {
global $conf;
if (getDolGlobalString('MAIL_PREFIX_FOR_EMAIL_ID')) { // If MAIL_PREFIX_FOR_EMAIL_ID is set
- if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID != 'SERVER_NAME') {
+ if (getDolGlobalString('MAIL_PREFIX_FOR_EMAIL_ID') != 'SERVER_NAME') {
return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID;
} elseif (isset($_SERVER["SERVER_NAME"])) { // If MAIL_PREFIX_FOR_EMAIL_ID is set to 'SERVER_NAME'
return $_SERVER["SERVER_NAME"];
@@ -6042,7 +6042,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
}
$amount = (is_numeric($amount) ? $amount : 0); // Check if amount is numeric, for example, an error occured when amount value = o (letter) instead 0 (number)
if ($rounding == -1) {
- $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
+ $rounding = min(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), $conf->global->MAIN_MAX_DECIMALS_TOT);
}
$nbdecimal = $rounding;
@@ -6236,9 +6236,9 @@ function price2num($amount, $rounding = '', $option = 0)
} elseif ($rounding == 'MS') {
$nbofdectoround = isset($conf->global->MAIN_MAX_DECIMALS_STOCK) ? $conf->global->MAIN_MAX_DECIMALS_STOCK : 5;
} elseif ($rounding == 'CU') {
- $nbofdectoround = max($conf->global->MAIN_MAX_DECIMALS_UNIT, 8); // TODO Use param of currency
+ $nbofdectoround = max(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), 8); // TODO Use param of currency
} elseif ($rounding == 'CT') {
- $nbofdectoround = max($conf->global->MAIN_MAX_DECIMALS_TOT, 8); // TODO Use param of currency
+ $nbofdectoround = max(getDolGlobalString('MAIN_MAX_DECIMALS_TOT'), 8); // TODO Use param of currency
} elseif (is_numeric($rounding)) {
$nbofdectoround = (int) $rounding;
}
@@ -6734,7 +6734,7 @@ function get_product_vat_for_country($idprod, $thirdpartytouse, $idprodfournpric
// '1.23'
// or '1.23 (CODE)'
$defaulttx = '';
- if ($conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS != 'none') {
+ if (getDolGlobalString('MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS') != 'none') {
$defaulttx = $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS;
}
/*if (preg_match('/\((.*)\)/', $defaulttx, $reg)) {
@@ -10353,7 +10353,7 @@ function printCommonFooter($zone = 'private')
// Google Analytics
// TODO Add a hook here
if (isModEnabled('google') && getDolGlobalString('MAIN_GOOGLE_AN_ID')) {
- $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
+ $tmptagarray = explode(',', getDolGlobalString('MAIN_GOOGLE_AN_ID'));
foreach ($tmptagarray as $tmptag) {
print "\n";
print "\n";
diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php
index 7e3822d2a23..5dc4bc5b1a1 100644
--- a/htdocs/core/lib/geturl.lib.php
+++ b/htdocs/core/lib/geturl.lib.php
@@ -299,7 +299,7 @@ function isIPAllowed($iptocheck, $localurl)
$errormsg = 'Error bad hostname IP (IP is a local IP). Must be an external URL.';
return $errormsg;
}
- if (getDolGlobalString('MAIN_SECURITY_ANTI_SSRF_SERVER_IP') && in_array($iptocheck, explode(',', $conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP))) {
+ if (getDolGlobalString('MAIN_SECURITY_ANTI_SSRF_SERVER_IP') && in_array($iptocheck, explode(',', getDolGlobalString('MAIN_SECURITY_ANTI_SSRF_SERVER_IP')))) {
$errormsg = 'Error bad hostname IP (IP is a local IP defined into MAIN_SECURITY_SERVER_IP). Must be an external URL.';
return $errormsg;
}
@@ -310,7 +310,7 @@ function isIPAllowed($iptocheck, $localurl)
$errormsg = 'Error bad hostname '.$iptocheck.'. Must be a local URL.';
return $errormsg;
}
- if (getDolGlobalString('MAIN_SECURITY_ANTI_SSRF_SERVER_IP') && !in_array($iptocheck, explode(',', $conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP))) {
+ if (getDolGlobalString('MAIN_SECURITY_ANTI_SSRF_SERVER_IP') && !in_array($iptocheck, explode(',', getDolGlobalString('MAIN_SECURITY_ANTI_SSRF_SERVER_IP')))) {
$errormsg = 'Error bad hostname IP (IP is not a local IP defined into list MAIN_SECURITY_SERVER_IP). Must be a local URL in allowed list.';
return $errormsg;
}
diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php
index 4ea746feb26..0236afaddf5 100644
--- a/htdocs/core/lib/memory.lib.php
+++ b/htdocs/core/lib/memory.lib.php
@@ -82,7 +82,7 @@ function dol_setcache($memoryid, $data, $expire = 0)
global $dolmemcache;
if (empty($dolmemcache) || !is_object($dolmemcache)) {
$dolmemcache = new Memcached();
- $tmparray = explode(':', $conf->global->MEMCACHED_SERVER);
+ $tmparray = explode(':', getDolGlobalString('MEMCACHED_SERVER'));
$result = $dolmemcache->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211);
if (!$result) {
return -1;
@@ -103,7 +103,7 @@ function dol_setcache($memoryid, $data, $expire = 0)
global $dolmemcache;
if (empty($dolmemcache) || !is_object($dolmemcache)) {
$dolmemcache = new Memcache();
- $tmparray = explode(':', $conf->global->MEMCACHED_SERVER);
+ $tmparray = explode(':', getDolGlobalString('MEMCACHED_SERVER'));
$result = $dolmemcache->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211);
if (!$result) {
return -1;
@@ -152,7 +152,7 @@ function dol_getcache($memoryid)
global $m;
if (empty($m) || !is_object($m)) {
$m = new Memcached();
- $tmparray = explode(':', $conf->global->MEMCACHED_SERVER);
+ $tmparray = explode(':', getDolGlobalString('MEMCACHED_SERVER'));
$result = $m->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211);
if (!$result) {
return -1;
@@ -177,7 +177,7 @@ function dol_getcache($memoryid)
global $m;
if (empty($m) || !is_object($m)) {
$m = new Memcache();
- $tmparray = explode(':', $conf->global->MEMCACHED_SERVER);
+ $tmparray = explode(':', getDolGlobalString('MEMCACHED_SERVER'));
$result = $m->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211);
if (!$result) {
return -1;
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index b8c749a3d23..fd7fa66ba78 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -728,7 +728,7 @@ function pdf_pagehead(&$pdf, $outputlangs, $page_height)
global $conf;
// Add a background image on document only if good setup of const
- if (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF') && ($conf->global->MAIN_USE_BACKGROUND_ON_PDF != '-1')) { // Warning, this option make TCPDF generation being crazy and some content disappeared behind the image
+ if (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF') && (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF') != '-1')) { // Warning, this option make TCPDF generation being crazy and some content disappeared behind the image
$filepath = $conf->mycompany->dir_output.'/logos/' . getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF');
if (file_exists($filepath)) {
$pdf->SetAutoPageBreak(0, 0); // Disable auto pagebreak before adding image
@@ -1028,7 +1028,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$substitutionarray['__FROM_NAME__'] = $fromcompany->name;
$substitutionarray['__FROM_EMAIL__'] = $fromcompany->email;
complete_substitutions_array($substitutionarray, $outputlangs, $object);
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray, $outputlangs);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray, $outputlangs);
// Make a change into HTML code to allow to include images from medias directory.
//
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 004bb6ea5d6..34d8b40f939 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -478,7 +478,7 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
$feature2 = explode("|", $feature2);
}
- $listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
// Check read permission from module
$readok = 1;
diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php
index c166a7053ee..6960f90d3bf 100644
--- a/htdocs/core/lib/security2.lib.php
+++ b/htdocs/core/lib/security2.lib.php
@@ -293,7 +293,7 @@ if (!function_exists('dol_loginfunction')) {
if (getDolGlobalString('MAIN_HOME')) {
$substitutionarray = getCommonSubstitutionArray($langs);
complete_substitutions_array($substitutionarray, $langs);
- $texttoshow = make_substitutions($conf->global->MAIN_HOME, $substitutionarray, $langs);
+ $texttoshow = make_substitutions(getDolGlobalString('MAIN_HOME'), $substitutionarray, $langs);
$main_home = dol_htmlcleanlastbr($texttoshow);
}
diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php
index 644243da48c..60480d6c9cb 100644
--- a/htdocs/core/menus/standard/auguria.lib.php
+++ b/htdocs/core/menus/standard/auguria.lib.php
@@ -46,7 +46,7 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout
$leftmenu = (empty($_SESSION["leftmenu"]) ? '' : $_SESSION["leftmenu"]);
$id = 'mainmenu';
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
// Show personalized menus
$menuArbo = new Menubase($db, 'auguria');
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 7899d12259b..0d70593acae 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -51,7 +51,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
$leftmenu = (empty($_SESSION["leftmenu"]) ? '' : $_SESSION["leftmenu"]);
$id = 'mainmenu';
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
$substitarray = getCommonSubstitutionArray($langs, 0, null, null);
@@ -768,7 +768,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$substitarray = getCommonSubstitutionArray($langs, 0, null, null);
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
/**
* We update newmenu with entries found into database
@@ -2247,7 +2247,7 @@ function get_left_menu_projects($mainmenu, &$newmenu, $usemenuhider = 1, $leftme
'perms'=>$user->hasRight('projet', 'lire'),
'module'=>'projet'
);
- $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+ $listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
$showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
$titleboth = $langs->trans("LeadsOrProjects");
diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php
index 2e9be976bfc..d94334250a2 100644
--- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php
+++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php
@@ -318,7 +318,7 @@ class doc_generic_asset_odt extends ModelePDFAsset
$newfreetext = '';
$paramfreetext = 'ORDER_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php
index 4bde00a44fe..7bc818f9f7e 100644
--- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php
+++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php
@@ -847,7 +847,7 @@ class pdf_standard_asset extends ModelePDFAsset
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php
index 3e417bafdb3..7301d29fef3 100644
--- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php
+++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php
@@ -324,7 +324,7 @@ class doc_generic_bom_odt extends ModelePDFBom
$newfreetext = '';
$paramfreetext = 'BOM_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
index 3c0797dd34a..db0704d6494 100644
--- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
+++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
@@ -444,7 +444,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$newfreetext = '';
$paramfreetext = 'BANK_CHEQUERECEIPT_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
return pdf_pagefoot($pdf, $outputlangs, $newfreetext, $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
index 1b9c6e8cf85..015fc18fed0 100644
--- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
+++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
@@ -334,7 +334,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
$newfreetext = '';
$paramfreetext = 'ORDER_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index c75e9bd773c..dddb16a3dd7 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -1170,7 +1170,7 @@ class pdf_einstein extends ModelePDFCommandes
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index afd7e7f8701..a55f63c2233 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -1367,7 +1367,7 @@ class pdf_eratosthene extends ModelePDFCommandes
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
index bf9b6876bc1..8ffc21c69b3 100644
--- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
+++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
@@ -345,7 +345,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$newfreetext = '';
$paramfreetext = 'CONTRACT_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $tmparray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $tmparray);
}
diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
index f56d1cacbde..56f71ce36e8 100644
--- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
+++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
@@ -653,7 +653,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
if (empty($hidetop)) {
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
index b95dec9069f..f35415d6e0f 100644
--- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
+++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
@@ -332,7 +332,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
$newfreetext = '';
$paramfreetext = 'EXPEDITION_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
index 51426d677f3..acd8bf1e262 100644
--- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
@@ -908,7 +908,7 @@ class pdf_espadon extends ModelePdfExpedition
if (empty($hidetop)) {
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
index bde4c89007b..3742801f80f 100644
--- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
+++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
@@ -374,7 +374,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$newfreetext = '';
$paramfreetext = 'INVOICE_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index 33ff6018c38..ed3701527c0 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -1702,7 +1702,7 @@ class pdf_crabe extends ModelePDFFactures
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index d17daeb7f27..7a3e443d6ac 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -2006,7 +2006,7 @@ class pdf_sponge extends ModelePDFFactures
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php
index efc5cb7b10f..18d38c7c63a 100644
--- a/htdocs/core/modules/modBlockedLog.class.php
+++ b/htdocs/core/modules/modBlockedLog.class.php
@@ -92,7 +92,7 @@ class modBlockedLog extends DolibarrModules
$this->always_enabled = (!empty($conf->blockedlog->enabled)
&& getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY')
- && in_array((empty($mysoc->country_code) ? '' : $mysoc->country_code), explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY))
+ && in_array((empty($mysoc->country_code) ? '' : $mysoc->country_code), explode(',', getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY')))
&& $this->alreadyUsed());
// Constants
diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php
index 1d69657c239..4d9a837cf5c 100644
--- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php
@@ -811,7 +811,7 @@ class pdf_standard extends ModelePDFMovement
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
index d92761af4ba..fe403dc402d 100644
--- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
+++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
@@ -317,7 +317,7 @@ class doc_generic_mo_odt extends ModelePDFMo
$newfreetext = '';
$paramfreetext = 'MRP_MO_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
index 88264d0f417..6d3903bd57a 100644
--- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
+++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
@@ -974,7 +974,7 @@ class pdf_vinci extends ModelePDFMo
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
index 26cd78956e1..da4c655fd63 100644
--- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
+++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
@@ -329,7 +329,7 @@ class doc_generic_product_odt extends ModelePDFProduct
$newfreetext = '';
$paramfreetext = 'PRODUCT_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php
index 6bebea8d1e3..5d28341688f 100644
--- a/htdocs/core/modules/product/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php
@@ -632,7 +632,7 @@ class pdf_standard extends ModelePDFProduct
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
index 0afb2ed4d90..63a85245ca7 100644
--- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
+++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
@@ -366,7 +366,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
$newfreetext = '';
$paramfreetext = 'PROPOSAL_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index 11860db0339..5cec649c2dc 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -1360,7 +1360,7 @@ class pdf_azur extends ModelePDFPropales
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index 8668b79a293..db9f4da3703 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -1464,7 +1464,7 @@ class pdf_cyan extends ModelePDFPropales
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1475,7 +1475,7 @@ class pdf_cyan extends ModelePDFPropales
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
if (getDolGlobalString('MAIN_PDF_TITLE_TEXT_COLOR')) {
- $arrayColorTextTitle = explode(',', $conf->global->MAIN_PDF_TITLE_TEXT_COLOR);
+ $arrayColorTextTitle = explode(',', getDolGlobalString('MAIN_PDF_TITLE_TEXT_COLOR'));
$pdf->SetTextColor($arrayColorTextTitle[0], $arrayColorTextTitle[1], $arrayColorTextTitle[2]);
}
diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
index 571af59c06f..3dd7619e4f2 100644
--- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
+++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
@@ -327,7 +327,7 @@ class doc_generic_reception_odt extends ModelePdfReception
$newfreetext = '';
$paramfreetext = 'RECEPTION_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php
index a66bc865364..09458d884c6 100644
--- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php
+++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php
@@ -101,7 +101,7 @@ class modGeneratePassPerso extends ModeleGenPassword
$this->Spe = "!@#$%&*()_-+={}[]\\|:;'/";
$this->Ambi = array("1", "I", "l", "|", "O", "0");
- $tabConf = explode(";", $conf->global->USER_PASSWORD_PATTERN);
+ $tabConf = explode(";", getDolGlobalString('USER_PASSWORD_PATTERN'));
$this->length2 = $tabConf[0];
$this->NbMaj = $tabConf[1];
$this->NbNum = $tabConf[2];
diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php
index 44d77e32cb4..0a33980e694 100644
--- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php
+++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php
@@ -218,7 +218,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
// Clean declared words
if (getDolGlobalString('COMPANY_DIGITARIA_CLEAN_WORDS')) {
- $cleanWords = explode(";", $conf->global->COMPANY_DIGITARIA_CLEAN_WORDS);
+ $cleanWords = explode(";", getDolGlobalString('COMPANY_DIGITARIA_CLEAN_WORDS'));
$codetouse = str_replace($cleanWords, "", $codetouse);
}
// Remove special char if COMPANY_DIGITARIA_REMOVE_SPECIAL is set to 1 or not set (default)
diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
index c583488eb2e..0d4a9d69dcd 100644
--- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
+++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
@@ -332,7 +332,7 @@ class doc_generic_stock_odt extends ModelePDFStock
$newfreetext = '';
$paramfreetext = 'stock_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
index a2db0a7881b..e2cb7c6c17a 100644
--- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
@@ -608,7 +608,7 @@ class pdf_standard extends ModelePDFStock
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
index 06e68169278..de7a1f65f5e 100644
--- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
+++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
@@ -1131,7 +1131,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php
index 4a5bbd80543..36ff93a744a 100644
--- a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php
+++ b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php
@@ -330,7 +330,7 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices
$newfreetext = '';
$paramfreetext = 'INVOICE_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
index f4e01bc9f77..a6bdd688a07 100644
--- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
@@ -857,7 +857,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php
index 91e99e2f96d..5193d053b5d 100644
--- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php
@@ -325,7 +325,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
$newfreetext = '';
$paramfreetext = 'ORDER_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index 1ac5971a3e4..9e45515a15e 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -1143,7 +1143,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
index 1fab71588e0..09604265236 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
@@ -1022,7 +1022,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
index 021d0018fdb..4130df223c4 100644
--- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
@@ -354,7 +354,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
$newfreetext = '';
$paramfreetext = 'SUPPLIER_PROPOSAL_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 84b08cc5066..ee84d168da9 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -1140,7 +1140,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
index 7c33a7454b4..d87861f0ab9 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
@@ -1143,7 +1143,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
index 07d83808621..d25b59ed894 100644
--- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
+++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
@@ -353,7 +353,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
$newfreetext = '';
$paramfreetext = 'user_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index 819afa9e43a..9e247fc1947 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -115,7 +115,7 @@ print "\n";
if (getDolGlobalString('ADD_UNSPLASH_LOGIN_BACKGROUND')) {
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'?>
-
+
@@ -465,7 +465,7 @@ if (!empty($morelogincontent) && is_array($morelogincontent)) {
// Google Analytics
// TODO Remove this, and add content into hook getLoginPageExtraOptions() instead
if (isModEnabled('google') && getDolGlobalString('MAIN_GOOGLE_AN_ID')) {
- $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
+ $tmptagarray = explode(',', getDolGlobalString('MAIN_GOOGLE_AN_ID'));
foreach ($tmptagarray as $tmptag) {
print "\n";
print "\n";
diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php
index 4ad57614c28..33fc1b0d4da 100644
--- a/htdocs/core/tpl/passwordforgotten.tpl.php
+++ b/htdocs/core/tpl/passwordforgotten.tpl.php
@@ -286,7 +286,7 @@ if (!empty($morelogincontent) && is_array($morelogincontent)) {
// Google Analytics
// TODO Remove this, and add content into hook getPasswordForgottenPageExtraOptions() instead
if (isModEnabled('google') && getDolGlobalString('MAIN_GOOGLE_AN_ID')) {
- $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
+ $tmptagarray = explode(',', getDolGlobalString('MAIN_GOOGLE_AN_ID'));
foreach ($tmptagarray as $tmptag) {
print "\n";
print "\n";
diff --git a/htdocs/core/tpl/passwordreset.tpl.php b/htdocs/core/tpl/passwordreset.tpl.php
index 531e659a63c..5cbb4c92d69 100644
--- a/htdocs/core/tpl/passwordreset.tpl.php
+++ b/htdocs/core/tpl/passwordreset.tpl.php
@@ -327,7 +327,7 @@ if (!empty($morelogincontent) && is_array($morelogincontent)) {
// Google Analytics
// TODO Remove this, and add content into hook getPasswordForgottenPageExtraOptions() instead
if (isModEnabled('google') && getDolGlobalString('MAIN_GOOGLE_AN_ID')) {
- $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
+ $tmptagarray = explode(',', getDolGlobalString('MAIN_GOOGLE_AN_ID'));
foreach ($tmptagarray as $tmptag) {
print "\n";
print "\n";
diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
index 70923143d18..a515078bc70 100644
--- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
+++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php
@@ -64,7 +64,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
}
// Test if event/record is qualified
- if (!getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED') || !in_array($action, explode(',', $conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED))) {
+ if (!getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED') || !in_array($action, explode(',', getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED')))) {
// If custom actions are not set or if action not into custom actions, we can exclude action if object->elementis not valid
$listofqualifiedelement = array('facture', 'don', 'payment', 'payment_donation', 'subscription', 'payment_various', 'cashcontrol');
if (!in_array($object->element, $listofqualifiedelement)) {
@@ -93,7 +93,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
|| $action === 'CASHCONTROL_VALIDATE'
|| (in_array($object->element, array('facture', 'supplier_invoice')) && $action === 'DOC_DOWNLOAD' && $object->statut != 0)
|| (in_array($object->element, array('facture', 'supplier_invoice')) && $action === 'DOC_PREVIEW' && $object->statut != 0)
- || (getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED') && in_array($action, explode(',', $conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED)))
+ || (getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED') && in_array($action, explode(',', getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED'))))
) {
$qualified++;
diff --git a/htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php b/htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php
index 1c869b2d75e..5279a4c4258 100644
--- a/htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php
+++ b/htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php
@@ -80,7 +80,7 @@ class InterfaceEventOrganization extends DolibarrTriggers
// Actions
if ($action == 'PROJECT_VALIDATE') {
if (getDolGlobalString('EVENTORGANIZATION_TASK_LABEL') && !empty($object->usage_organize_event)) {
- $taskToDo = explode("\n", $conf->global->EVENTORGANIZATION_TASK_LABEL);
+ $taskToDo = explode("\n", getDolGlobalString('EVENTORGANIZATION_TASK_LABEL'));
if (is_array($taskToDo) && count($taskToDo)>0) {
// Load translation files required by the page
$langs->loadLangs(array("eventorganization"));
diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php
index 8c896d276d2..d2bbb34cfa0 100644
--- a/htdocs/dav/fileserver.php
+++ b/htdocs/dav/fileserver.php
@@ -68,7 +68,7 @@ if (empty($conf->dav->enabled)) {
// Restrict API to some IPs
if (getDolGlobalString('DAV_RESTRICT_ON_IP')) {
- $allowedip = explode(' ', $conf->global->DAV_RESTRICT_ON_IP);
+ $allowedip = explode(' ', getDolGlobalString('DAV_RESTRICT_ON_IP'));
$ipremote = getUserRemoteIP();
if (!in_array($ipremote, $allowedip)) {
dol_syslog('Remote ip is '.$ipremote.', not into list ' . getDolGlobalString('DAV_RESTRICT_ON_IP'));
diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php
index 020c534a065..8253e304df9 100644
--- a/htdocs/don/stats/index.php
+++ b/htdocs/don/stats/index.php
@@ -43,7 +43,7 @@ if ($user->socid > 0) {
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
// Load translation files required by the page
diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
index e7230f91755..126f2e66941 100644
--- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php
+++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
@@ -208,8 +208,8 @@ class ConferenceOrBoothAttendee extends CommonObject
$this->fields['fk_soc']['type'] .= ' AND rowid IN (SELECT DISTINCT c.fk_soc FROM '.MAIN_DB_PREFIX.'categorie_societe as c WHERE c.fk_categorie='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT.')';
}
if (isset($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE)
- && $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE !== ''
- && $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE !== '-1') {
+ && getDolGlobalString('EVENTORGANIZATION_FILTERATTENDEES_TYPE') !== ''
+ && getDolGlobalString('EVENTORGANIZATION_FILTERATTENDEES_TYPE') !== '-1') {
$this->fields['fk_soc']['type'] .= ' AND client = '.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE;
}
diff --git a/htdocs/eventorganization/core/actions_massactions_mail.inc.php b/htdocs/eventorganization/core/actions_massactions_mail.inc.php
index 9f4f69c0482..2c9e1faf250 100644
--- a/htdocs/eventorganization/core/actions_massactions_mail.inc.php
+++ b/htdocs/eventorganization/core/actions_massactions_mail.inc.php
@@ -158,7 +158,7 @@ if (!$error && $massaction == 'confirm_presend_attendees') {
$tmp = explode(',', $user->email_aliases);
$from = trim($tmp[($reg[1] - 1)]);
} elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) {
- $tmp = explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES);
+ $tmp = explode(',', getDolGlobalString('MAIN_INFO_SOCIETE_MAIL_ALIASES'));
$from = trim($tmp[($reg[1] - 1)]);
} elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) {
$sql = "SELECT rowid, label, email FROM " . MAIN_DB_PREFIX . "c_email_senderprofile WHERE rowid = " . (int) $reg[1];
diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php
index 81352fc6362..b92ded68954 100644
--- a/htdocs/expedition/stats/index.php
+++ b/htdocs/expedition/stats/index.php
@@ -42,7 +42,7 @@ if ($user->socid > 0) {
$nowyear = dol_print_date(dol_now(), "%Y");
$year = GETPOST('year') > 0 ? GETPOST('year') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
// Load translation files required by the page
diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php
index 17a3bd5b311..dfac7dac39c 100644
--- a/htdocs/expensereport/stats/index.php
+++ b/htdocs/expensereport/stats/index.php
@@ -56,7 +56,7 @@ $result = restrictedArea($user, 'expensereport', $id, '');
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php
index f834d32694f..c6ab74da2ae 100644
--- a/htdocs/fichinter/stats/index.php
+++ b/htdocs/fichinter/stats/index.php
@@ -45,7 +45,7 @@ if ($user->socid > 0) {
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
$object_status = GETPOST('object_status', 'intcomma');
diff --git a/htdocs/index.php b/htdocs/index.php
index 2fca638916d..d6b588e7e5d 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -97,7 +97,7 @@ if (getDolGlobalString('MAIN_MOTD')) {
if (getDolGlobalString('MAIN_MOTD')) {
$substitutionarray = getCommonSubstitutionArray($langs);
complete_substitutions_array($substitutionarray, $langs);
- $texttoshow = make_substitutions($conf->global->MAIN_MOTD, $substitutionarray, $langs);
+ $texttoshow = make_substitutions(getDolGlobalString('MAIN_MOTD'), $substitutionarray, $langs);
print "\n\n";
print '| ';
diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php
index 9c70a6a9200..8fe6da4726f 100644
--- a/htdocs/mailmanspip/class/mailmanspip.class.php
+++ b/htdocs/mailmanspip/class/mailmanspip.class.php
@@ -309,7 +309,7 @@ class MailmanSpip
if (isModEnabled('adherent')) { // Synchro for members
if (getDolGlobalString('ADHERENT_MAILMAN_URL')) {
if ($listes == '' && getDolGlobalString('ADHERENT_MAILMAN_LISTS')) {
- $lists = explode(',', $conf->global->ADHERENT_MAILMAN_LISTS);
+ $lists = explode(',', getDolGlobalString('ADHERENT_MAILMAN_LISTS'));
} else {
$lists = explode(',', $listes);
}
@@ -379,7 +379,7 @@ class MailmanSpip
if (isModEnabled('adherent')) { // Synchro for members
if (getDolGlobalString('ADHERENT_MAILMAN_UNSUB_URL')) {
if ($listes == '' && getDolGlobalString('ADHERENT_MAILMAN_LISTS')) {
- $lists = explode(',', $conf->global->ADHERENT_MAILMAN_LISTS);
+ $lists = explode(',', getDolGlobalString('ADHERENT_MAILMAN_LISTS'));
} else {
$lists = explode(',', $listes);
}
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 35bb8176c22..a0196f0c35d 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -3373,19 +3373,19 @@ function main_area($title = '')
print ' | ';
print '| ';
if ($conf->global->MAIN_SHOW_LOGO && !getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && getDolGlobalString('MAIN_INFO_SOCIETE_LOGO')) {
- print '';
+ print '';
}
print ' | | '."\n";
- print '| '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM).' | '."\n";
- print ''.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ADDRESS).' '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ZIP).' '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TOWN).' | '."\n";
+ print '| '.dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_NOM')).' | '."\n";
+ print ''.dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_ADDRESS')).' '.dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_ZIP')).' '.dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_TOWN')).' | '."\n";
if (getDolGlobalString('MAIN_INFO_SOCIETE_TEL')) {
- print '| '.$langs->trans("Phone").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TEL).' | ';
+ print '| '.$langs->trans("Phone").' : '.dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_TEL')).' | ';
}
if (getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')) {
- print '| '.$langs->trans("Email").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL).' | ';
+ print '| '.$langs->trans("Email").' : '.dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')).' | ';
}
if (getDolGlobalString('MAIN_INFO_SOCIETE_WEB')) {
- print '| '.$langs->trans("Web").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_WEB).' | ';
+ print '| '.$langs->trans("Web").' : '.dol_escape_htmltag(getDolGlobalString('MAIN_INFO_SOCIETE_WEB')).' | ';
}
print '';
print ' '."\n";
@@ -3668,7 +3668,7 @@ if (!function_exists("llxFooter")) {
$hash_unique_id = dol_hash('dolibarr'.$conf->file->instance_unique_id, 'sha256'); // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only.
if (!getDolGlobalString('MAIN_FIRST_PING_OK_DATE')
- || (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && ($conf->global->MAIN_FIRST_PING_OK_ID != 'disabled'))
+ || (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && (getDolGlobalString('MAIN_FIRST_PING_OK_ID') != 'disabled'))
|| $forceping) {
// No ping done if we are into an alpha version
if (strpos('alpha', DOL_VERSION) > 0 && !$forceping) {
diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php
index 4526636d8b1..f4fea4ce380 100644
--- a/htdocs/product/admin/product_lot.php
+++ b/htdocs/product/admin/product_lot.php
@@ -88,12 +88,12 @@ if ($action == 'updateMaskLot') {
dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity);
} elseif ($action == 'setmaskslot') {
dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity);
- if ($value == '1' && $conf->global->PRODUCTBATCH_LOT_ADDONS !== 'mod_lot_advanced') {
+ if ($value == '1' && getDolGlobalString('PRODUCTBATCH_LOT_ADDONS') !== 'mod_lot_advanced') {
dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", 'mod_lot_advanced', 'chaine', 0, '', $conf->entity);
}
} elseif ($action == 'setmaskssn') {
dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity);
- if ($value == '1' && $conf->global->PRODUCTBATCH_SN_ADDONS !== 'mod_sn_advanced') {
+ if ($value == '1' && getDolGlobalString('PRODUCTBATCH_SN_ADDONS') !== 'mod_sn_advanced') {
dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", 'mod_sn_advanced', 'chaine', 0, '', $conf->entity);
}
} elseif ($action == 'set') {
diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php
index 3f1a225b0b1..7179a411a82 100644
--- a/htdocs/product/agenda.php
+++ b/htdocs/product/agenda.php
@@ -164,7 +164,7 @@ if ($id > 0 || $ref) {
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/canvas/product/tpl/card_view.tpl.php b/htdocs/product/canvas/product/tpl/card_view.tpl.php
index a5a8fedc969..86bbf9627fa 100644
--- a/htdocs/product/canvas/product/tpl/card_view.tpl.php
+++ b/htdocs/product/canvas/product/tpl/card_view.tpl.php
@@ -36,7 +36,7 @@ $linkback = 'next_prev_filter = " fk_product_type = ".((int) $object->type);
$shownav = 1;
-if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 3a5cf31cc85..0783ed88269 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2409,7 +2409,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php
index f2878b035ab..f39df3b4085 100644
--- a/htdocs/product/composition/card.php
+++ b/htdocs/product/composition/card.php
@@ -235,7 +235,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index cfdc91efad4..2e32646a8b9 100644
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -243,7 +243,7 @@ if ($object->id) {
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 6d33f7bf6d9..9589afec084 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -395,7 +395,7 @@ if ($id > 0 || $ref) {
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/note.php b/htdocs/product/note.php
index f8dab5e6bf3..ad397349125 100644
--- a/htdocs/product/note.php
+++ b/htdocs/product/note.php
@@ -126,7 +126,7 @@ if ($id > 0 || !empty($ref)) {
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index 030fe94a3c0..122001ce2f6 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -888,7 +888,7 @@ $linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php
index da7cccbdfc9..70ddfeed681 100644
--- a/htdocs/product/stats/commande.php
+++ b/htdocs/product/stats/commande.php
@@ -115,7 +115,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php
index 453ed5d5cc3..ea342530ded 100644
--- a/htdocs/product/stats/commande_fournisseur.php
+++ b/htdocs/product/stats/commande_fournisseur.php
@@ -115,7 +115,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php
index 20a93bc8273..24b61e92490 100644
--- a/htdocs/product/stats/contrat.php
+++ b/htdocs/product/stats/contrat.php
@@ -104,7 +104,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php
index 31709b16327..a3ca3c744ad 100644
--- a/htdocs/product/stats/facture.php
+++ b/htdocs/product/stats/facture.php
@@ -167,7 +167,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php
index 5e651520ad0..04f6d0ddf22 100644
--- a/htdocs/product/stats/facture_fournisseur.php
+++ b/htdocs/product/stats/facture_fournisseur.php
@@ -116,7 +116,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/facturerec.php b/htdocs/product/stats/facturerec.php
index 42ec5899de0..7cc7c83d400 100644
--- a/htdocs/product/stats/facturerec.php
+++ b/htdocs/product/stats/facturerec.php
@@ -132,7 +132,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php
index db00cf4f60c..bdd561f79fc 100644
--- a/htdocs/product/stats/mo.php
+++ b/htdocs/product/stats/mo.php
@@ -115,7 +115,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php
index 7deabc5d969..991290e9b58 100644
--- a/htdocs/product/stats/propal.php
+++ b/htdocs/product/stats/propal.php
@@ -117,7 +117,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php
index c1a929d73cb..1234dec1db8 100644
--- a/htdocs/product/stats/supplier_proposal.php
+++ b/htdocs/product/stats/supplier_proposal.php
@@ -116,7 +116,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php
index dbb6648daa3..52bbd21c37f 100644
--- a/htdocs/product/stock/card.php
+++ b/htdocs/product/stock/card.php
@@ -474,7 +474,7 @@ if ($action == 'create') {
$morehtmlref .= '';
$shownav = 1;
- if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('stock', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php
index 6bed56acd0d..86ebf002689 100644
--- a/htdocs/product/stock/info.php
+++ b/htdocs/product/stock/info.php
@@ -94,7 +94,7 @@ if (isModEnabled('project')) {
$morehtmlref .= '';
$shownav = 1;
-if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+if ($user->socid && !in_array('stock', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php
index b5482c478ea..0416064f466 100644
--- a/htdocs/product/stock/movement_card.php
+++ b/htdocs/product/stock/movement_card.php
@@ -571,7 +571,7 @@ if ($resql) {
$morehtmlref .= '';
$shownav = 1;
- if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('stock', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php
index e979926c8c8..bf6fd10cf4f 100644
--- a/htdocs/product/stock/movement_list.php
+++ b/htdocs/product/stock/movement_list.php
@@ -868,7 +868,7 @@ if ($object->id > 0) {
$morehtmlref .= '';
$shownav = 1;
- if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('stock', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index c5792768256..0c5e071f323 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -614,7 +614,7 @@ if ($id > 0 || $ref) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('stock', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php
index b3efe0cb465..0feab66a2e5 100644
--- a/htdocs/product/stock/productlot_card.php
+++ b/htdocs/product/stock/productlot_card.php
@@ -436,7 +436,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('batch', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php
index d9b32640e28..9c04f0e0447 100644
--- a/htdocs/product/stock/productlot_document.php
+++ b/htdocs/product/stock/productlot_document.php
@@ -176,7 +176,7 @@ if ($object->id) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('batch', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/stats/commande_fournisseur.php b/htdocs/product/stock/stats/commande_fournisseur.php
index 8b9a71deac7..5fd0a1e425d 100644
--- a/htdocs/product/stock/stats/commande_fournisseur.php
+++ b/htdocs/product/stock/stats/commande_fournisseur.php
@@ -133,7 +133,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/stats/expedition.php b/htdocs/product/stock/stats/expedition.php
index 602ea38a518..e8efff308f8 100644
--- a/htdocs/product/stock/stats/expedition.php
+++ b/htdocs/product/stock/stats/expedition.php
@@ -133,7 +133,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/stats/mo.php b/htdocs/product/stock/stats/mo.php
index 51420d1c033..b09a844f0f1 100644
--- a/htdocs/product/stock/stats/mo.php
+++ b/htdocs/product/stock/stats/mo.php
@@ -126,7 +126,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/stock/stats/reception.php b/htdocs/product/stock/stats/reception.php
index 989abe0d668..a117b2043fa 100644
--- a/htdocs/product/stock/stats/reception.php
+++ b/htdocs/product/stock/stats/reception.php
@@ -133,7 +133,7 @@ if ($id > 0 || !empty($ref)) {
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php
index 2028dc36d3b..7a793ba6115 100644
--- a/htdocs/product/traduction.php
+++ b/htdocs/product/traduction.php
@@ -215,7 +215,7 @@ print dol_get_fiche_head($head, 'translation', $titre, 0, $picto);
$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
-if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php
index 8b4d4936217..16728c2e1ca 100644
--- a/htdocs/projet/activity/perday.php
+++ b/htdocs/projet/activity/perday.php
@@ -632,7 +632,7 @@ $numstartworkingday = 1;
$numendworkingday = 5;
if (getDolGlobalString('MAIN_DEFAULT_WORKING_DAYS')) {
- $tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
+ $tmparray = explode('-', getDolGlobalString('MAIN_DEFAULT_WORKING_DAYS'));
if (count($tmparray) >= 2) {
$numstartworkingday = $tmparray[0];
$numendworkingday = $tmparray[1];
diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php
index df98d61e718..064d7538068 100644
--- a/htdocs/projet/activity/perweek.php
+++ b/htdocs/projet/activity/perweek.php
@@ -518,7 +518,7 @@ $numstartworkingday = 1;
$numendworkingday = 5;
if (getDolGlobalString('MAIN_DEFAULT_WORKING_DAYS')) {
- $tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
+ $tmparray = explode('-', getDolGlobalString('MAIN_DEFAULT_WORKING_DAYS'));
if (count($tmparray) >= 2) {
$numstartworkingday = $tmparray[0];
$numendworkingday = $tmparray[1];
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 0e30d10dbdc..695fcb29cad 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -676,7 +676,7 @@ if (getDolGlobalString('PROJECT_ELEMENTS_FOR_PLUS_MARGIN')) {
unset($listofreferent[$key]['margin']);
}
}
- $newelementforplusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_PLUS_MARGIN);
+ $newelementforplusmargin = explode(',', getDolGlobalString('PROJECT_ELEMENTS_FOR_PLUS_MARGIN'));
foreach ($newelementforplusmargin as $value) {
$listofreferent[trim($value)]['margin'] = 'add';
}
@@ -687,7 +687,7 @@ if (getDolGlobalString('PROJECT_ELEMENTS_FOR_MINUS_MARGIN')) {
unset($listofreferent[$key]['margin']);
}
}
- $newelementforminusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN);
+ $newelementforminusmargin = explode(',', getDolGlobalString('PROJECT_ELEMENTS_FOR_MINUS_MARGIN'));
foreach ($newelementforminusmargin as $value) {
$listofreferent[trim($value)]['margin'] = 'minus';
}
diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php
index 21a47ace6df..eeb33ccf2ed 100644
--- a/htdocs/projet/stats/index.php
+++ b/htdocs/projet/stats/index.php
@@ -43,7 +43,7 @@ if ($user->socid > 0) {
}
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year', 'int') > 0 ? GETPOST('year', 'int') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
// Load translation files required by the page
diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php
index 688e02f4886..eb720c69f74 100644
--- a/htdocs/projet/tasks/stats/index.php
+++ b/htdocs/projet/tasks/stats/index.php
@@ -46,7 +46,7 @@ if ($user->socid > 0) {
}
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
// Load translation files required by the page
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index 2841a239015..6fe739d4a99 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -445,7 +445,7 @@ if (empty($reshook) && $action == 'add') {
$urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken();
}
- if (getDolGlobalString('MEMBER_NEWFORM_PAYONLINE') && $conf->global->MEMBER_NEWFORM_PAYONLINE != '-1') {
+ if (getDolGlobalString('MEMBER_NEWFORM_PAYONLINE') && getDolGlobalString('MEMBER_NEWFORM_PAYONLINE') != '-1') {
if (empty($adht->caneditamount)) { // If edition of amount not allowed
// TODO Check amount is same than the amount required for the type of member or if not defined as the defeault amount into $conf->global->MEMBER_NEWFORM_AMOUNT
// It is not so important because a test is done on return of payment validation.
@@ -456,7 +456,7 @@ if (empty($reshook) && $action == 'add') {
if (GETPOST('email')) {
$urlback .= '&email='.urlencode(GETPOST('email'));
}
- if ($conf->global->MEMBER_NEWFORM_PAYONLINE != '-1' && $conf->global->MEMBER_NEWFORM_PAYONLINE != 'all') {
+ if (getDolGlobalString('MEMBER_NEWFORM_PAYONLINE') != '-1' && getDolGlobalString('MEMBER_NEWFORM_PAYONLINE') != 'all') {
$urlback .= '&paymentmethod='.urlencode($conf->global->MEMBER_NEWFORM_PAYONLINE);
}
} else {
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index b2dadb42058..4abd4485c34 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -1651,10 +1651,10 @@ if ($source == 'member' || $source == 'membersubscription') {
}
print ' | ';
if (getDolGlobalString('MEMBER_MIN_AMOUNT') && $amount) {
- $amount = max(0, $conf->global->MEMBER_MIN_AMOUNT, $amount);
+ $amount = max(0, getDolGlobalString('MEMBER_MIN_AMOUNT'), $amount);
}
$caneditamount = $adht->caneditamount;
- $minimumamount = !getDolGlobalString('MEMBER_MIN_AMOUNT') ? $adht->amount : max($conf->global->MEMBER_MIN_AMOUNT, $adht->amount, $amount);
+ $minimumamount = !getDolGlobalString('MEMBER_MIN_AMOUNT') ? $adht->amount : max(getDolGlobalString('MEMBER_MIN_AMOUNT'), $adht->amount, $amount);
if ($caneditamount && $action != 'dopayment') {
if (GETPOSTISSET('newamount')) {
@@ -1811,7 +1811,7 @@ if ($source == 'donation') {
if (empty($amount) || !is_numeric($amount)) {
//$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
if (getDolGlobalString('DONATION_MIN_AMOUNT') && $valtoshow) {
- $valtoshow = max($conf->global->DONATION_MIN_AMOUNT, $valtoshow);
+ $valtoshow = max(getDolGlobalString('DONATION_MIN_AMOUNT'), $valtoshow);
}
print '';
print '';
@@ -1820,7 +1820,7 @@ if ($source == 'donation') {
} else {
$valtoshow = $amount;
if (getDolGlobalString('DONATION_MIN_AMOUNT') && $valtoshow) {
- $valtoshow = max($conf->global->DONATION_MIN_AMOUNT, $valtoshow);
+ $valtoshow = max(getDolGlobalString('DONATION_MIN_AMOUNT'), $valtoshow);
$amount = $valtoshow;
}
print ''.price($valtoshow, 1, $langs, 1, -1, -1, $currency).''; // Price with currency
@@ -2148,7 +2148,7 @@ if ($action != 'dopayment') {
}
print '';
- if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY != 'integral') {
+ if (getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY') != 'integral') {
print ' ';
}
print ' ';
diff --git a/htdocs/reception/stats/index.php b/htdocs/reception/stats/index.php
index e6f66db0420..e2b93a9a4a3 100644
--- a/htdocs/reception/stats/index.php
+++ b/htdocs/reception/stats/index.php
@@ -38,7 +38,7 @@ $socid = GETPOST('socid', 'int');
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
$langs->loadLangs(array("receptions", "other", "companies"));
diff --git a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php
index 14e62605077..bc833ed6a7e 100644
--- a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php
+++ b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php
@@ -342,7 +342,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
$newfreetext = '';
$paramfreetext = 'ORDER_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
- $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
+ $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
}
// Open and load template
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 9739b4fbc6e..67b23014aaa 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
@@ -783,7 +783,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
if (empty($hidetop)) {
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
- $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
+ $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
diff --git a/htdocs/resource/agenda.php b/htdocs/resource/agenda.php
index 20d2d56bac1..31e847f2f37 100644
--- a/htdocs/resource/agenda.php
+++ b/htdocs/resource/agenda.php
@@ -154,7 +154,7 @@ if ($object->id > 0) {
$morehtmlref .= ' ';
$shownav = 1;
- if ($user->socid && !in_array('resource', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('resource', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index cf0039e7d0e..7018a867e97 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -586,7 +586,7 @@ if (!$ret) {
print dol_get_fiche_head($head, 'resources', $titre, -1, $picto);
$shownav = 1;
- if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
+ if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {
$shownav = 0;
}
dol_banner_tab($product, 'ref', '', $shownav, 'ref', 'ref', '', '&element='.$element);
diff --git a/htdocs/salaries/stats/index.php b/htdocs/salaries/stats/index.php
index 06196c4c049..d9ea0e72a7c 100644
--- a/htdocs/salaries/stats/index.php
+++ b/htdocs/salaries/stats/index.php
@@ -53,7 +53,7 @@ $result = restrictedArea($user, 'salaries', '', '', '');
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index b394021caa2..2d6e1991846 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -4462,7 +4462,7 @@ class Societe extends CommonObject
// We define country_id, country_code and country
$country_id = $country_code = $country_label = '';
if (getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) {
- $tmp = explode(':', $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
+ $tmp = explode(':', getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY'));
$country_id = $tmp[0];
if (!empty($tmp[1])) { // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label"
$country_code = $tmp[1];
@@ -4487,7 +4487,7 @@ class Societe extends CommonObject
$state_id = 0;
$state_code = $state_label = '';
if (getDolGlobalString('MAIN_INFO_SOCIETE_STATE')) {
- $tmp = explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE);
+ $tmp = explode(':', getDolGlobalString('MAIN_INFO_SOCIETE_STATE'));
$state_id = $tmp[0];
if (!empty($tmp[1])) { // If $conf->global->MAIN_INFO_SOCIETE_STATE is "id:code:label"
$state_code = $tmp[1];
diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php
index 80bf0d60d73..ee294054e3c 100644
--- a/htdocs/takepos/admin/bar.php
+++ b/htdocs/takepos/admin/bar.php
@@ -126,7 +126,7 @@ if (getDolGlobalInt('TAKEPOS_BAR_RESTAURANT')) {
print ' | '.$langs->trans("Parameters").' | '.$langs->trans("Value").' | ';
print "\n";
- if ($conf->global->TAKEPOS_PRINT_METHOD != "browser") { // Why this ?
+ if (getDolGlobalString('TAKEPOS_PRINT_METHOD') != "browser") { // Why this ?
print ' | ';
print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')';
print ' | ';
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index dad32194c32..b3abbe70756 100644
--- a/htdocs/takepos/index.php
+++ b/htdocs/takepos/index.php
@@ -1081,7 +1081,7 @@ if (!getDolGlobalString('TAKEPOS_HIDE_HEAD_BAR')) {
">
-
global->TAKEPOS_PRINTED_CATEGORIES_1);
- $catsprinter2 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_2);
- $catsprinter3 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_3);
+ $catsprinter1 = explode(';', getDolGlobalString('TAKEPOS_PRINTED_CATEGORIES_1'));
+ $catsprinter2 = explode(';', getDolGlobalString('TAKEPOS_PRINTED_CATEGORIES_2'));
+ $catsprinter3 = explode(';', getDolGlobalString('TAKEPOS_PRINTED_CATEGORIES_3'));
$linestoprint = 0;
foreach ($invoice->lines as $line) {
if ($line->special_code == "4") {
diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php
index c7e8ad274cd..65a15d0d57c 100644
--- a/htdocs/takepos/phone.php
+++ b/htdocs/takepos/phone.php
@@ -346,7 +346,7 @@ function CheckPlease(payment){
global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") {
+ if (getDolGlobalString('TAKEPOS_NUM_TERMINALS') != "1" && $_SESSION["takeposterminal"] == "") {
print ' '.$langs->trans('TerminalSelect').' ';
} ?>
diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php
index ab49c635524..802908746c7 100644
--- a/htdocs/theme/eldy/btn.inc.php
+++ b/htdocs/theme/eldy/btn.inc.php
@@ -17,7 +17,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
global->THEME_DARKMODEENABLED != 2) {
+ if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2) {
print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
} else {
print "@media not print {";
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 43e58d9756c..d7491e6de4c 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -65,7 +65,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
global->THEME_DARKMODEENABLED != 2) {
+ if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2) {
print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
} else {
print "@media not print {";
@@ -5175,7 +5175,7 @@ div.ui-tooltip.mytooltip {
global->THEME_DARKMODEENABLED != 2) {
+ if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2) {
print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
} else {
print "@media not print {";
diff --git a/htdocs/theme/md/btn.inc.php b/htdocs/theme/md/btn.inc.php
index 9ddecc98587..70104df5df1 100644
--- a/htdocs/theme/md/btn.inc.php
+++ b/htdocs/theme/md/btn.inc.php
@@ -17,7 +17,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
global->THEME_DARKMODEENABLED != 2) {
+ if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2) {
print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
} else {
print "@media not print {";
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index eec0363d8dc..418d8635049 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -373,7 +373,7 @@ print '*/'."\n";
global->THEME_DARKMODEENABLED != 2) {
+ if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2) {
print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
} else {
print "@media not print {";
diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php
index 5b0b1a9b9e0..011826f9095 100644
--- a/htdocs/ticket/index.php
+++ b/htdocs/ticket/index.php
@@ -57,7 +57,7 @@ $userid = $user->id;
$nowarray = dol_getdate(dol_now(), true);
$nowyear = $nowarray['year'];
$year = GETPOST('year', 'int') > 0 ? GETPOST('year', 'int') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
// Initialize objects
diff --git a/htdocs/ticket/stats/index.php b/htdocs/ticket/stats/index.php
index 57bb9d26ec5..bcc74cc0e0c 100644
--- a/htdocs/ticket/stats/index.php
+++ b/htdocs/ticket/stats/index.php
@@ -47,7 +47,7 @@ if ($user->socid > 0) {
$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear;
-$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
+$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
$endyear = $year;
// Load translation files required by the page
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 58e5650be1f..16a1eeddcfc 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -3253,7 +3253,7 @@ class User extends CommonObject
$keymodified = false;
// Object classes
- $info["objectclass"] = explode(',', $conf->global->LDAP_USER_OBJECT_CLASS);
+ $info["objectclass"] = explode(',', getDolGlobalString('LDAP_USER_OBJECT_CLASS'));
$this->fullname = $this->getFullName($langs);
@@ -3325,7 +3325,7 @@ class User extends CommonObject
if (getDolGlobalString('LDAP_FIELD_PASSWORD_CRYPTED')) {
$info[getDolGlobalString('LDAP_FIELD_PASSWORD_CRYPTED')] = dol_hash($this->pass, 'openldap'); // Create OpenLDAP password (see LDAP_PASSWORD_HASH_TYPE)
}
- } elseif ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') {
+ } elseif (getDolGlobalString('LDAP_SERVER_PROTOCOLVERSION') !== '3') {
// Set LDAP password if possible
// If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password
if (getDolGlobalString('DATABASE_PWD_ENCRYPTED')) {
diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php
index 99ca4fbc593..a96028a5993 100644
--- a/htdocs/user/class/usergroup.class.php
+++ b/htdocs/user/class/usergroup.class.php
@@ -922,7 +922,7 @@ class UserGroup extends CommonObject
$info = array();
// Object classes
- $info["objectclass"] = explode(',', $conf->global->LDAP_GROUP_OBJECT_CLASS);
+ $info["objectclass"] = explode(',', getDolGlobalString('LDAP_GROUP_OBJECT_CLASS'));
// Champs
if ($this->name && getDolGlobalString('LDAP_GROUP_FIELD_FULLNAME')) {
|