Fix warning with rector

This commit is contained in:
Laurent Destailleur 2023-12-13 15:20:53 +01:00
commit fb083a6cfc
167 changed files with 226 additions and 226 deletions

View File

@ -145,14 +145,14 @@ print '</td></tr>';
print '<tr class="oddeven">';
print '<td class="fieldrequired">'.$langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT").'</td>';
print '<td>';
print '<input type="text" size="100" id="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT" name="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT" value="' . dol_escape_htmltag($conf->global->ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT). '">';
print '<input type="text" size="100" id="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT" name="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT" value="' . dol_escape_htmltag(getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT')). '">';
print '</td></tr>';
// Accounting groups used for the income statement
print '<tr class="oddeven">';
print '<td class="fieldrequired">'.$langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT").'</td>';
print '<td>';
print '<input type="text" size="100" id="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT" name="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT" value="' . dol_escape_htmltag($conf->global->ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT). '">';
print '<input type="text" size="100" id="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT" name="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT" value="' . dol_escape_htmltag(getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')). '">';
print '</td></tr>';
print "</table>\n";

View File

@ -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');
/*

View File

@ -460,7 +460,7 @@ print '</td></tr>'."\n";
print '<tr class="oddeven"><td class="wordbreak"><label for="state_id">'.$langs->trans("State").'</label></td><td>';
$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"');

View File

@ -128,11 +128,11 @@ foreach ($listofnetworks as $key => $value) {
$networkconstname = 'MAIN_INFO_SOCIETE_'.strtoupper($key).'_URL';
$networkconstid = 'MAIN_INFO_SOCIETE_'.strtoupper($key);
print '<td class="nowraponall"><span class="paddingright fab '.($value['icon'] ? $value['icon'] : 'fa-link').'"></span>';
print '<input name="'.$key.'" id="'.$key.'" class="minwidth300" value="'.(!empty($conf->global->$networkconstid) ? dol_escape_htmltag($conf->global->$networkconstid) : '').'">';
print '<input name="'.$key.'" id="'.$key.'" class="minwidth300" value="'.(!empty($conf->global->$networkconstid) ? dol_escape_htmltag(getDolGlobalString($networkconstid)) : '').'">';
print '</td><td>';
print '<input name="'.$key.'url" id="'.$key.'url" class="minwidth300" value="'.(!empty($conf->global->$networkconstname) ? dol_escape_htmltag($conf->global->$networkconstname) : '').'">';
print '<input name="'.$key.'url" id="'.$key.'url" class="minwidth300" value="'.(!empty($conf->global->$networkconstname) ? dol_escape_htmltag(getDolGlobalString($networkconstname)) : '').'">';
print '</td>';
print '<td class="nowraponall">'.dol_print_socialnetworks((!empty($conf->global->$networkconstid) ? dol_escape_htmltag($conf->global->$networkconstid) : ''), 0, 0, $key, $listofnetworks).'</td>';
print '<td class="nowraponall">'.dol_print_socialnetworks((!empty($conf->global->$networkconstid) ? dol_escape_htmltag(getDolGlobalString($networkconstid)) : ''), 0, 0, $key, $listofnetworks).'</td>';
print '</tr>'."\n";
}
}

View File

@ -286,7 +286,7 @@ if ($action == 'edit') {
print '<br>';
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 '<span class="opacitymedium">'.$langs->trans("DescWeather").'</span> ';

View File

@ -262,13 +262,13 @@ if ($resql) {
print '<tr class="oddeven">';
print '<td class="titlefield">'.$langs->trans("Title")."</td>";
print '<td><input type="text" class="flat minwidth300" name="external_rss_title_'.$idrss.'" value="'.dol_escape_htmltag($conf->global->$keyrsstitle).'"></td>';
print '<td><input type="text" class="flat minwidth300" name="external_rss_title_'.$idrss.'" value="'.dol_escape_htmltag(getDolGlobalString($keyrsstitle)).'"></td>';
print '</tr>'."\n";
print '<tr class="oddeven">';
print "<td>".$langs->trans("URL")."</td>";
print '<td><input type="text" class="flat minwidth300" name="external_rss_urlrss_'.$idrss.'" value="'.dol_escape_htmltag($conf->global->$keyrssurl).'"></td>';
print '<td><input type="text" class="flat minwidth300" name="external_rss_urlrss_'.$idrss.'" value="'.dol_escape_htmltag(getDolGlobalString($keyrssurl)).'"></td>';
print '</tr>'."\n";

View File

@ -918,7 +918,7 @@ if ($action == 'edit') {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").'</td>';
print '<td>';
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) {

View File

@ -533,7 +533,7 @@ if ($action == 'edit') {
}
print '</td></tr>';
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 '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").'</td><td>'.$langs->trans("SeeLocalSendMailSetup").'</td></tr>';
@ -653,8 +653,8 @@ if ($action == 'edit') {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
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 '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=testconnect">' . $langs->trans("DoTestServerAvailability") . '</a>';
}

View File

@ -510,7 +510,7 @@ if ($action == 'edit') {
}
print '</td></tr>';
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 '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").'</td><td>'.$langs->trans("SeeLocalSendMailSetup").'</td></tr>';
@ -615,8 +615,8 @@ if ($action == 'edit') {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
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 '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testconnect">'.$langs->trans("DoTestServerAvailability").'</a>';
}

View File

@ -155,7 +155,7 @@ if (isset($max)) {
}
print '</td>';
print '<td class="nowrap">';
print '<input class="flat" name="MAIN_UPLOAD_DOC" type="text" size="6" value="'.dol_escape_htmltag($conf->global->MAIN_UPLOAD_DOC).'"> '.$langs->trans("Kb");
print '<input class="flat" name="MAIN_UPLOAD_DOC" type="text" size="6" value="'.dol_escape_htmltag(getDolGlobalString('MAIN_UPLOAD_DOC')).'"> '.$langs->trans("Kb");
print '</td>';
print '</tr>';
@ -165,7 +165,7 @@ print '<td>';
print $form->textwithpicto($langs->trans("UMask"), $langs->trans("UMaskExplanation"));
print '</td>';
print '<td class="nowrap">';
print '<input class="flat" name="MAIN_UMASK" type="text" size="6" value="'.dol_escape_htmltag($conf->global->MAIN_UMASK).'">';
print '<input class="flat" name="MAIN_UMASK" type="text" size="6" value="'.dol_escape_htmltag(getDolGlobalString('MAIN_UMASK')).'">';
print '</td>';
print '</tr>';
@ -200,7 +200,7 @@ print '<td>'.$langs->trans("AntiVirusParam").'<br>';
print '<span class="opacitymedium">'.$langs->trans("AntiVirusParamExample").'</span>';
print '</td>';
print '<td>';
print '<input type="text" '.(defined('MAIN_ANTIVIRUS_PARAM') ? 'disabled ' : '').'name="MAIN_ANTIVIRUS_PARAM" class="minwidth500imp" value="'.(getDolGlobalString('MAIN_ANTIVIRUS_PARAM') ? dol_escape_htmltag($conf->global->MAIN_ANTIVIRUS_PARAM) : '').'">';
print '<input type="text" '.(defined('MAIN_ANTIVIRUS_PARAM') ? 'disabled ' : '').'name="MAIN_ANTIVIRUS_PARAM" class="minwidth500imp" value="'.(getDolGlobalString('MAIN_ANTIVIRUS_PARAM') ? dol_escape_htmltag(getDolGlobalString('MAIN_ANTIVIRUS_PARAM')) : '').'">';
if (defined('MAIN_ANTIVIRUS_PARAM')) {
print '<br><span class="opacitymedium">'.$langs->trans("ValueIsForcedBySystem").'</span>';
}

View File

@ -627,13 +627,13 @@ print '<strong>MAIN_SECURITY_HASH_ALGO</strong> = '.getDolGlobalString('MAIN_SEC
if (!getDolGlobalString('MAIN_SECURITY_HASH_ALGO')) {
print '<span class="opacitymedium"> &nbsp; &nbsp; If unset: \'md5\'</span>';
}
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
if (getDolGlobalString('MAIN_SECURITY_HASH_ALGO') != 'password_hash') {
print '<br><strong>MAIN_SECURITY_SALT</strong> = '.getDolGlobalString('MAIN_SECURITY_SALT', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').'<br>';
} else {
print '<span class="opacitymedium">('.$langs->trans("Recommended").': password_hash)</span>';
print '<br>';
}
if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
if (getDolGlobalString('MAIN_SECURITY_HASH_ALGO') != 'password_hash') {
print '<div class="info">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.<br>';
print 'If you really want to switch, you must:<br>';
print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\'<br>';

View File

@ -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'));

View File

@ -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);

View File

@ -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) {

View File

@ -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 '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';

View File

@ -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;
}

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -416,7 +416,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
print '<td>';
$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;
}

View File

@ -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';

View File

@ -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;
}

View File

@ -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) {

View File

@ -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;

View File

@ -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();

View File

@ -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)) {

View File

@ -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);
}
}

View File

@ -2125,7 +2125,7 @@ class BonPrelevement extends CommonObject
$XML_DEBITOR .= ' <DrctDbtTxInf>'.$CrLf;
$XML_DEBITOR .= ' <PmtId>'.$CrLf;
// Add EndToEndId. Must be a unique ID for each payment (for example by including bank, buyer or seller, date, checksum)
$XML_DEBITOR .= ' <EndToEndId>'.(($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).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
$XML_DEBITOR .= ' <EndToEndId>'.((getDolGlobalString('PRELEVEMENT_END_TO_END') != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('DD-'.dol_trunc($row_idfac.'-'.$row_ref, 20, 'right', 'UTF-8', 1)).'-'.$Rowing).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
$XML_DEBITOR .= ' </PmtId>'.$CrLf;
$XML_DEBITOR .= ' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
$XML_DEBITOR .= ' <DrctDbtTx>'.$CrLf;
@ -2171,7 +2171,7 @@ class BonPrelevement extends CommonObject
$XML_CREDITOR .= ' <CdtTrfTxInf>'.$CrLf;
$XML_CREDITOR .= ' <PmtId>'.$CrLf;
// Add EndToEndId. Must be a unique ID for each payment (for example by including bank, buyer or seller, date, checksum)
$XML_CREDITOR .= ' <EndToEndId>'.(($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).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
$XML_CREDITOR .= ' <EndToEndId>'.((getDolGlobalString('PRELEVEMENT_END_TO_END') != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('CT-'.dol_trunc($row_idfac.'-'.$row_ref, 20, 'right', 'UTF-8', 1)).'-'.$Rowing).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
$XML_CREDITOR .= ' </PmtId>'.$CrLf;
if (!empty($this->sepa_xml_pti_in_ctti)) {
$XML_CREDITOR .= ' <PmtTpInf>' . $CrLf;

View File

@ -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);

View File

@ -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 = '';

View File

@ -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];

View File

@ -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';

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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);

View File

@ -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__') {

View File

@ -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

View File

@ -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);

View File

@ -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);
}

View File

@ -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)";
}

View File

@ -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)";
}
}

View File

@ -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;
}

View File

@ -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++;
}

View File

@ -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)) {

View File

@ -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 "<!-- JS CODE TO ENABLE for google analtics tag -->\n";

View File

@ -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;
}

View File

@ -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;

View File

@ -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.
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&amp;entity=1&amp;file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />

View File

@ -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;

View File

@ -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);
}

View File

@ -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');

View File

@ -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");

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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')));
}
}

View File

@ -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);
}

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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]);
}

View File

@ -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

View File

@ -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];

View File

@ -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)

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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')));
}
}

View File

@ -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

View File

@ -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')));
}
}

View File

@ -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')));
}
}

View File

@ -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

View File

@ -115,7 +115,7 @@ print "<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->\n";
if (getDolGlobalString('ADD_UNSPLASH_LOGIN_BACKGROUND')) {
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'?>
<body class="body bodylogin" style="background-image: url('<?php echo dol_escape_htmltag($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND); ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
<body class="body bodylogin" style="background-image: url('<?php echo dol_escape_htmltag(getDolGlobalString('ADD_UNSPLASH_LOGIN_BACKGROUND')); ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
<?php
} else {
?>
@ -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 "<!-- JS CODE TO ENABLE for google analtics tag -->\n";

View File

@ -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 "<!-- JS CODE TO ENABLE for google analtics tag -->\n";

View File

@ -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 "<!-- JS CODE TO ENABLE for google analtics tag -->\n";

View File

@ -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++;

View File

@ -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"));

View File

@ -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'));

Some files were not shown because too many files have changed in this diff Show More