diff --git a/dev/tools/rector/src/Renaming/GlobalToFunction.php b/dev/tools/rector/src/Renaming/GlobalToFunction.php index c5b1c7bfbc9..fd1a3d7dd66 100644 --- a/dev/tools/rector/src/Renaming/GlobalToFunction.php +++ b/dev/tools/rector/src/Renaming/GlobalToFunction.php @@ -140,7 +140,7 @@ class GlobalToFunction extends AbstractRector if ($node instanceof FuncCall) { $tmpfunctionname = $this->getName($node); // If function is ok. We must avoid a lot of cases like isset(), empty() - if (in_array($tmpfunctionname, array('dol_escape_htmltag', 'dol_hash', 'explode', 'length_accountg', 'length_accounta', 'make_substitutions', 'min', 'max', 'trunc', 'urlencode', 'yn'))) { + if (in_array($tmpfunctionname, array('dol_escape_htmltag', 'dol_hash', 'explode', 'is_numeric', 'length_accountg', 'length_accounta', 'make_substitutions', 'min', 'max', 'trunc', 'urlencode', 'yn'))) { //print "tmpfunctionname=".$tmpfunctionname."\n"; $args = $node->getArgs(); $nbofparam = count($args); @@ -170,7 +170,7 @@ class GlobalToFunction extends AbstractRector if ($node instanceof MethodCall) { $tmpmethodname = $this->getName($node->name); // If function is ok. We must avoid a lot of cases - if (in_array($tmpmethodname, array('idate', 'sanitize', 'select_language'))) { + if (in_array($tmpmethodname, array('fetch', 'idate', 'sanitize', 'select_language', 'trans'))) { //print "tmpmethodname=".$tmpmethodname."\n"; $expr = $node->var; $args = $node->getArgs(); diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index aaba332d2ef..1e35eebbed1 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -206,7 +206,7 @@ if (empty($reshook)) { } if ($action == 'export_csv') { - $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; + $sep = getDolGlobalString('ACCOUNTING_EXPORT_SEPARATORCSV'); $filename = 'balance'; $type_export = 'balance'; diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index e372ab9c206..06ab11b4f49 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -47,7 +47,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; */ class AccountancyExport { - // Type of export. Used into $conf->global->ACCOUNTING_EXPORT_MODELCSV + // Types of export. public static $EXPORT_TYPE_CONFIGURABLE = 1; // CSV public static $EXPORT_TYPE_AGIRIS = 10; public static $EXPORT_TYPE_EBP = 15; @@ -102,7 +102,7 @@ class AccountancyExport global $conf, $hookmanager; $this->db = $db; - $this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; + $this->separator = getDolGlobalString('ACCOUNTING_EXPORT_SEPARATORCSV'); $this->end_line = getDolGlobalString('ACCOUNTING_EXPORT_ENDLINE') ? (getDolGlobalInt('ACCOUNTING_EXPORT_ENDLINE') == 1 ? "\n" : "\r\n") : "\n"; $hookmanager->initHooks(array('accountancyexport')); @@ -869,11 +869,11 @@ class AccountancyExport if ($line->doc_type == 'customer_invoice') { $tab['lib_alpha'] = strtoupper(str_pad('C'.self::trunc(dol_string_unaccent($line->subledger_label), 6), 7)); $tab['filler'] = str_repeat(' ', 52); - $tab['coll_compte'] = str_pad(self::trunc($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, 8), 8); + $tab['coll_compte'] = str_pad(self::trunc(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), 8), 8); } elseif ($line->doc_type == 'supplier_invoice') { $tab['lib_alpha'] = strtoupper(str_pad('F'.self::trunc(dol_string_unaccent($line->subledger_label), 6), 7)); $tab['filler'] = str_repeat(' ', 52); - $tab['coll_compte'] = str_pad(self::trunc($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, 8), 8); + $tab['coll_compte'] = str_pad(self::trunc(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), 8), 8); } else { $tab['filler'] = str_repeat(' ', 59); $tab['coll_compte'] = str_pad(' ', 8); diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 637e2bc8f68..423ca2b4ddf 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -878,9 +878,9 @@ class AccountingAccount extends CommonObject if ($factureDet->desc == "(DEPOSIT)" || $facture->type == $facture::TYPE_DEPOSIT) { $accountdeposittoventilated = new self($this->db); if ($type == 'customer') { - $result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1); + $result = $accountdeposittoventilated->fetch('', getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT'), 1); } elseif ($type == 'supplier') { - $result = $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT, 1); + $result = $accountdeposittoventilated->fetch('', getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'), 1); } if (isset($result) && $result < 0) { return -1; @@ -901,9 +901,9 @@ class AccountingAccount extends CommonObject if ($facture->type == $facture::TYPE_CREDIT_NOTE && $invoiceSource->type == $facture::TYPE_DEPOSIT) { $accountdeposittoventilated = new self($this->db); if ($type == 'customer') { - $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1); + $accountdeposittoventilated->fetch('', getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT'), 1); } elseif ($type == 'supplier') { - $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT, 1); + $accountdeposittoventilated->fetch('', getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'), 1); } $code_l = $accountdeposittoventilated->ref; $code_p = ''; diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index dd8dd36e2c9..c8bc40560fe 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -930,7 +930,7 @@ class AccountingJournal extends CommonObject global $conf, $langs, $hookmanager; if (empty($sep)) { - $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; + $sep = getDolGlobalString('ACCOUNTING_EXPORT_SEPARATORCSV'); } $out = ''; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 11c00917743..4bd365acfa3 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -607,16 +607,16 @@ if (!$error && $action == 'writebookkeeping') { $now = dol_now(); $accountingaccountcustomer = new AccountingAccount($db); - $accountingaccountcustomer->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, true); + $accountingaccountcustomer->fetch(null, getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), true); $accountingaccountsupplier = new AccountingAccount($db); - $accountingaccountsupplier->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, true); + $accountingaccountsupplier->fetch(null, getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), true); $accountingaccountpayment = new AccountingAccount($db); - $accountingaccountpayment->fetch(null, $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT, true); + $accountingaccountpayment->fetch(null, getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT'), true); $accountingaccountsuspense = new AccountingAccount($db); - $accountingaccountsuspense->fetch(null, $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE, true); + $accountingaccountsuspense->fetch(null, getDolGlobalString('ACCOUNTING_ACCOUNT_SUSPENSE'), true); $error = 0; foreach ($tabpay as $key => $val) { // $key is rowid into llx_bank @@ -736,23 +736,23 @@ if (!$error && $action == 'writebookkeeping') { $lettering = true; $bookkeeping->subledger_account = $k; // For payment, the subledger account is stored as $key of $tabtp $bookkeeping->subledger_label = $tabcompany[$key]['name']; // $tabcompany is defined only if we are sure there is 1 thirdparty for the bank transaction - $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; + $bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'); $bookkeeping->label_compte = $accountingaccountcustomer->label; } elseif ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice $lettering = true; $bookkeeping->subledger_account = $k; // For payment, the subledger account is stored as $key of $tabtp $bookkeeping->subledger_label = $tabcompany[$key]['name']; // $tabcompany is defined only if we are sure there is 1 thirdparty for the bank transaction - $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; + $bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'); $bookkeeping->label_compte = $accountingaccountsupplier->label; } elseif ($tabtype[$key] == 'payment_expensereport') { $bookkeeping->subledger_account = $tabuser[$key]['accountancy_code']; $bookkeeping->subledger_label = $tabuser[$key]['name']; - $bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; + $bookkeeping->numero_compte = getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT'); $bookkeeping->label_compte = $accountingaccountpayment->label; } elseif ($tabtype[$key] == 'payment_salary') { $bookkeeping->subledger_account = $tabuser[$key]['accountancy_code']; $bookkeeping->subledger_label = $tabuser[$key]['name']; - $bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT; + $bookkeeping->numero_compte = getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT'); $bookkeeping->label_compte = $accountingaccountpayment->label; } elseif (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution $bookkeeping->subledger_account = ''; @@ -801,7 +801,7 @@ if (!$error && $action == 'writebookkeeping') { // Temporary account $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; - $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE; + $bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_SUSPENSE'); $bookkeeping->label_compte = $accountingaccountsuspense->label; } } @@ -1397,16 +1397,10 @@ if (empty($action) || $action == 'view') { print ''.$langs->trans("WaitAccountNotDefined").''; } else */ - print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE); + print length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_SUSPENSE')); print ""; // Subledger account print ""; - /*if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined') - { - print ''.$langs->trans("WaitAccountNotDefined").''; - } - else print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE); - */ print ""; print "".dol_escape_htmltag($reflabel).""; print ''.$val["type_payment"].""; diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index a1bf3006328..19d003d34e0 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -488,7 +488,7 @@ $userstatic = new User($db); // Export if ($action == 'exportcsv' && !$error) { // ISO and not UTF8 ! - $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; + $sep = getDolGlobalString('ACCOUNTING_EXPORT_SEPARATORCSV'); $filename = 'journal'; $type_export = 'journal'; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index a3bc6ce2ade..11a663780cc 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1817,7 +1817,7 @@ class Adherent extends CommonObject // Add line to draft invoice $idprodsubscription = 0; if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled("product") || isModEnabled("service"))) { - $idprodsubscription = $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS; + $idprodsubscription = getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS'); } $vattouse = 0; @@ -2169,7 +2169,7 @@ class Adherent extends CommonObject } } - if ($conf->global->ADHERENT_USE_SPIP && isModEnabled('mailmanspip')) { + if (getDolGlobalString('ADHERENT_USE_SPIP') && isModEnabled('mailmanspip')) { $result = $mailmanspip->del_to_spip($this); if ($result < 0) { $this->errors[] = $mailmanspip->error; @@ -2598,7 +2598,7 @@ class Adherent extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('ADHERENT_ADDON_PDF')) { - $modele = $conf->global->ADHERENT_ADDON_PDF; + $modele = getDolGlobalString('ADHERENT_ADDON_PDF'); } } @@ -2697,7 +2697,7 @@ class Adherent extends CommonObject $dn = getDolGlobalString('LDAP_KEY_MEMBERS') . "=".$info[getDolGlobalString('LDAP_KEY_MEMBERS')]."," . getDolGlobalString('LDAP_MEMBER_DN'); } if ($mode == 1) { - $dn = $conf->global->LDAP_MEMBER_DN; + $dn = getDolGlobalString('LDAP_MEMBER_DN'); } if ($mode == 2) { $dn = getDolGlobalString('LDAP_KEY_MEMBERS') . "=".$info[getDolGlobalString('LDAP_KEY_MEMBERS')]; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 511553b9e88..ff95d3c12c6 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -373,7 +373,7 @@ if ($user->hasRight('adherent', 'cotisation', 'creer') && $action == 'subscripti // Get email content from template $arraydefaultmessage = null; - $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION; + $labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION'); if (!empty($labeltouse)) { $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); @@ -869,7 +869,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h print "\n\n\n"; if ($conf->use_javascript_ajax) { - //var_dump($bankdirect.'-'.$bankviainvoice.'-'.$invoiceonly.'-'.empty($conf->global->ADHERENT_BANK_USE)); + //var_dump($bankdirect.'-'.$bankviainvoice.'-'.$invoiceonly); print "\n".''; } - } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) { + } elseif (!is_numeric(getDolGlobalString('HOLIDAY_HIDE_BALANCE'))) { print '
'; - print $langs->trans($conf->global->HOLIDAY_HIDE_BALANCE); + print $langs->trans(getDolGlobalString('HOLIDAY_HIDE_BALANCE')); print '
'; } @@ -1162,7 +1162,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { // Note: This use will be set only if the deinfed approvr has permission to approve so is inside include_users $defaultselectuser = (empty($user->fk_user_holiday_validator) ? $user->fk_user : $user->fk_user_holiday_validator); if (getDolGlobalString('HOLIDAY_DEFAULT_VALIDATOR')) { - $defaultselectuser = $conf->global->HOLIDAY_DEFAULT_VALIDATOR; // Can force default approver + $defaultselectuser = getDolGlobalString('HOLIDAY_DEFAULT_VALIDATOR'); // Can force default approver } if (GETPOST('valideur', 'int') > 0) { $defaultselectuser = GETPOST('valideur', 'int'); @@ -1349,8 +1349,8 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { print ''; print ''; $htmlhelp = $langs->trans('NbUseDaysCPHelp'); - $includesaturday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY : 1); - $includesunday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY : 1); + $includesaturday = getDolGlobalInt('MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY', 1); + $includesunday = getDolGlobalInt('MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY', 1); if ($includesaturday) { $htmlhelp .= '
'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday")); } diff --git a/htdocs/holiday/card_group.php b/htdocs/holiday/card_group.php index 4faa5734851..9c7bc6bbeeb 100644 --- a/htdocs/holiday/card_group.php +++ b/htdocs/holiday/card_group.php @@ -596,7 +596,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { // Note: This use will be set only if the deinfed approvr has permission to approve so is inside include_users $defaultselectuser = (empty($user->fk_user_holiday_validator) ? $user->fk_user : $user->fk_user_holiday_validator); if (getDolGlobalString('HOLIDAY_DEFAULT_VALIDATOR')) { - $defaultselectuser = $conf->global->HOLIDAY_DEFAULT_VALIDATOR; // Can force default approver + $defaultselectuser = getDolGlobalString('HOLIDAY_DEFAULT_VALIDATOR'); // Can force default approver } if (GETPOST('valideur', 'int') > 0) { $defaultselectuser = GETPOST('valideur', 'int'); @@ -710,12 +710,12 @@ function sendMail($id, $cancreate, $now, $autoValidation) $expediteur = new User($db); $expediteur->fetch($object->fk_user); //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. - $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; + $emailFrom = getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); // Subject - $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; + $societeName = getDolGlobalString('MAIN_INFO_SOCIETE_NOM'); if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { - $societeName = $conf->global->MAIN_APPLICATION_TITLE; + $societeName = getDolGlobalString('MAIN_APPLICATION_TITLE'); } $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysToValidate"); diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index ec8edbed091..24ccab79ffa 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -197,7 +197,7 @@ class Holiday extends CommonObject $mybool = false; $file = getDolGlobalString('HOLIDAY_ADDON') . ".php"; - $classname = $conf->global->HOLIDAY_ADDON; + $classname = getDolGlobalString('HOLIDAY_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index 41151aecbaf..e2d9feefa04 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -958,7 +958,7 @@ class Evaluation extends CommonObject $mybool = false; $file = getDolGlobalString('HRMTEST_EVALUATION_ADDON') . ".php"; - $classname = $conf->global->HRMTEST_EVALUATION_ADDON; + $classname = getDolGlobalString('HRMTEST_EVALUATION_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1020,7 +1020,7 @@ class Evaluation extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('EVALUATION_ADDON_PDF')) { - $modele = $conf->global->EVALUATION_ADDON_PDF; + $modele = getDolGlobalString('EVALUATION_ADDON_PDF'); } } diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index e4ae138a5f5..661202521ef 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -926,7 +926,7 @@ class EvaluationLine extends CommonObjectLine $mybool = false; $file = getDolGlobalString('hrm_EVALUATIONLINE_ADDON') . ".php"; - $classname = $conf->global->hrm_EVALUATIONLINE_ADDON; + $classname = getDolGlobalString('hrm_EVALUATIONLINE_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -989,7 +989,7 @@ class EvaluationLine extends CommonObjectLine if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('EVALUATIONLINE_ADDON_PDF')) { - $modele = $conf->global->EVALUATIONLINE_ADDON_PDF; + $modele = getDolGlobalString('EVALUATIONLINE_ADDON_PDF'); } } diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 9fb536f0fa9..09c0a81605b 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -965,7 +965,7 @@ class Job extends CommonObject $mybool = false; $file = getDolGlobalString('hrm_JOB_ADDON') . ".php"; - $classname = $conf->global->hrm_JOB_ADDON; + $classname = getDolGlobalString('hrm_JOB_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1028,7 +1028,7 @@ class Job extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('JOB_ADDON_PDF')) { - $modele = $conf->global->JOB_ADDON_PDF; + $modele = getDolGlobalString('JOB_ADDON_PDF'); } } diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index 127419f6ab3..e8978b9b8cd 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -1008,7 +1008,7 @@ class Position extends CommonObject $mybool = false; $file = getDolGlobalString('hrm_POSITION_ADDON') . ".php"; - $classname = $conf->global->hrm_POSITION_ADDON; + $classname = getDolGlobalString('hrm_POSITION_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1086,7 +1086,7 @@ class Position extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('POSITION_ADDON_PDF')) { - $modele = $conf->global->POSITION_ADDON_PDF; + $modele = getDolGlobalString('POSITION_ADDON_PDF'); } } diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 1961d4bfd0c..d9c6fc6772b 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -1007,7 +1007,7 @@ class Skill extends CommonObject $mybool = false; $file = getDolGlobalString('hrm_SKILL_ADDON') . ".php"; - $classname = $conf->global->hrm_SKILL_ADDON; + $classname = getDolGlobalString('hrm_SKILL_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1070,7 +1070,7 @@ class Skill extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('SKILL_ADDON_PDF')) { - $modele = $conf->global->SKILL_ADDON_PDF; + $modele = getDolGlobalString('SKILL_ADDON_PDF'); } } diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php index 7a96a2d8230..aff9292cac4 100644 --- a/htdocs/hrm/class/skilldet.class.php +++ b/htdocs/hrm/class/skilldet.class.php @@ -894,7 +894,7 @@ class Skilldet extends CommonObjectLine $mybool = false; $file = getDolGlobalString('hrm_SKILLDET_ADDON') . ".php"; - $classname = $conf->global->hrm_SKILLDET_ADDON; + $classname = getDolGlobalString('hrm_SKILLDET_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -957,7 +957,7 @@ class Skilldet extends CommonObjectLine if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('SKILLDET_ADDON_PDF')) { - $modele = $conf->global->SKILLDET_ADDON_PDF; + $modele = getDolGlobalString('SKILLDET_ADDON_PDF'); } } diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index 27fd705a127..07e3b47d189 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -968,7 +968,7 @@ class SkillRank extends CommonObject $mybool = false; $file = getDolGlobalString('hrm_SKILLRANK_ADDON') . ".php"; - $classname = $conf->global->hrm_SKILLRANK_ADDON; + $classname = getDolGlobalString('hrm_SKILLRANK_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1031,7 +1031,7 @@ class SkillRank extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('SKILLRANK_ADDON_PDF')) { - $modele = $conf->global->SKILLRANK_ADDON_PDF; + $modele = getDolGlobalString('SKILLRANK_ADDON_PDF'); } } diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index 1c5a730e5ca..d879cf0dea9 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -128,7 +128,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); diff --git a/htdocs/hrm/evaluation_agenda.php b/htdocs/hrm/evaluation_agenda.php index 2a2e47d999d..44437c1a6fa 100644 --- a/htdocs/hrm/evaluation_agenda.php +++ b/htdocs/hrm/evaluation_agenda.php @@ -140,7 +140,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung'; llxHeader('', $title, $help_url); diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index dbcca1b50d4..1c05ce8b7cc 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -179,8 +179,8 @@ if (isModEnabled('holiday')) { print ''; print ''; print '
'; - } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) { - print $langs->trans($conf->global->HOLIDAY_HIDE_BALANCE).'
'; + } elseif (!is_numeric(getDolGlobalString('HOLIDAY_HIDE_BALANCE'))) { + print $langs->trans(getDolGlobalString('HOLIDAY_HIDE_BALANCE')).'
'; } } diff --git a/htdocs/hrm/job_agenda.php b/htdocs/hrm/job_agenda.php index 6345d087041..671d10c8a74 100644 --- a/htdocs/hrm/job_agenda.php +++ b/htdocs/hrm/job_agenda.php @@ -138,7 +138,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung'; llxHeader('', $title, $help_url); diff --git a/htdocs/hrm/position_agenda.php b/htdocs/hrm/position_agenda.php index 8947203fe60..1a8ec59f936 100644 --- a/htdocs/hrm/position_agenda.php +++ b/htdocs/hrm/position_agenda.php @@ -141,7 +141,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung'; llxHeader('', $title, $help_url); diff --git a/htdocs/hrm/skill_agenda.php b/htdocs/hrm/skill_agenda.php index 5302783a2ec..a2899731f8d 100644 --- a/htdocs/hrm/skill_agenda.php +++ b/htdocs/hrm/skill_agenda.php @@ -140,7 +140,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung'; llxHeader('', $title, $help_url); diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index b3159796514..0117a3cfd38 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -646,7 +646,7 @@ if ($step == 3 && $datatoimport) { print ''; $out = ''; if (getDolGlobalString('MAIN_UPLOAD_DOC')) { - $max = $conf->global->MAIN_UPLOAD_DOC; // In Kb + $max = getDolGlobalString('MAIN_UPLOAD_DOC'); // In Kb $maxphp = @ini_get('upload_max_filesize'); // In unknown if (preg_match('/k$/i', $maxphp)) { $maxphp = (int) substr($maxphp, 0, -1); diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index bd6646ffe37..90723a905d3 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -257,7 +257,7 @@ class IntracommReport extends CommonObject if ($exporttype == 'deb' && getDolGlobalInt('INTRACOMMREPORT_CATEG_FRAISDEPORT') > 0) { $categ_fraisdeport = new Categorie($this->db); - $categ_fraisdeport->fetch($conf->global->INTRACOMMREPORT_CATEG_FRAISDEPORT); + $categ_fraisdeport->fetch(getDolGlobalString('INTRACOMMREPORT_CATEG_FRAISDEPORT')); $TLinesFraisDePort = array(); } diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index 390ccf22287..fc1be7ed0b1 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -1007,7 +1007,7 @@ class KnowledgeRecord extends CommonObject $mybool = false; $file = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADDON') . ".php"; - $classname = $conf->global->KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADDON; + $classname = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1070,7 +1070,7 @@ class KnowledgeRecord extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('KNOWLEDGERECORD_ADDON_PDF')) { - $modele = $conf->global->KNOWLEDGERECORD_ADDON_PDF; + $modele = getDolGlobalString('KNOWLEDGERECORD_ADDON_PDF'); } } diff --git a/htdocs/knowledgemanagement/knowledgerecord_agenda.php b/htdocs/knowledgemanagement/knowledgerecord_agenda.php index fadb2ccde95..3d4445518ee 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_agenda.php +++ b/htdocs/knowledgemanagement/knowledgerecord_agenda.php @@ -128,7 +128,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index ce19af91590..dac31532f50 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -61,7 +61,7 @@ $searchCategoryKnowledgemanagementOperator = 0; if (GETPOSTISSET('formfilteraction')) { $searchCategoryKnowledgemanagementOperator = GETPOST('search_category_knowledgemanagement_operator', 'int'); } elseif (getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT')) { - $searchCategoryKnowledgemanagementOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT; + $searchCategoryKnowledgemanagementOperator = getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT'); } // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index fe5d5f42362..a51210c3b66 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -111,7 +111,7 @@ $FILEFLAG = 'modulebuilder.txt'; $now = dol_now(); $newmask = 0; if (empty($newmask) && getDolGlobalString('MAIN_UMASK')) { - $newmask = $conf->global->MAIN_UMASK; + $newmask = getDolGlobalString('MAIN_UMASK'); } if (empty($newmask)) { // This should no happen $newmask = '0664'; @@ -3663,7 +3663,7 @@ if ($module == 'initmodule') { print ''; print ''; print ''; - print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'newlangcode', 0, 0, 1, 0, 0, 'minwidth300', 1); + print $formadmin->select_language(getDolGlobalString('MAIN_LANG_DEFAULT'), 'newlangcode', 0, 0, 1, 0, 0, 'minwidth300', 1); print '
'; print ''; diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index d1d7523acd9..09a8fe10f2c 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -975,7 +975,7 @@ class Mo extends CommonObject $mybool = false; $file = getDolGlobalString('MRP_MO_ADDON') . ".php"; - $classname = $conf->global->MRP_MO_ADDON; + $classname = getDolGlobalString('MRP_MO_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1625,7 +1625,7 @@ class Mo extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('MO_ADDON_PDF')) { - $modele = $conf->global->MO_ADDON_PDF; + $modele = getDolGlobalString('MO_ADDON_PDF'); } } diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php index 755d1f2fbf1..68d0f6b9f32 100644 --- a/htdocs/mrp/mo_agenda.php +++ b/htdocs/mrp/mo_agenda.php @@ -131,7 +131,7 @@ $formproject = new FormProjets($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:|DE:Modul_Terminplanung'; llxHeader('', $title, $help_url); diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index 3f8e6b176d8..4496eb0d7dc 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -1194,7 +1194,7 @@ class Partnership extends CommonObject $mybool = false; $file = getDolGlobalString('PARTNERSHIP_ADDON') . ".php"; - $classname = $conf->global->PARTNERSHIP_ADDON; + $classname = getDolGlobalString('PARTNERSHIP_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1257,7 +1257,7 @@ class Partnership extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('PARTNERSHIP_ADDON_PDF')) { - $modele = $conf->global->PARTNERSHIP_ADDON_PDF; + $modele = getDolGlobalString('PARTNERSHIP_ADDON_PDF'); } } diff --git a/htdocs/partnership/class/partnershiputils.class.php b/htdocs/partnership/class/partnershiputils.class.php index 14608039100..3876b5e6bdd 100644 --- a/htdocs/partnership/class/partnershiputils.class.php +++ b/htdocs/partnership/class/partnershiputils.class.php @@ -82,7 +82,7 @@ class PartnershipUtils $this->error = ''; $partnershipsprocessed = array(); - $gracedelay = $conf->global->PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL; + $gracedelay = getDolGlobalString('PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL'); if ($gracedelay < 1) { $this->error = 'BadValueForDelayBeforeCancelCheckSetup'; return -1; diff --git a/htdocs/partnership/partnership_agenda.php b/htdocs/partnership/partnership_agenda.php index a48b03f8c46..e21f9e8b10b 100644 --- a/htdocs/partnership/partnership_agenda.php +++ b/htdocs/partnership/partnership_agenda.php @@ -142,7 +142,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index 16d574d71eb..103c46171b0 100644 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -45,15 +45,15 @@ function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG) // Clean parameters $PBX_IDENTIFIANT = "2"; // Identifiant pour v2 test if (getDolGlobalString('PAYBOX_PBX_IDENTIFIANT')) { - $PBX_IDENTIFIANT = $conf->global->PAYBOX_PBX_IDENTIFIANT; + $PBX_IDENTIFIANT = getDolGlobalString('PAYBOX_PBX_IDENTIFIANT'); } $IBS_SITE = "1999888"; // Site test if (getDolGlobalString('PAYBOX_IBS_SITE')) { - $IBS_SITE = $conf->global->PAYBOX_IBS_SITE; + $IBS_SITE = getDolGlobalString('PAYBOX_IBS_SITE'); } $IBS_RANG = "99"; // Rang test if (getDolGlobalString('PAYBOX_IBS_RANG')) { - $IBS_RANG = $conf->global->PAYBOX_IBS_RANG; + $IBS_RANG = getDolGlobalString('PAYBOX_IBS_RANG'); } $IBS_DEVISE = "840"; // Currency (Dollar US by default) if ($CURRENCY == 'EUR') { @@ -65,10 +65,10 @@ function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG) $URLPAYBOX = ""; if ($conf->global->PAYBOX_CGI_URL_V1) { - $URLPAYBOX = $conf->global->PAYBOX_CGI_URL_V1; + $URLPAYBOX = getDolGlobalString('PAYBOX_CGI_URL_V1'); } if ($conf->global->PAYBOX_CGI_URL_V2) { - $URLPAYBOX = $conf->global->PAYBOX_CGI_URL_V2; + $URLPAYBOX = getDolGlobalString('PAYBOX_CGI_URL_V2'); } if (empty($IBS_DEVISE)) { @@ -124,7 +124,7 @@ function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG) $IBS_OUTPUT = 'E'; $PBX_SOURCE = 'HTML'; $PBX_TYPEPAIEMENT = 'CARTE'; - $PBX_HASH = $conf->global->PAYBOX_HASH; + $PBX_HASH = getDolGlobalString('PAYBOX_HASH'); $PBX_TIME = dol_print_date(dol_now(), 'dayhourrfc', 'gmt'); $msg = "PBX_IDENTIFIANT=".$PBX_IDENTIFIANT. diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index ec786f6ce6b..a7d5862fae2 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -224,7 +224,7 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $nvpstr = $nvpstr."&SOLUTIONTYPE=".urlencode($solutionType); $nvpstr = $nvpstr."&LANDINGPAGE=".urlencode($landingPage); if (getDolGlobalString('PAYPAL_CUSTOMER_SERVICE_NUMBER')) { - $nvpstr = $nvpstr."&CUSTOMERSERVICENUMBER=".urlencode($conf->global->PAYPAL_CUSTOMER_SERVICE_NUMBER); // Hotline phone number + $nvpstr = $nvpstr."&CUSTOMERSERVICENUMBER=".urlencode(getDolGlobalString('PAYPAL_CUSTOMER_SERVICE_NUMBER')); // Hotline phone number } $paypalprefix = 'PAYMENTREQUEST_0_'; @@ -273,10 +273,10 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $nvpstr = $nvpstr."&LOGOIMG=".urlencode($urllogo); } if (getDolGlobalString('PAYPAL_BRANDNAME')) { - $nvpstr = $nvpstr."&BRANDNAME=".urlencode($conf->global->PAYPAL_BRANDNAME); // BRANDNAME + $nvpstr = $nvpstr."&BRANDNAME=".urlencode(getDolGlobalString('PAYPAL_BRANDNAME')); // BRANDNAME } if (getDolGlobalString('PAYPAL_NOTETOBUYER')) { - $nvpstr = $nvpstr."&NOTETOBUYER=".urlencode($conf->global->PAYPAL_NOTETOBUYER); // PAYPAL_NOTETOBUYER + $nvpstr = $nvpstr."&NOTETOBUYER=".urlencode(getDolGlobalString('PAYPAL_NOTETOBUYER')); // PAYPAL_NOTETOBUYER } $_SESSION["FinalPaymentAmt"] = $paymentAmount; @@ -468,19 +468,19 @@ function hash_call($methodName, $nvpStr) // Clean parameters $PAYPAL_API_USER = ""; if (getDolGlobalString('PAYPAL_API_USER')) { - $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; + $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); } $PAYPAL_API_PASSWORD = ""; if (getDolGlobalString('PAYPAL_API_PASSWORD')) { - $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; + $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); } $PAYPAL_API_SIGNATURE = ""; if (getDolGlobalString('PAYPAL_API_SIGNATURE')) { - $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; + $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); } $PAYPAL_API_SANDBOX = ""; if (getDolGlobalString('PAYPAL_API_SANDBOX')) { - $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; + $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); } // TODO END problem with triggers diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index 0403f2c2735..8ea276f56b4 100644 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -58,24 +58,24 @@ if (getDolGlobalString('PAYPAL_API_SANDBOX') || GETPOST('forcesandbox', 'alpha') // Clean parameters $PAYPAL_API_USER = ""; if (getDolGlobalString('PAYPAL_API_USER')) { - $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; + $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); } $PAYPAL_API_PASSWORD = ""; if (getDolGlobalString('PAYPAL_API_PASSWORD')) { - $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; + $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); } $PAYPAL_API_SIGNATURE = ""; if (getDolGlobalString('PAYPAL_API_SIGNATURE')) { - $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; + $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); } $PAYPAL_API_SANDBOX = ""; if (getDolGlobalString('PAYPAL_API_SANDBOX')) { - $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; + $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); } // Proxy -$PROXY_HOST = $conf->global->MAIN_PROXY_HOST; -$PROXY_PORT = $conf->global->MAIN_PROXY_PORT; -$PROXY_USER = $conf->global->MAIN_PROXY_USER; -$PROXY_PASS = $conf->global->MAIN_PROXY_PASS; +$PROXY_HOST = getDolGlobalString('MAIN_PROXY_HOST'); +$PROXY_PORT = getDolGlobalString('MAIN_PROXY_PORT'); +$PROXY_USER = getDolGlobalString('MAIN_PROXY_USER'); +$PROXY_PASS = getDolGlobalString('MAIN_PROXY_PASS'); $USE_PROXY = !getDolGlobalString('MAIN_PROXY_USE') ? false : true; diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index 561c8d48e90..2c2857cd061 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -167,7 +167,7 @@ for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { // Label of price $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; if (!empty($conf->global->$keyforlabel)) { - print ' - '.$langs->trans($conf->global->$keyforlabel); + print ' - '.$langs->trans(getDolGlobalString($keyforlabel)); } ?> diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 119adf48a03..9121960301d 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -2076,7 +2076,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio } else { $fk_barcode_type = $object->barcode_type; if (empty($fk_barcode_type) && getDolGlobalString('PRODUIT_DEFAULT_BARCODE_TYPE')) { - $fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; + $fk_barcode_type = getDolGlobalString('PRODUIT_DEFAULT_BARCODE_TYPE'); } } require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index b6ec2cb629f..44eb2313ece 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -309,7 +309,7 @@ class FormProduct if (strpos($htmlname, 'search_') !== 0) { if (empty($user->fk_warehouse) || $user->fk_warehouse == -1) { if (is_scalar($selected) && ($selected == '-2' || $selected == 'ifone') && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE')) { - $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; + $selected = getDolGlobalString('MAIN_DEFAULT_WAREHOUSE'); } } else { if (is_scalar($selected) && ($selected == '-2' || $selected == 'ifone') && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE_USER')) { @@ -431,7 +431,7 @@ class FormProduct if (strpos($htmlname, 'search_') !== 0) { if (empty($user->fk_workstation) || $user->fk_workstation == -1) { if (($selected == '-2' || $selected == 'ifone') && getDolGlobalString('MAIN_DEFAULT_WORKSTATION')) { - $selected = $conf->global->MAIN_DEFAULT_WORKSTATION; + $selected = getDolGlobalString('MAIN_DEFAULT_WORKSTATION'); } } else { if (($selected == '-2' || $selected == 'ifone') && getDolGlobalString('MAIN_DEFAULT_WORKSTATION')) { diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 4a5b413177d..c32dc6f393b 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1165,7 +1165,7 @@ class Product extends CommonObject //$valueforundefinedlot = 'Undefined'; // In previous version, 39 and lower $valueforundefinedlot = '000000'; if (getDolGlobalString('STOCK_DEFAULT_BATCH')) { - $valueforundefinedlot = $conf->global->STOCK_DEFAULT_BATCH; + $valueforundefinedlot = getDolGlobalString('STOCK_DEFAULT_BATCH'); } dol_syslog("Flag batch of product id=".$this->id." is set to ON, so we will create missing records into product_batch"); @@ -6213,7 +6213,7 @@ class Product extends CommonObject break; } } - $var = $conf->global->BARCODE_PRODUCT_ADDON_NUM; + $var = getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM'); $mod = new $var(); $result = $mod->getNextValue($object, $type); diff --git a/htdocs/product/class/productfournisseurprice.class.php b/htdocs/product/class/productfournisseurprice.class.php index a8b2f56c553..2c03c4187b4 100644 --- a/htdocs/product/class/productfournisseurprice.class.php +++ b/htdocs/product/class/productfournisseurprice.class.php @@ -805,7 +805,7 @@ class ProductFournisseurPrice extends CommonObject $mybool = false; $file = getDolGlobalString('BUYPRICEHISTORY_PRODUCTFOURNISSEURPRICE_ADDON') . ".php"; - $classname = $conf->global->BUYPRICEHISTORY_PRODUCTFOURNISSEURPRICE_ADDON; + $classname = getDolGlobalString('BUYPRICEHISTORY_PRODUCTFOURNISSEURPRICE_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -868,7 +868,7 @@ class ProductFournisseurPrice extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('PRODUCTFOURNISSEURPRICE_ADDON_PDF')) { - $modele = $conf->global->PRODUCTFOURNISSEURPRICE_ADDON_PDF; + $modele = getDolGlobalString('PRODUCTFOURNISSEURPRICE_ADDON_PDF'); } } diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php index b97e589a001..2ff1de2a40f 100644 --- a/htdocs/product/inventory/list.php +++ b/htdocs/product/inventory/list.php @@ -96,7 +96,7 @@ $searchCategoryProductOperator = 0; if (GETPOSTISSET('formfilteraction')) { $searchCategoryProductOperator = GETPOST('search_category_product_operator', 'int'); } elseif (getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT')) { - $searchCategoryProductOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT; + $searchCategoryProductOperator = getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT'); } $searchCategoryProductList = GETPOST('search_category_product_list', 'array'); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 14cceee9c47..af66192f41a 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -83,7 +83,7 @@ $searchCategoryProductOperator = 0; if (GETPOSTISSET('formfilteraction')) { $searchCategoryProductOperator = GETPOSTINT('search_category_product_operator'); } elseif (getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT')) { - $searchCategoryProductOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT; + $searchCategoryProductOperator = getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT'); } $searchCategoryProductList = GETPOST('search_category_product_list', 'array'); $catid = GETPOST('catid', 'int'); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 122001ce2f6..86e896b3e9f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1078,7 +1078,7 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUS } else { print $langs->trans("SellingPrice").' '.$i; if (!empty($conf->global->$keyforlabel)) { - print ' - '.$langs->trans($conf->global->$keyforlabel); + print ' - '.$langs->trans(getDolGlobalString($keyforlabel)); } } print ''; @@ -1111,7 +1111,7 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUS if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { // TODO Fix the form included into a tr instead of a td print ''.$langs->trans("PriceByQuantity").' '.$i; if (!empty($conf->global->$keyforlabel)) { - print ' - '.$langs->trans($conf->global->$keyforlabel); + print ' - '.$langs->trans(getDolGlobalString($keyforlabel)); } print ''; @@ -1495,7 +1495,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) { $product->fetch($id, $ref, '', 1); //Ignore the math expression when getting the price print ''; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; if ($object->price_base_type == 'TTC') { print ''; @@ -1507,7 +1507,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) { // Price minimum print ''; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; if ($object->price_base_type == 'TTC') { print ''; @@ -1595,7 +1595,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) { print ''; $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; $text = $langs->trans('SellingPrice').' '.$i.' - '.getDolGlobalString($keyforlabel); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; // VAT @@ -1988,7 +1988,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { // Price print ''; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; if ($object->price_base_type == 'TTC') { print ''; @@ -2000,7 +2000,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { // Price minimum print ''; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); if ($object->price_base_type == 'TTC') { print ''; } else { @@ -2073,7 +2073,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { // Price print ''; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; if ($prodcustprice->price_base_type == 'TTC') { print ''; @@ -2085,7 +2085,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { // Price minimum print ''; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; if ($prodcustprice->price_base_type == 'TTC') { print ''; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 0101b3f1d56..00218170867 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -955,7 +955,7 @@ class Entrepot extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('STOCK_ADDON_PDF')) { - $modele = $conf->global->STOCK_ADDON_PDF; + $modele = getDolGlobalString('STOCK_ADDON_PDF'); } } diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index dfeda28018e..6a56ca01a36 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -1231,7 +1231,7 @@ class MouvementStock extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('MOUVEMENT_ADDON_PDF')) { - $modele = $conf->global->MOUVEMENT_ADDON_PDF; + $modele = getDolGlobalString('MOUVEMENT_ADDON_PDF'); } } diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 34204e86d5d..0867aadde04 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -1237,7 +1237,7 @@ class Productlot extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('PRODUCT_BATCH_ADDON_PDF')) { - $modele = $conf->global->PRODUCT_BATCH_ADDON_PDF; + $modele = getDolGlobalString('PRODUCT_BATCH_ADDON_PDF'); } } diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 697e886c2d3..22db69246e5 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -585,7 +585,7 @@ $out = (!getDolGlobalString('MAIN_UPLOAD_DOC') ? ' disabled' : ''); print ''; $out = ''; if (getDolGlobalString('MAIN_UPLOAD_DOC')) { - $max = $conf->global->MAIN_UPLOAD_DOC; // In Kb + $max = getDolGlobalString('MAIN_UPLOAD_DOC'); // In Kb $maxphp = @ini_get('upload_max_filesize'); // In unknown if (preg_match('/k$/i', $maxphp)) { $maxphp = preg_replace('/k$/i', '', $maxphp); @@ -688,7 +688,7 @@ if (getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { if (getDolGlobalInt('PRODUIT_LIMIT_SIZE') <= 0) { $limit = ''; } else { - $limit = $conf->global->PRODUIT_LIMIT_SIZE; + $limit = getDolGlobalString('PRODUIT_LIMIT_SIZE'); } print img_picto($langs->trans("Product"), 'product', 'class="paddingright"'); diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index d76dc386e5a..89a01ac56ea 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -981,7 +981,7 @@ class StockTransfer extends CommonObject $mybool = false; $file = getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADDON') . ".php"; - $classname = $conf->global->STOCKTRANSFER_STOCKTRANSFER_ADDON; + $classname = getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1044,7 +1044,7 @@ class StockTransfer extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('STOCKTRANSFER_ADDON_PDF')) { - $modele = $conf->global->STOCKTRANSFER_ADDON_PDF; + $modele = getDolGlobalString('STOCKTRANSFER_ADDON_PDF'); } } diff --git a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php index d00755525c4..83da40a6a52 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php @@ -936,7 +936,7 @@ class StockTransferLine extends CommonObjectLine $mybool = false; $file = getDolGlobalString('STOCKTRANSFER_STOCKTRANSFERLINE_ADDON') . ".php"; - $classname = $conf->global->STOCKTRANSFER_STOCKTRANSFERLINE_ADDON; + $classname = getDolGlobalString('STOCKTRANSFER_STOCKTRANSFERLINE_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -999,7 +999,7 @@ class StockTransferLine extends CommonObjectLine if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('STOCKTRANSFERLINE_ADDON_PDF')) { - $modele = $conf->global->STOCKTRANSFERLINE_ADDON_PDF; + $modele = getDolGlobalString('STOCKTRANSFERLINE_ADDON_PDF'); } } diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php b/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php index cdb6479e3af..4069721ba36 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php @@ -125,7 +125,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index 8720fc38f17..2ffacc95a9d 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -912,7 +912,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (getDolGlobalInt('PRODUIT_LIMIT_SIZE') <= 0) { $limit = ''; } else { - $limit = $conf->global->PRODUIT_LIMIT_SIZE; + $limit = getDolGlobalString('PRODUIT_LIMIT_SIZE'); } $form->select_produits($fk_product, 'fk_product', $filtertype, $limit, 0, -1, 2, '', 0, array(), 0, 0, 0, 'minwidth200imp maxwidth300', 1); diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 320a44adf54..3d70590a486 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -107,7 +107,7 @@ if ($object->element == 'product') { print ''; $ident = (GETPOST("dwid") ? GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ? GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))); if (empty($ident) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE')) { - $ident = $conf->global->MAIN_DEFAULT_WAREHOUSE; + $ident = getDolGlobalString('MAIN_DEFAULT_WAREHOUSE'); } print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100 maxwidth300 widthcentpercentminusx'); print ''; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 1d2b8416878..a7e90a287de 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -728,7 +728,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) { print ''; $filter = ''; if (getDolGlobalString('PROJECT_FILTER_FOR_THIRDPARTY_LIST')) { - $filter = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; + $filter = getDolGlobalString('PROJECT_FILTER_FOR_THIRDPARTY_LIST'); } $text = img_picto('', 'company').$form->select_company(GETPOST('socid', 'int'), 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusxx maxwidth500'); if (!getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') && empty($conf->dol_use_jmobile)) { @@ -1119,7 +1119,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) { print ''; $filter = ''; if (getDolGlobalString('PROJECT_FILTER_FOR_THIRDPARTY_LIST')) { - $filter = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; + $filter = getDolGlobalString('PROJECT_FILTER_FOR_THIRDPARTY_LIST'); } $text = img_picto('', 'company', 'class="pictofixedwidth"'); $text .= $form->select_company(!empty($object->thirdparty->id) ? $object->thirdparty->id : "", 'socid', $filter, 'None', 1, 0, array(), 0, 'minwidth300'); diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 67ec7156867..01a52a52436 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1380,7 +1380,7 @@ class Project extends CommonObject $result = ''; if (getDolGlobalString('PROJECT_OPEN_ALWAYS_ON_TAB')) { - $option = $conf->global->PROJECT_OPEN_ALWAYS_ON_TAB; + $option = getDolGlobalString('PROJECT_OPEN_ALWAYS_ON_TAB'); } $params = [ 'id' => $this->id, @@ -2058,7 +2058,7 @@ class Project extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('PROJECT_ADDON_PDF')) { - $modele = $conf->global->PROJECT_ADDON_PDF; + $modele = getDolGlobalString('PROJECT_ADDON_PDF'); } } diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 37e01f8d445..e04aa4cf676 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1313,7 +1313,7 @@ class Task extends CommonObjectLine $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); if ($this->timespent_date < $restrictBefore) { - $this->error = $langs->trans('TimeRecordingRestrictedToNMonthsBack', $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS); + $this->error = $langs->trans('TimeRecordingRestrictedToNMonthsBack', getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')); $this->errors[] = $this->error; return -1; } @@ -1757,7 +1757,7 @@ class Task extends CommonObjectLine $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); if ($this->timespent_date < $restrictBefore) { - $this->error = $langs->trans('TimeRecordingRestrictedToNMonthsBack', $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS); + $this->error = $langs->trans('TimeRecordingRestrictedToNMonthsBack', getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')); $this->errors[] = $this->error; return -1; } @@ -1858,7 +1858,7 @@ class Task extends CommonObjectLine $restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm'); if ($this->timespent_date < $restrictBefore) { - $this->error = $langs->trans('TimeRecordingRestrictedToNMonthsBack', $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS); + $this->error = $langs->trans('TimeRecordingRestrictedToNMonthsBack', getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')); $this->errors[] = $this->error; return -1; } @@ -2243,7 +2243,7 @@ class Task extends CommonObjectLine if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('PROJECT_TASK_ADDON_PDF')) { - $modele = $conf->global->PROJECT_TASK_ADDON_PDF; + $modele = getDolGlobalString('PROJECT_TASK_ADDON_PDF'); } } diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 1d28212c7e0..9ecc2ab8d2b 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -66,10 +66,10 @@ $pageprev = $page - 1; $pagenext = $page + 1; if (getDolGlobalString('MAIN_DOC_SORT_FIELD')) { - $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; + $sortfield = getDolGlobalString('MAIN_DOC_SORT_FIELD'); } if (getDolGlobalString('MAIN_DOC_SORT_ORDER')) { - $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; + $sortorder = getDolGlobalString('MAIN_DOC_SORT_ORDER'); } if (!$sortorder) { diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 1d5a8d85bd8..4f798f1437e 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -120,7 +120,7 @@ $searchCategoryCustomerOperator = 0; if (GETPOSTISSET('formfilteraction')) { $searchCategoryCustomerOperator = GETPOST('search_category_customer_operator', 'int'); } elseif (getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT')) { - $searchCategoryCustomerOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT; + $searchCategoryCustomerOperator = getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT'); } $searchCategoryCustomerList = GETPOST('search_category_customer_list', 'array'); if (getDolGlobalInt('PROJECT_ENABLE_SUB_PROJECT')) { diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index bfb7eb6d65c..7083ad95e3f 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -819,7 +819,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object- $cked_enabled = (getDolGlobalString('FCKEDITOR_ENABLE_SOCIETE') ? $conf->global->FCKEDITOR_ENABLE_SOCIETE : 0); $nbrows = 0; if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) { - $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT; + $nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT'); } $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows, '90%'); print $doleditor->Create(); diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 665d78ab614..561d2e36d03 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -75,7 +75,7 @@ $searchCategoryCustomerOperator = 0; if (GETPOSTISSET('formfilteraction')) { $searchCategoryCustomerOperator = GETPOST('search_category_customer_operator', 'int'); } elseif (getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT')) { - $searchCategoryCustomerOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT; + $searchCategoryCustomerOperator = getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT'); } $searchCategoryCustomerList = GETPOST('search_category_customer_list', 'array'); @@ -1112,10 +1112,10 @@ print ''."\n"; $plannedworkloadoutputformat = 'allhourmin'; $timespentoutputformat = 'allhourmin'; if (getDolGlobalString('PROJECT_PLANNED_WORKLOAD_FORMAT')) { - $plannedworkloadoutputformat = $conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT; + $plannedworkloadoutputformat = getDolGlobalString('PROJECT_PLANNED_WORKLOAD_FORMAT'); } if (getDolGlobalString('PROJECT_TIMES_SPENT_FORMAT')) { - $timespentoutputformat = $conf->global->PROJECT_TIME_SPENT_FORMAT; + $timespentoutputformat = getDolGlobalString('PROJECT_TIME_SPENT_FORMAT'); } // Loop on record diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index d484ab49ac1..9f285670b2b 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -131,7 +131,7 @@ if (GETPOST("actiontype", 'alpha')) { if (GETPOST("notolderthan", 'int')) { $filters['notolderthan'] = GETPOST("notolderthan", "int"); } else { - $filters['notolderthan'] = $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY; + $filters['notolderthan'] = getDolGlobalString('MAIN_AGENDA_EXPORT_PAST_DELAY'); } if (GETPOST("module", 'alpha')) { $filters['module'] = GETPOST("module", 'alpha'); @@ -250,7 +250,7 @@ $agenda = new ActionComm($db); $cachedelay = 0; if (getDolGlobalString('MAIN_AGENDA_EXPORT_CACHE')) { - $cachedelay = $conf->global->MAIN_AGENDA_EXPORT_CACHE; + $cachedelay = getDolGlobalString('MAIN_AGENDA_EXPORT_CACHE'); } $exportholidays = GETPOST('includeholidays', 'int'); diff --git a/htdocs/public/company/new.php b/htdocs/public/company/new.php index de5e4d4f179..5cf30de3bd9 100644 --- a/htdocs/public/company/new.php +++ b/htdocs/public/company/new.php @@ -243,7 +243,7 @@ if (empty($reshook) && $action == 'add') { if (!empty($backtopage)) { $urlback = $backtopage; } elseif (getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION')) { - $urlback = $conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION; + $urlback = getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION'); // TODO Make replacement of __AMOUNT__, etc... } else { $urlback = $_SERVER["PHP_SELF"] . "?action=added&token=" . newToken(); @@ -307,7 +307,7 @@ print '
'; print '
'; if (getDolGlobalString('COMPANY_NEWFORM_TEXT')) { - print $langs->trans($conf->global->COMPANY_NEWFORM_TEXT) . "
\n"; + print $langs->trans(getDolGlobalString('COMPANY_NEWFORM_TEXT')) . "
\n"; } else { print $langs->trans("ContactUsDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL")) . "
\n"; } diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index 8cc4f573e38..18dbf294ffd 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -516,7 +516,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen $resultprod = 0; if (getDolGlobalInt('SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION') > 0) { - $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION); + $resultprod = $productforinvoicerow->fetch(getDolGlobalString('SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION')); } // Create the draft invoice for the payment @@ -605,7 +605,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { $redirection .= '&securekey='.dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical } else { - $redirection .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + $redirection .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN')); } } @@ -650,7 +650,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); $sendto = $thirdparty->email; - $from = $conf->global->MAILING_EMAIL_FROM; + $from = getDolGlobalString('MAILING_EMAIL_FROM'); $urlback = $_SERVER["REQUEST_URI"]; $ishtml = dol_textishtml($texttosend); // May contain urls diff --git a/htdocs/public/eventorganization/subscriptionok.php b/htdocs/public/eventorganization/subscriptionok.php index 2baba1592f0..eddb0e1d5c8 100644 --- a/htdocs/public/eventorganization/subscriptionok.php +++ b/htdocs/public/eventorganization/subscriptionok.php @@ -179,9 +179,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { - $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; + $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); } //print ''."\n"; // Define urllogo diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index dc479c90cbd..b6f4025736d 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -360,7 +360,7 @@ if (empty($reshook) && $action == 'add') { $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage = null; - $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER; + $labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER'); if (!empty($labeltouse)) { $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); @@ -393,7 +393,7 @@ if (empty($reshook) && $action == 'add') { // Define link to login card $appli = constant('DOL_APPLICATION_TITLE'); if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { - $appli = $conf->global->MAIN_APPLICATION_TITLE; + $appli = getDolGlobalString('MAIN_APPLICATION_TITLE'); if (preg_match('/\d\.\d/', $appli)) { if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) { $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core @@ -439,7 +439,7 @@ if (empty($reshook) && $action == 'add') { if (!empty($backtopage)) { $urlback = $backtopage; } elseif (getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION')) { - $urlback = $conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION; + $urlback = getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION'); // TODO Make replacement of __AMOUNT__, etc... } else { $urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken(); @@ -457,7 +457,7 @@ if (empty($reshook) && $action == 'add') { $urlback .= '&email='.urlencode(GETPOST('email')); } if (getDolGlobalString('MEMBER_NEWFORM_PAYONLINE') != '-1' && getDolGlobalString('MEMBER_NEWFORM_PAYONLINE') != 'all') { - $urlback .= '&paymentmethod='.urlencode($conf->global->MEMBER_NEWFORM_PAYONLINE); + $urlback .= '&paymentmethod='.urlencode(getDolGlobalString('MEMBER_NEWFORM_PAYONLINE')); } } else { if (!empty($entity)) { @@ -522,7 +522,7 @@ print '
'; print '
'; if (getDolGlobalString('MEMBER_NEWFORM_TEXT')) { - print $langs->trans($conf->global->MEMBER_NEWFORM_TEXT)."
\n"; + print $langs->trans(getDolGlobalString('MEMBER_NEWFORM_TEXT'))."
\n"; } else { print $langs->trans("NewSubscriptionDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
\n"; } @@ -593,7 +593,7 @@ if (getDolGlobalString('MEMBER_SKIP_TABLE') || getDolGlobalString('MEMBER_NEWFOR print $form->selectarray("typeid", $adht->liste_array(1), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty); print ''."\n"; } else { - $adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE); + $adht->fetch(getDolGlobalString('MEMBER_NEWFORM_FORCETYPE')); print ''; } @@ -769,7 +769,7 @@ if (getDolGlobalString('MEMBER_SKIP_TABLE') || getDolGlobalString('MEMBER_NEWFOR $amount = empty($amountbytype[$typeid]) ? (isset($amount) ? $amount : 0) : $amountbytype[$typeid]; // - If not found, take the default amount only of the user is authorized to edit it if ($caneditamount && empty($amount) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) { - $amount = $conf->global->MEMBER_NEWFORM_AMOUNT; + $amount = getDolGlobalString('MEMBER_NEWFORM_AMOUNT'); } // - If not set, we accept ot have amount defined as parameter (for backward compatibility). if (empty($amount)) { @@ -787,7 +787,7 @@ if (getDolGlobalString('MEMBER_SKIP_TABLE') || getDolGlobalString('MEMBER_NEWFOR print ''; if (empty($amount) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) { - $amount = $conf->global->MEMBER_NEWFORM_AMOUNT; + $amount = getDolGlobalString('MEMBER_NEWFORM_AMOUNT'); } if ($caneditamount) { diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 7495c44d4a0..22a0557b4cc 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -262,9 +262,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_SIGN_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_SIGN_LOGO')) { - $logosmall = $conf->global->ONLINE_SIGN_LOGO; + $logosmall = getDolGlobalString('ONLINE_SIGN_LOGO'); } //print ''."\n"; // Define urllogo diff --git a/htdocs/public/opensurvey/index.php b/htdocs/public/opensurvey/index.php index 568e6374f95..4668789c9c0 100644 --- a/htdocs/public/opensurvey/index.php +++ b/htdocs/public/opensurvey/index.php @@ -135,9 +135,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_OPENSURVEY_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_OPENSURVEY_LOGO')) { - $logosmall = $conf->global->ONLINE_OPENSURVEY_LOGO_; + $logosmall = getDolGlobalString('ONLINE_OPENSURVEY_LOGO_'); } //print ''."\n"; // Define urllogo diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php index 73c2e3baa17..c8cc832b183 100644 --- a/htdocs/public/partnership/new.php +++ b/htdocs/public/partnership/new.php @@ -422,7 +422,7 @@ if (empty($reshook) && $action == 'add') { if (!empty($backtopage)) { $urlback = $backtopage; } elseif (getDolGlobalString('PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION')) { - $urlback = $conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION; + $urlback = getDolGlobalString('PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION'); // TODO Make replacement of __AMOUNT__, etc... } else { $urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken(); @@ -558,7 +558,7 @@ print '
'; print '
'; if (getDolGlobalString('PARTNERSHIP_NEWFORM_TEXT')) { - print $langs->trans($conf->global->PARTNERSHIP_NEWFORM_TEXT)."
\n"; + print $langs->trans(getDolGlobalString('PARTNERSHIP_NEWFORM_TEXT'))."
\n"; } else { print $langs->trans("NewPartnershipRequestDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
\n"; } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 4abd4485c34..121a39f9bf7 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -340,9 +340,9 @@ $creditor = $mysoc->name; $paramcreditor = 'ONLINE_PAYMENT_CREDITOR'; $paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix; if (!empty($conf->global->$paramcreditorlong)) { - $creditor = $conf->global->$paramcreditorlong; // use label long of the seller to show + $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show } elseif (!empty($conf->global->$paramcreditor)) { - $creditor = $conf->global->$paramcreditor; // use label short of the seller to show + $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show } $mesg = ''; @@ -433,7 +433,7 @@ if ($action == 'dopayment') { if ($paymentmethod == 'paybox') { $PRICE = price2num(GETPOST("newamount"), 'MT'); - $email = $conf->global->ONLINE_PAYMENT_SENDEMAIL; + $email = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL'); $thirdparty_id = GETPOST('thirdparty_id', 'int'); $origfulltag = GETPOST("fulltag", 'alpha'); @@ -892,9 +892,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { - $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; + $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); } //print ''."\n"; // Define urllogo @@ -1799,11 +1799,11 @@ if ($source == 'donation') { if (empty($valtoshow)) { if (getDolGlobalString('DONATION_NEWFORM_EDITAMOUNT')) { if (getDolGlobalString('DONATION_NEWFORM_AMOUNT')) { - $valtoshow = $conf->global->DONATION_NEWFORM_AMOUNT; + $valtoshow = getDolGlobalString('DONATION_NEWFORM_AMOUNT'); } } else { if (getDolGlobalString('DONATION_NEWFORM_AMOUNT')) { - $amount = $conf->global->DONATION_NEWFORM_AMOUNT; + $amount = getDolGlobalString('DONATION_NEWFORM_AMOUNT'); } } } diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 01fabbde20c..ac61888b738 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -167,7 +167,7 @@ if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice // Send an email $sendemail = ''; if (getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL')) { - $sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL; + $sendemail = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL'); } // Send warning of error to administrator @@ -230,9 +230,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { - $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; + $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); } //print ''."\n"; // Define urllogo diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 1a548dd382f..81544107d0d 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -70,19 +70,19 @@ $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", if (isModEnabled('paypal')) { $PAYPAL_API_USER = ""; if (getDolGlobalString('PAYPAL_API_USER')) { - $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; + $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); } $PAYPAL_API_PASSWORD = ""; if (getDolGlobalString('PAYPAL_API_PASSWORD')) { - $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; + $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); } $PAYPAL_API_SIGNATURE = ""; if (getDolGlobalString('PAYPAL_API_SIGNATURE')) { - $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; + $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); } $PAYPAL_API_SANDBOX = ""; if (getDolGlobalString('PAYPAL_API_SANDBOX')) { - $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; + $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); } $PAYPAL_API_OK = ""; if ($urlok) { @@ -212,9 +212,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { - $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; + $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); } //print ''."\n"; // Define urllogo @@ -436,13 +436,13 @@ if ($ispaymentok) { if ($result1 > 0 && $result2 > 0) { $paymentTypeId = 0; if ($paymentmethod == 'paybox') { - $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'paypal') { - $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'stripe') { - $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS'); } if (empty($paymentTypeId)) { dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment'); @@ -475,7 +475,7 @@ if ($ispaymentok) { $amountexpected = empty($amountbytype[$typeid]) ? 0 : $amountbytype[$typeid]; // - If not found, take the default amount if (empty($amountexpected) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) { - $amountexpected = $conf->global->MEMBER_NEWFORM_AMOUNT; + $amountexpected = getDolGlobalString('MEMBER_NEWFORM_AMOUNT'); } if ($amountexpected && $amountexpected != $FinalPaymentAmt) { @@ -557,13 +557,13 @@ if ($ispaymentok) { // Payment informations $accountid = 0; if ($paymentmethod == 'paybox') { - $accountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + $accountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($paymentmethod == 'paypal') { - $accountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + $accountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($paymentmethod == 'stripe') { - $accountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + $accountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($accountid < 0) { $error++; @@ -743,7 +743,7 @@ if ($ispaymentok) { $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage = null; - $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION; + $labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION'); if (!empty($labeltouse)) { $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); @@ -831,13 +831,13 @@ if ($ispaymentok) { $paymentTypeId = 0; if ($paymentmethod === 'paybox') { - $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod === 'paypal') { - $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod === 'stripe') { - $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS'); } if (empty($paymentTypeId)) { dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment'); @@ -896,11 +896,11 @@ if ($ispaymentok) { if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { - $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'paypal') { - $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'stripe') { - $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($bankaccountid > 0) { @@ -946,13 +946,13 @@ if ($ispaymentok) { $paymentTypeId = 0; if ($paymentmethod == 'paybox') { - $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'paypal') { - $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'stripe') { - $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS'); } if (empty($paymentTypeId)) { dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment'); @@ -1013,11 +1013,11 @@ if ($ispaymentok) { if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { - $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'paypal') { - $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'stripe') { - $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($bankaccountid > 0) { @@ -1069,13 +1069,13 @@ if ($ispaymentok) { if ($result) { $paymentTypeId = 0; if ($paymentmethod == 'paybox') { - $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'paypal') { - $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'stripe') { - $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS'); } if (empty($paymentTypeId)) { dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment'); @@ -1139,11 +1139,11 @@ if ($ispaymentok) { if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { - $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'paypal') { - $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'stripe') { - $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($bankaccountid > 0) { @@ -1190,13 +1190,13 @@ if ($ispaymentok) { if ($result) { $paymentTypeId = 0; if ($paymentmethod == 'paybox') { - $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'paypal') { - $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'stripe') { - $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS'); } if (empty($paymentTypeId)) { dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment'); @@ -1258,11 +1258,11 @@ if ($ispaymentok) { if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { - $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'paypal') { - $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'stripe') { - $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($bankaccountid > 0) { @@ -1328,7 +1328,7 @@ if ($ispaymentok) { // Get email content from template $arraydefaultmessage = null; - $idoftemplatetouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT; // Email to send for Event organization registration + $idoftemplatetouse = getDolGlobalString('EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'); // Email to send for Event organization registration if (!empty($idoftemplatetouse)) { $arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $idoftemplatetouse, 1, ''); @@ -1409,13 +1409,13 @@ if ($ispaymentok) { $paymentTypeId = 0; if ($paymentmethod == 'paybox') { - $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'paypal') { - $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'stripe') { - $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS'); } if (empty($paymentTypeId)) { dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment'); @@ -1477,11 +1477,11 @@ if ($ispaymentok) { if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { - $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'paypal') { - $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'stripe') { - $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($bankaccountid > 0) { @@ -1544,7 +1544,7 @@ if ($ispaymentok) { // Get email content from template $arraydefaultmessage = null; - $idoftemplatetouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH; // Email sent after registration for a Booth + $idoftemplatetouse = getDolGlobalString('EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH'); // Email sent after registration for a Booth if (!empty($idoftemplatetouse)) { $arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $idoftemplatetouse, 1, ''); @@ -1565,7 +1565,7 @@ if ($ispaymentok) { $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); $sendto = $thirdparty->email; - $from = $conf->global->MAILING_EMAIL_FROM; + $from = getDolGlobalString('MAILING_EMAIL_FROM'); $urlback = $_SERVER["REQUEST_URI"]; $ishtml = dol_textishtml($texttosend); // May contain urls @@ -1607,13 +1607,13 @@ if ($ispaymentok) { $paymentTypeId = 0; if ($paymentmethod == 'paybox') { - $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYBOX_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'paypal') { - $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('PAYPAL_PAYMENT_MODE_FOR_PAYMENTS'); } if ($paymentmethod == 'stripe') { - $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + $paymentTypeId = getDolGlobalString('STRIPE_PAYMENT_MODE_FOR_PAYMENTS'); } if (empty($paymentTypeId)) { dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment'); @@ -1677,11 +1677,11 @@ if ($ispaymentok) { if (!$error && isModEnabled("banque")) { $bankaccountid = 0; if ($paymentmethod == 'paybox') { - $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'paypal') { - $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS'); } elseif ($paymentmethod == 'stripe') { - $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + $bankaccountid = getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); } if ($bankaccountid > 0) { @@ -1779,7 +1779,7 @@ if ($ispaymentok) { $sendemail = ''; if (getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL')) { - $sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL; + $sendemail = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL'); } $tmptag = dolExplodeIntoArray($fulltag, '.', '='); @@ -1903,15 +1903,15 @@ if ($ispaymentok) { $sendemail = ''; if (getDolGlobalString('PAYMENTONLINE_SENDEMAIL')) { - $sendemail = $conf->global->PAYMENTONLINE_SENDEMAIL; + $sendemail = getDolGlobalString('PAYMENTONLINE_SENDEMAIL'); } // TODO Remove local option to keep only the generic one ? if ($paymentmethod == 'paypal' && getDolGlobalString('PAYPAL_PAYONLINE_SENDEMAIL')) { - $sendemail = $conf->global->PAYPAL_PAYONLINE_SENDEMAIL; + $sendemail = getDolGlobalString('PAYPAL_PAYONLINE_SENDEMAIL'); } elseif ($paymentmethod == 'paybox' && getDolGlobalString('PAYBOX_PAYONLINE_SENDEMAIL')) { - $sendemail = $conf->global->PAYBOX_PAYONLINE_SENDEMAIL; + $sendemail = getDolGlobalString('PAYBOX_PAYONLINE_SENDEMAIL'); } elseif ($paymentmethod == 'stripe' && getDolGlobalString('STRIPE_PAYONLINE_SENDEMAIL')) { - $sendemail = $conf->global->STRIPE_PAYONLINE_SENDEMAIL; + $sendemail = getDolGlobalString('STRIPE_PAYONLINE_SENDEMAIL'); } // Send warning of error to administrator diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index 9b35ac796ac..0555850583e 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -361,7 +361,7 @@ if (empty($reshook) && $action == 'add') { $outputlangs->loadLangs(array("main", "members", "projects")); // Get email content from template $arraydefaultmessage = null; - $labeltouse = $conf->global->PROJECT_EMAIL_TEMPLATE_AUTOLEAD; + $labeltouse = getDolGlobalString('PROJECT_EMAIL_TEMPLATE_AUTOLEAD'); if (!empty($labeltouse)) { $arraydefaultmessage = $formmail->getEMailTemplate($db, 'project', $user, $outputlangs, 0, 1, $labeltouse); @@ -396,7 +396,7 @@ if (empty($reshook) && $action == 'add') { if (!empty($backtopage)) { $urlback = $backtopage; } elseif (getDolGlobalString('PROJECT_URL_REDIRECT_LEAD')) { - $urlback = $conf->global->PROJECT_URL_REDIRECT_LEAD; + $urlback = getDolGlobalString('PROJECT_URL_REDIRECT_LEAD'); // TODO Make replacement of __AMOUNT__, etc... } else { $urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken(); @@ -463,7 +463,7 @@ print '
'; print '
'; if (getDolGlobalString('PROJECT_NEWFORM_TEXT')) { - print $langs->trans($conf->global->PROJECT_NEWFORM_TEXT)."
\n"; + print $langs->trans(getDolGlobalString('PROJECT_NEWFORM_TEXT'))."
\n"; } else { print $langs->trans("FormForNewLeadDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."
\n"; } diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 20be7cf9e5a..bac61fbda67 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -316,7 +316,7 @@ if (empty($reshook) && $action == 'add') { // Adding supplier tag and tag from setup to thirdparty $category = new Categorie($db); - $resultcategory = $category->fetch($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH); + $resultcategory = $category->fetch(getDolGlobalString('EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH')); if ($resultcategory<=0) { $error++; @@ -416,7 +416,7 @@ if (empty($reshook) && $action == 'add') { // If this is a paying booth, we have to redirect to payment page and create an invoice if (!empty((float) $project->price_booth)) { $productforinvoicerow = new Product($db); - $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_BOOTH_LOCATION); + $resultprod = $productforinvoicerow->fetch(getDolGlobalString('SERVICE_BOOTH_LOCATION')); if ($resultprod < 0) { $error++; $errmsg .= $productforinvoicerow->error; @@ -516,7 +516,7 @@ if (empty($reshook) && $action == 'add') { $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); $sendto = $thirdparty->email; - $from = $conf->global->MAILING_EMAIL_FROM; + $from = getDolGlobalString('MAILING_EMAIL_FROM'); $urlback = $_SERVER["REQUEST_URI"]; $trackid = 'proj'.$project->id; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 072459df428..da8de48cde6 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -316,7 +316,7 @@ if (empty($reshook) && $action == 'add') { // Adding supplier tag and tag from setup to thirdparty $category = new Categorie($db); - $resultcategory = $category->fetch($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_CONF); + $resultcategory = $category->fetch(getDolGlobalString('EVENTORGANIZATION_CATEG_THIRDPARTY_CONF')); if ($resultcategory<=0) { $error++; @@ -447,7 +447,7 @@ if (empty($reshook) && $action == 'add') { $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); $sendto = $thirdparty->email; - $from = $conf->global->MAILING_EMAIL_FROM; + $from = getDolGlobalString('MAILING_EMAIL_FROM'); $urlback = $_SERVER["REQUEST_URI"]; $trackid = 'proj'.$project->id; diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index caf386f6eff..e754ea62539 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -235,9 +235,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { - $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; + $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); } //print ''."\n"; // Define urllogo diff --git a/htdocs/public/recruitment/index.php b/htdocs/public/recruitment/index.php index 2661fb89a7e..d64a32492b4 100644 --- a/htdocs/public/recruitment/index.php +++ b/htdocs/public/recruitment/index.php @@ -136,9 +136,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) { - $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO_; + $logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO_'); } //print ''."\n"; // Define urllogo diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index eef609ff9b4..60b5191d468 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -199,9 +199,9 @@ $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix; if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; + $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) { - $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO; + $logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO'); } //print ''."\n"; // Define urllogo diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index bee8b99ab0d..e7fc6cc57ff 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -59,21 +59,21 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; // You can find your endpoint's secret in your webhook settings if (isset($_GET['connect'])) { if (isset($_GET['test'])) { - $endpoint_secret = $conf->global->STRIPE_TEST_WEBHOOK_CONNECT_KEY; + $endpoint_secret = getDolGlobalString('STRIPE_TEST_WEBHOOK_CONNECT_KEY'); $service = 'StripeTest'; $servicestatus = 0; } else { - $endpoint_secret = $conf->global->STRIPE_LIVE_WEBHOOK_CONNECT_KEY; + $endpoint_secret = getDolGlobalString('STRIPE_LIVE_WEBHOOK_CONNECT_KEY'); $service = 'StripeLive'; $servicestatus = 1; } } else { if (isset($_GET['test'])) { - $endpoint_secret = $conf->global->STRIPE_TEST_WEBHOOK_KEY; + $endpoint_secret = getDolGlobalString('STRIPE_TEST_WEBHOOK_KEY'); $service = 'StripeTest'; $servicestatus = 0; } else { - $endpoint_secret = $conf->global->STRIPE_LIVE_WEBHOOK_KEY; + $endpoint_secret = getDolGlobalString('STRIPE_LIVE_WEBHOOK_KEY'); $service = 'StripeLive'; $servicestatus = 1; } @@ -90,7 +90,7 @@ if (empty($endpoint_secret)) { if (getDolGlobalString('STRIPE_USER_ACCOUNT_FOR_ACTIONS')) { // We set the user to use for all ipn actions in Dolibarr $user = new User($db); - $user->fetch($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS); + $user->fetch(getDolGlobalString('STRIPE_USER_ACCOUNT_FOR_ACTIONS')); $user->getrights(); } else { httponly_accessforbidden('Error: Setup of module Stripe not complete for mode '.dol_escape_htmltag($service).'. The STRIPE_USER_ACCOUNT_FOR_ACTIONS is not defined.', 400, 1); @@ -162,9 +162,9 @@ if (isModEnabled('multicompany') && !empty($conf->stripeconnect->enabled) && is_ $stripe = new Stripe($db); // Subject -$societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; +$societeName = getDolGlobalString('MAIN_INFO_SOCIETE_NOM'); if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { - $societeName = $conf->global->MAIN_APPLICATION_TITLE; + $societeName = getDolGlobalString('MAIN_APPLICATION_TITLE'); } top_httphead(); @@ -227,10 +227,10 @@ if ($event->type == 'payout.created') { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $accountfrom = new Account($db); - $accountfrom->fetch($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS); + $accountfrom->fetch(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS')); $accountto = new Account($db); - $accountto->fetch($conf->global->STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS); + $accountto->fetch(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS')); if (($accountto->id != $accountfrom->id) && empty($error)) { $bank_line_id_from = 0; diff --git a/htdocs/public/test/test_badges.php b/htdocs/public/test/test_badges.php index d3ed6476f95..5d5c4c63090 100644 --- a/htdocs/public/test/test_badges.php +++ b/htdocs/public/test/test_badges.php @@ -297,7 +297,7 @@ header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain

Use status helper function

Using the dolGetStatus function provide in core/lib/functions.lib.php. This function is recommended for code uniformisation and easy maintain

global->MAIN_STATUS_USES_CSS; + $saveGlobalConf = getDolGlobalString('MAIN_STATUS_USES_CSS'); $conf->global->MAIN_STATUS_USES_CSS = 1; ?>

Using hidden global conf MAIN_STATUS_USES_CSS=1

diff --git a/htdocs/public/website/index.php b/htdocs/public/website/index.php index 83e972c2244..8c3c3fadd57 100644 --- a/htdocs/public/website/index.php +++ b/htdocs/public/website/index.php @@ -148,7 +148,7 @@ if (empty($pageid)) { $appli = constant('DOL_APPLICATION_TITLE'); if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { - $appli = $conf->global->MAIN_APPLICATION_TITLE; + $appli = getDolGlobalString('MAIN_APPLICATION_TITLE'); } diff --git a/htdocs/public/website/javascript.js.php b/htdocs/public/website/javascript.js.php index 8ded5364c29..7da5d3621d9 100644 --- a/htdocs/public/website/javascript.js.php +++ b/htdocs/public/website/javascript.js.php @@ -82,7 +82,7 @@ $type = ''; $appli = constant('DOL_APPLICATION_TITLE'); if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { - $appli = $conf->global->MAIN_APPLICATION_TITLE; + $appli = getDolGlobalString('MAIN_APPLICATION_TITLE'); } //print 'Directory with '.$appli.' websites.
'; diff --git a/htdocs/public/website/styles.css.php b/htdocs/public/website/styles.css.php index 31d74c08649..db63b396295 100644 --- a/htdocs/public/website/styles.css.php +++ b/htdocs/public/website/styles.css.php @@ -82,7 +82,7 @@ $type = ''; $appli = constant('DOL_APPLICATION_TITLE'); if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { - $appli = $conf->global->MAIN_APPLICATION_TITLE; + $appli = getDolGlobalString('MAIN_APPLICATION_TITLE'); } //print 'Directory with '.$appli.' websites.
'; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 5a63a356703..1b25fa41e63 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -170,7 +170,7 @@ class Reception extends CommonObject $mybool = false; $file = getDolGlobalString('RECEPTION_ADDON_NUMBER') . ".php"; - $classname = $conf->global->RECEPTION_ADDON_NUMBER; + $classname = getDolGlobalString('RECEPTION_ADDON_NUMBER'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -2051,7 +2051,7 @@ class Reception extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('RECEPTION_ADDON_PDF')) { - $modele = $conf->global->RECEPTION_ADDON_PDF; + $modele = getDolGlobalString('RECEPTION_ADDON_PDF'); } } diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 0fc4e0d6bf2..ec80627738a 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -954,7 +954,7 @@ class RecruitmentCandidature extends CommonObject $mybool = false; $file = getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON') . ".php"; - $classname = $conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON; + $classname = getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1013,7 +1013,7 @@ class RecruitmentCandidature extends CommonObject if (!dol_strlen($modele)) { if (getDolGlobalString('RECRUITMENTCANDIDATURE_ADDON_PDF')) { - $modele = $conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF; + $modele = getDolGlobalString('RECRUITMENTCANDIDATURE_ADDON_PDF'); } else { $modele = ''; // No default value. For job application, we allow to disable all PDF generation } diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 77454f09ce3..c5e85e3d41c 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -1011,7 +1011,7 @@ class RecruitmentJobPosition extends CommonObject $mybool = false; $file = getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON') . ".php"; - $classname = $conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON; + $classname = getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -1070,7 +1070,7 @@ class RecruitmentJobPosition extends CommonObject if (!dol_strlen($modele)) { if (getDolGlobalString('RECRUITMENTJOBPOSITION_ADDON_PDF')) { - $modele = $conf->global->RECRUITMENTJOBPOSITION_ADDON_PDF; + $modele = getDolGlobalString('RECRUITMENTJOBPOSITION_ADDON_PDF'); } else { $modele = ''; // No default value. For job position, we allow to disable all PDF generation } diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index 67b23014aaa..6a7030d5882 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -215,7 +215,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $hidetop = 0; if (getDolGlobalString('MAIN_PDF_DISABLE_COL_HEAD_TITLE')) { - $hidetop = $conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE; + $hidetop = getDolGlobalString('MAIN_PDF_DISABLE_COL_HEAD_TITLE'); } // Loop on each lines to detect if there is at least one image to show diff --git a/htdocs/recruitment/index.php b/htdocs/recruitment/index.php index 62513824e7c..237eb45bb1e 100644 --- a/htdocs/recruitment/index.php +++ b/htdocs/recruitment/index.php @@ -329,7 +329,7 @@ END MODULEBUILDER DRAFT MYOBJECT */ print '
'; -$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; +$NBMAX = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT'); $max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT'); // Last modified job position diff --git a/htdocs/recruitment/recruitmentcandidature_agenda.php b/htdocs/recruitment/recruitmentcandidature_agenda.php index f843675a722..a42fd797d37 100644 --- a/htdocs/recruitment/recruitmentcandidature_agenda.php +++ b/htdocs/recruitment/recruitmentcandidature_agenda.php @@ -128,7 +128,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $object->ref." - ".$langs->trans('Agenda'); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = 'Module_Agenda_En|DE:Modul_Terminplanung'; llxHeader('', $title, $help_url); diff --git a/htdocs/recruitment/recruitmentjobposition_agenda.php b/htdocs/recruitment/recruitmentjobposition_agenda.php index f831712418b..9a9638bf10d 100644 --- a/htdocs/recruitment/recruitmentjobposition_agenda.php +++ b/htdocs/recruitment/recruitmentjobposition_agenda.php @@ -127,7 +127,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $object->ref." - ".$langs->trans('Agenda'); - //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; $help_url = ''; llxHeader('', $title, $help_url); diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index b129fde860e..ac7d894b36b 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -192,7 +192,7 @@ abstract class ActionsCardCommon $this->tpl['supplier_enabled'] = 1; // Load object modCodeFournisseur - $module = $conf->global->SOCIETE_CODECLIENT_ADDON; + $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON'); if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index cb3ca2527ac..b2e1d90266d 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -941,7 +941,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Prospect / Customer if (GETPOST("type", 'aZ') == 'c') { if (getDolGlobalString('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) { - $object->client = $conf->global->THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT; + $object->client = getDolGlobalString('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'); } else { $object->client = 3; } @@ -1816,7 +1816,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio if ($modCodeClient->code_auto) { $prefixCustomerIsUsed = $modCodeClient->verif_prefixIsUsed(); } - $module = $conf->global->SOCIETE_CODECLIENT_ADDON; + $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON'); if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index ebe825b7c0b..a5dc591b4e4 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -870,9 +870,9 @@ class Societe extends CommonObject $this->status = 1; if (getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST')) { - $this->fields['address']['showoncombobox'] = $conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST; - $this->fields['zip']['showoncombobox'] = $conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST; - $this->fields['town']['showoncombobox'] = $conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST; + $this->fields['address']['showoncombobox'] = getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST'); + $this->fields['zip']['showoncombobox'] = getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST'); + $this->fields['town']['showoncombobox'] = getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST'); //$this->fields['fk_pays']['showoncombobox'] = $conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST; } } @@ -3354,7 +3354,7 @@ class Societe extends CommonObject // phpcs:enable global $conf; if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) { - $module = $conf->global->SOCIETE_CODECLIENT_ADDON; + $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON'); $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); foreach ($dirsociete as $dirroot) { @@ -3386,7 +3386,7 @@ class Societe extends CommonObject // phpcs:enable global $conf; if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) { - $module = $conf->global->SOCIETE_CODECLIENT_ADDON; + $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON'); $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); foreach ($dirsociete as $dirroot) { @@ -3415,7 +3415,7 @@ class Societe extends CommonObject // phpcs:enable global $conf; if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) { - $module = $conf->global->SOCIETE_CODECLIENT_ADDON; + $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON'); $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); foreach ($dirsociete as $dirroot) { @@ -3455,7 +3455,7 @@ class Societe extends CommonObject // phpcs:enable global $conf; if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) { - $module = $conf->global->SOCIETE_CODECLIENT_ADDON; + $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON'); $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); foreach ($dirsociete as $dirroot) { @@ -3501,7 +3501,7 @@ class Societe extends CommonObject // phpcs:enable global $conf; if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) { - $module = $conf->global->SOCIETE_CODECLIENT_ADDON; + $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON'); $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); foreach ($dirsociete as $dirroot) { @@ -3542,7 +3542,7 @@ class Societe extends CommonObject // phpcs:enable global $conf; if (getDolGlobalString('SOCIETE_CODECLIENT_ADDON')) { - $module = $conf->global->SOCIETE_CODECLIENT_ADDON; + $module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON'); $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); foreach ($dirsociete as $dirroot) { @@ -3581,7 +3581,7 @@ class Societe extends CommonObject global $conf; if (getDolGlobalString('SOCIETE_CODECOMPTA_ADDON')) { - $module=$conf->global->SOCIETE_CODECOMPTA_ADDON; + $module=getDolGlobalString('SOCIETE_CODECOMPTA_ADDON'); $res = false; $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); foreach ($dirsociete as $dirroot) { @@ -4533,7 +4533,7 @@ class Societe extends CommonObject $this->logo_squarred_mini = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI'); // Define if company use vat or not - $this->tva_assuj = $conf->global->FACTURE_TVAOPTION; + $this->tva_assuj = getDolGlobalString('FACTURE_TVAOPTION'); // Define if company use local taxes $this->localtax1_assuj = ((isset($conf->global->FACTURE_LOCAL_TAX1_OPTION) && (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == '1' || getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')) ? 1 : 0); @@ -5030,7 +5030,7 @@ class Societe extends CommonObject // Positionne le modele sur le nom du modele a utiliser if (!dol_strlen($modele)) { if (getDolGlobalString('COMPANY_ADDON_PDF')) { - $modele = $conf->global->COMPANY_ADDON_PDF; + $modele = getDolGlobalString('COMPANY_ADDON_PDF'); } else { print $langs->trans("Error")." ".$langs->trans("Error_COMPANY_ADDON_PDF_NotDefined"); return 0; diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 836c8e83294..03ebec4b890 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -58,10 +58,10 @@ $pageprev = $page - 1; $pagenext = $page + 1; if (getDolGlobalString('MAIN_DOC_SORT_FIELD')) { - $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; + $sortfield = getDolGlobalString('MAIN_DOC_SORT_FIELD'); } if (getDolGlobalString('MAIN_DOC_SORT_ORDER')) { - $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; + $sortorder = getDolGlobalString('MAIN_DOC_SORT_ORDER'); } if (!$sortorder) { diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index cd0573b6457..854be79efc2 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -215,7 +215,7 @@ if (isModEnabled('categorie') && getDolGlobalString('CATEGORY_GRAPHSTATS_ON_THIR $sql .= " FROM ".MAIN_DB_PREFIX."categorie_societe as cs"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; $sql .= " WHERE c.type = 2"; - if (!is_numeric($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { + if (!is_numeric(getDolGlobalString('CATEGORY_GRAPHSTATS_ON_THIRDPARTIES'))) { $sql .= " AND c.label like '".$db->escape($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)."'"; } $sql .= " AND c.entity IN (".getEntity('category').")"; diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index ffa6f523208..b3cc52d6ce6 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1681,7 +1681,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $modelselected = $arraykeys[0]; } if (getDolGlobalString('BANKADDON_PDF')) { - $modelselected = $conf->global->BANKADDON_PDF; + $modelselected = getDolGlobalString('BANKADDON_PDF'); } $out .= $form->selectarray('modelrib'.$rib->id, $modellist, $modelselected, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth125'); diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index e411764ec3f..f9635e37adb 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -343,7 +343,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { // Price print ''; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; print ''; print ''; @@ -351,7 +351,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { // Price minimum print ''; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; print ''; @@ -412,7 +412,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { // Price print ''; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; if ($prodcustprice->price_base_type == 'TTC') { print ''; @@ -424,7 +424,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { // Price minimum print ''; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1); print ''; if ($prodcustprice->price_base_type == 'TTC') { print ''; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 00e89220bc3..7757f24be8b 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -1275,9 +1275,9 @@ class Stripe extends CommonObject // With Stripe Connect $fee = $amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE; if ($fee >= $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL && $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL > $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { - $fee = $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL; + $fee = getDolGlobalString('STRIPE_APPLICATION_FEE_MAXIMAL'); } elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { - $fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL; + $fee = getDolGlobalString('STRIPE_APPLICATION_FEE_MINIMAL'); } if (!in_array($currency, $arrayzerounitcurrency)) { diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index ae3818239c4..ffe975640e2 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1149,7 +1149,7 @@ class SupplierProposal extends CommonObject // Set ref require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php'; - $obj = $conf->global->SUPPLIER_PROPOSAL_ADDON; + $obj = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON'); $modSupplierProposal = new $obj(); $this->ref = $modSupplierProposal->getNextValue($objsoc, $this); @@ -2419,7 +2419,7 @@ class SupplierProposal extends CommonObject $mybool = false; $file = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') . ".php"; - $classname = $conf->global->SUPPLIER_PROPOSAL_ADDON; + $classname = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -2704,7 +2704,7 @@ class SupplierProposal extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF')) { - $modele = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF; + $modele = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF'); } } diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index a14c4d5ea2e..2e507d8dce2 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -1250,7 +1250,7 @@ if (isset($_SESSION["takeposterminal"]) && $_SESSION["takeposterminal"]) { if (count($maincategories) == 0) { if (getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID') > 0) { $tmpcategory = new Categorie($db); - $tmpcategory->fetch($conf->global->TAKEPOS_ROOT_CATEGORY_ID); + $tmpcategory->fetch(getDolGlobalString('TAKEPOS_ROOT_CATEGORY_ID')); setEventMessages($langs->trans("TakeposNeedsAtLeastOnSubCategoryIntoParentCategory", $tmpcategory->label), null, 'errors'); } else { setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors'); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index f5731f4c563..68016210f6a 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -236,7 +236,7 @@ if (empty($reshook)) { dol_syslog('Sale without lines'); dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1); } elseif (isModEnabled('stock') && getDolGlobalString($constantforkey) != "1" && !isModEnabled('productbatch')) { - $savconst = $conf->global->STOCK_CALCULATE_ON_BILL; + $savconst = getDolGlobalString('STOCK_CALCULATE_ON_BILL'); if (isModEnabled('productbatch') && !getDolGlobalInt('CASHDESK_FORCE_DECREASE_STOCK')) { $conf->global->STOCK_CALCULATE_ON_BILL = 0; // To not change the stock (not yet compatible with batch management) @@ -459,7 +459,7 @@ if (empty($reshook)) { $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); if (isModEnabled('stock') && getDolGlobalString($constantforkey) != "1") { - $savconst = $conf->global->STOCK_CALCULATE_ON_BILL; + $savconst = getDolGlobalString('STOCK_CALCULATE_ON_BILL'); $conf->global->STOCK_CALCULATE_ON_BILL = 1; $constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); dol_syslog("Validate invoice with stock change into warehouse defined into constant ".$constantforkey." = ".getDolGlobalString($constantforkey)); diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index dfc606475fa..bfccf8ef34e 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -124,7 +124,7 @@ function fetchConnectionToken() { global->STRIPE_LOCATION); + $urlconnexiontoken .= '&location='.urlencode(getDolGlobalString('STRIPE_LOCATION')); } if (!empty($stripeacc)) { $urlconnexiontoken .= '&stripeacc='.urlencode($stripeacc); @@ -564,7 +564,7 @@ $action_buttons = array( "class" => "poscolordelete" ), ); -$numpad = $conf->global->TAKEPOS_NUMPAD; +$numpad = getDolGlobalString('TAKEPOS_NUMPAD'); if (isModEnabled('stripe') && isset($keyforstripeterminalbank) && getDolGlobalString('STRIPE_CARD_PRESENT')) { print ''; dol_htmloutput_mesg($langs->trans('ConnectingToStripeTerminal', 'Stripe'), '', 'warning', 1); diff --git a/htdocs/theme/eldy/manifest.json.php b/htdocs/theme/eldy/manifest.json.php index 2cae631d25b..0e91146fe61 100644 --- a/htdocs/theme/eldy/manifest.json.php +++ b/htdocs/theme/eldy/manifest.json.php @@ -88,7 +88,7 @@ $manifest->id = constant('DOL_MAIN_URL_ROOT'); if (getDolGlobalString('MAIN_MANIFEST_APPLI_LOGO_URL')) { $icon = new stdClass(); - $icon->src = $conf->global->MAIN_MANIFEST_APPLI_LOGO_URL; + $icon->src = getDolGlobalString('MAIN_MANIFEST_APPLI_LOGO_URL'); if ($conf->global->MAIN_MANIFEST_APPLI_LOGO_URL_SIZE) { $icon->sizes = getDolGlobalString('MAIN_MANIFEST_APPLI_LOGO_URL_SIZE') . "x" . getDolGlobalString('MAIN_MANIFEST_APPLI_LOGO_URL_SIZE'); } else { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 01b946752bc..f6f9f68ee1b 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -103,7 +103,7 @@ $path = ''; // This value may be used in future for external module to overwrite $theme = 'eldy'; // Value of theme if (getDolGlobalString('MAIN_OVERWRITE_THEME_RES')) { $path = '/' . getDolGlobalString('MAIN_OVERWRITE_THEME_RES'); - $theme = $conf->global->MAIN_OVERWRITE_THEME_RES; + $theme = getDolGlobalString('MAIN_OVERWRITE_THEME_RES'); } // Define image path files and other constants diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 19dec5d2392..a4249781a0d 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -105,7 +105,7 @@ $path = ''; // This value may be used in future for external module to overwrite $theme = 'md'; // Value of theme if (getDolGlobalString('MAIN_OVERWRITE_THEME_RES')) { $path = '/' . getDolGlobalString('MAIN_OVERWRITE_THEME_RES'); - $theme = $conf->global->MAIN_OVERWRITE_THEME_RES; + $theme = getDolGlobalString('MAIN_OVERWRITE_THEME_RES'); } // Define image path files and other constants diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 3a5e333cbb1..fd6cc58281e 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -215,7 +215,7 @@ class ActionsTicket extends CommonHookActions $msg = GETPOSTISSET('message_initial') ? GETPOST('message_initial', 'restricthtml') : $object->message; include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $uselocalbrowser = true; - $ckeditorenabledforticket = $conf->global->FCKEDITOR_ENABLE_TICKET; + $ckeditorenabledforticket = getDolGlobalString('FCKEDITOR_ENABLE_TICKET'); $doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $ckeditorenabledforticket, ROWS_9, '95%'); $doleditor->Create(); } else { diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index f3da2f3e84e..9b6bcd90be8 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2632,9 +2632,9 @@ class Ticket extends CommonObject if (empty($sendto)) { if (getDolGlobalString('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL')) { - $sendto[getDolGlobalString('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL')] = $conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL; + $sendto[getDolGlobalString('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL')] = getDolGlobalString('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL'); } elseif (getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')) { - $sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + $sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO'); } } @@ -2642,7 +2642,7 @@ class Ticket extends CommonObject if (getDolGlobalString('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS') && getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO') && !array_key_exists($conf->global->TICKET_NOTIFICATION_EMAIL_TO, $sendto) ) { - $sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + $sendto[getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO')] = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TO'); } if (!empty($sendto)) { diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index f474ee48121..31c24fbfd53 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -1156,10 +1156,10 @@ while ($i < $imaxinloop) { $creation_date = $object->datec; $hour_diff_creation = ($now - $creation_date) / 3600 ; if ($hour_diff_creation > $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE) { - print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE), 'warning', 'style="color: red;"', false, 0, 0, '', ''); + print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', getDolGlobalString('TICKET_DELAY_BEFORE_FIRST_RESPONSE')), 'warning', 'style="color: red;"', false, 0, 0, '', ''); } } elseif (getDolGlobalString('TICKET_DELAY_SINCE_LAST_RESPONSE') && $hour_diff > $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) { - print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayFromLastResponseTooLong', $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE), 'warning'); + print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayFromLastResponseTooLong', getDolGlobalString('TICKET_DELAY_SINCE_LAST_RESPONSE')), 'warning'); } } } else { // Example: key=fk_soc, obj->key=123 val=array('type'=>'integer', ... diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 4e424024bfb..730d2215306 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -45,7 +45,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'us if (!getDolGlobalString('AGENDA_EXT_NB')) { $conf->global->AGENDA_EXT_NB = 5; } -$MAXAGENDA = $conf->global->AGENDA_EXT_NB; +$MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB'); // List of available colors $colorlist = array('BECEDD', 'DDBECE', 'BFDDBE', 'F598B4', 'F68654', 'CBF654', 'A4A4A5'); diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 65ae96cce90..a0f0fa1f3cd 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -596,7 +596,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac print '
'; // Max number of elements in small lists - $MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; + $MAXLIST = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT'); // Latest payments of salaries if (isModEnabled('salaries') && diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index a0eed471a0b..b53596be705 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2503,7 +2503,7 @@ class User extends CommonObject if (!$changelater) { $url = $urlwithroot.'/'; if (getDolGlobalString('URL_REDIRECTION_AFTER_CHANGEPASSWORD')) { - $url = $conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD; + $url = getDolGlobalString('URL_REDIRECTION_AFTER_CHANGEPASSWORD'); } dol_syslog(get_class($this)."::send_password changelater is off, url=".$url); @@ -3232,7 +3232,7 @@ class User extends CommonObject if ($mode == 0) { $dn = getDolGlobalString('LDAP_KEY_USERS') . "=".$info[getDolGlobalString('LDAP_KEY_USERS')]."," . getDolGlobalString('LDAP_USER_DN'); } elseif ($mode == 1) { - $dn = $conf->global->LDAP_USER_DN; + $dn = getDolGlobalString('LDAP_USER_DN'); } elseif ($mode == 2) { $dn = getDolGlobalString('LDAP_KEY_USERS') . "=".$info[getDolGlobalString('LDAP_KEY_USERS')]; } @@ -3925,7 +3925,7 @@ class User extends CommonObject // Positionne le modele sur le nom du modele a utiliser if (!dol_strlen($modele)) { if (getDolGlobalString('USER_ADDON_PDF')) { - $modele = $conf->global->USER_ADDON_PDF; + $modele = getDolGlobalString('USER_ADDON_PDF'); } else { $modele = 'bluesky'; } diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index a96028a5993..2f984f8472a 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -898,7 +898,7 @@ class UserGroup extends CommonObject $dn = getDolGlobalString('LDAP_KEY_GROUPS') . "=".$info[getDolGlobalString('LDAP_KEY_GROUPS')]."," . getDolGlobalString('LDAP_GROUP_DN'); } if ($mode == 1) { - $dn = $conf->global->LDAP_GROUP_DN; + $dn = getDolGlobalString('LDAP_GROUP_DN'); } if ($mode == 2) { $dn = getDolGlobalString('LDAP_KEY_GROUPS') . "=".$info[getDolGlobalString('LDAP_KEY_GROUPS')]; @@ -996,7 +996,7 @@ class UserGroup extends CommonObject // Positionne le modele sur le nom du modele a utiliser if (!dol_strlen($modele)) { if (getDolGlobalString('USERGROUP_ADDON_PDF')) { - $modele = $conf->global->USERGROUP_ADDON_PDF; + $modele = getDolGlobalString('USERGROUP_ADDON_PDF'); } else { $modele = 'grass'; } diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index fea12e1b372..4c3eaeea90e 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -159,7 +159,7 @@ if ($id > 0) { print 'ClickToDial URL'; print ''; if (getDolGlobalString('CLICKTODIAL_URL')) { - $url = $conf->global->CLICKTODIAL_URL; + $url = getDolGlobalString('CLICKTODIAL_URL'); } if (!empty($object->clicktodial_url)) { $url = $object->clicktodial_url; diff --git a/htdocs/user/list.php b/htdocs/user/list.php index d57c37bfd67..f59b473c767 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -175,7 +175,7 @@ $searchCategoryUserOperator = 0; if (GETPOSTISSET('formfilteraction')) { $searchCategoryUserOperator = GETPOSTINT('search_category_user_operator'); } elseif (getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT')) { - $searchCategoryUserOperator = $conf->global->MAIN_SEARCH_CAT_OR_BY_DEFAULT; + $searchCategoryUserOperator = getDolGlobalString('MAIN_SEARCH_CAT_OR_BY_DEFAULT'); } $searchCategoryUserList = GETPOST('search_category_user_list', 'array'); $catid = GETPOST('catid', 'int'); diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index 4713d4e9e97..75f2fa6f069 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -80,7 +80,7 @@ if ($urlfrom) { $url = DOL_URL_ROOT.$urlfrom; } if (getDolGlobalString('MAIN_LOGOUT_GOTO_URL')) { - $url = $conf->global->MAIN_LOGOUT_GOTO_URL; + $url = getDolGlobalString('MAIN_LOGOUT_GOTO_URL'); } if (GETPOST('dol_hide_topmenu')) { diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index ab81effa2e4..2758204547f 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -182,7 +182,7 @@ $dol_url_root = DOL_URL_ROOT; // Title $title = 'Dolibarr '.DOL_VERSION; if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { - $title = $conf->global->MAIN_APPLICATION_TITLE; + $title = getDolGlobalString('MAIN_APPLICATION_TITLE'); } // Select templates diff --git a/htdocs/variants/admin/admin.php b/htdocs/variants/admin/admin.php index 449c7495847..0d96d52822b 100644 --- a/htdocs/variants/admin/admin.php +++ b/htdocs/variants/admin/admin.php @@ -77,7 +77,7 @@ print $form->selectyesno("PRODUIT_ATTRIBUTES_HIDECHILD", getDolGlobalString('PRO print ''.$langs->trans('CombinationsSeparator').''; if (isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) { - $separator = $conf->global->PRODUIT_ATTRIBUTES_SEPARATOR; + $separator = getDolGlobalString('PRODUIT_ATTRIBUTES_SEPARATOR'); } else { $separator = "_"; } diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php index 3030617098b..c13638662eb 100644 --- a/htdocs/webhook/class/target.class.php +++ b/htdocs/webhook/class/target.class.php @@ -994,7 +994,7 @@ class Target extends CommonObject if (!empty($this->model_pdf)) { $modele = $this->model_pdf; } elseif (getDolGlobalString('TARGET_ADDON_PDF')) { - $modele = $conf->global->TARGET_ADDON_PDF; + $modele = getDolGlobalString('TARGET_ADDON_PDF'); } } diff --git a/htdocs/webhook/webhookindex.php b/htdocs/webhook/webhookindex.php index 2212fe61a46..2886d3f5e1c 100644 --- a/htdocs/webhook/webhookindex.php +++ b/htdocs/webhook/webhookindex.php @@ -143,7 +143,7 @@ END MODULEBUILDER DRAFT MYOBJECT */ print '
'; -$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; +$NBMAX = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT'); $max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT'); /* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT diff --git a/htdocs/website/index.php b/htdocs/website/index.php index e25f1d4b2ab..03356eaee47 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3079,7 +3079,7 @@ if (!GETPOST('hide_websitemenu')) { } if (getDolGlobalString('WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER')) { $htmltext .= ''; - $htmltext .= '
'.$langs->trans($conf->global->WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER); + $htmltext .= '
'.$langs->trans(getDolGlobalString('WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER')); } else { $htmltext .= $langs->trans("SetHereVirtualHost", $dataroot); $htmltext .= '
'; diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php index 543ded86b6c..71db06da835 100644 --- a/htdocs/workstation/class/workstation.class.php +++ b/htdocs/workstation/class/workstation.class.php @@ -841,7 +841,7 @@ class Workstation extends CommonObject $mybool = false; $file = getDolGlobalString('WORKSTATION_WORKSTATION_ADDON') . ".php"; - $classname = $conf->global->WORKSTATION_WORKSTATION_ADDON; + $classname = getDolGlobalString('WORKSTATION_WORKSTATION_ADDON'); // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -906,7 +906,7 @@ class Workstation extends CommonObject if ($this->model_pdf) { $modele = $this->model_pdf; } elseif (getDolGlobalString('WORKSTATION_ADDON_PDF')) { - $modele = $conf->global->WORKSTATION_ADDON_PDF; + $modele = getDolGlobalString('WORKSTATION_ADDON_PDF'); } }