Clean code with rector

This commit is contained in:
Laurent Destailleur 2024-01-05 04:18:53 +01:00
parent c3fb26086f
commit 70aa4a22ca
281 changed files with 666 additions and 672 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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 '<span class="error">'.$langs->trans("WaitAccountNotDefined").'</span>';
}
else */
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE);
print length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_SUSPENSE'));
print "</td>";
// Subledger account
print "<td>";
/*if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined')
{
print '<span class="error">'.$langs->trans("WaitAccountNotDefined").'</span>';
}
else print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE);
*/
print "</td>";
print "<td>".dol_escape_htmltag($reflabel)."</td>";
print '<td class="center">'.$val["type_payment"]."</td>";

View file

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

View file

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

View file

@ -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<!-- Form add subscription -->\n";
if ($conf->use_javascript_ajax) {
//var_dump($bankdirect.'-'.$bankviainvoice.'-'.$invoiceonly.'-'.empty($conf->global->ADHERENT_BANK_USE));
//var_dump($bankdirect.'-'.$bankviainvoice.'-'.$invoiceonly);
print "\n".'<script type="text/javascript">';
print '$(document).ready(function () {
$(".bankswitchclass, .bankswitchclass2").'.(($bankdirect || $bankviainvoice) ? 'show()' : 'hide()').';
@ -1061,7 +1061,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
}
if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled('product') || isModEnabled('service'))) {
$prodtmp = new Product($db);
$result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
$result = $prodtmp->fetch(getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS'));
if ($result < 0) {
setEventMessage($prodtmp->error, 'errors');
}
@ -1091,7 +1091,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
}
if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled('product')|| isModEnabled('service'))) {
$prodtmp = new Product($db);
$result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
$result = $prodtmp->fetch(getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS'));
if ($result < 0) {
setEventMessage($prodtmp->error, 'errors');
}
@ -1158,7 +1158,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
$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);

View file

@ -47,7 +47,7 @@ $action = GETPOST('action', 'alpha');
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');

View file

@ -177,37 +177,37 @@ $getentity = ($conf->entity > 1 ? "&entity=".$conf->entity : "");
// Show message
$message = '';
$urlvcal = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank" rel="noopener noreferrer">';
$urlvcal .= $urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').'</a>';
$urlvcal = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'" target="_blank" rel="noopener noreferrer">';
$urlvcal .= $urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : 'KEYNOTDEFINED').'</a>';
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlvcal, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'vcal', '').'</span>');
$message .= '<div class="urllink">';
$message .= '<input type="text" id="onlinepaymenturl1" class="quatrevingtpercent" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'">';
$message .= '<input type="text" id="onlinepaymenturl1" class="quatrevingtpercent" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">';
if (getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) {
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'">'.img_picto('', 'download').'</a>';
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">'.img_picto('', 'download').'</a>';
}
$message .= '</div>';
$message .= ajax_autoselect('onlinepaymenturl1');
$message .= '<br>';
$urlical = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank" rel="noopener noreferrer">';
$urlical .= $urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').'</a>';
$urlical = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'" target="_blank" rel="noopener noreferrer">';
$urlical .= $urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : 'KEYNOTDEFINED').'</a>';
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlical, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', '').'</span>');
$message .= '<div class="urllink">';
$message .= '<input type="text" id="onlinepaymenturl2" class="quatrevingtpercent" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'">';
$message .= '<input type="text" id="onlinepaymenturl2" class="quatrevingtpercent" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">';
if (getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) {
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'">'.img_picto('', 'download').'</a>';
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=ical'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">'.img_picto('', 'download').'</a>';
}
$message .= '</div>';
$message .= ajax_autoselect('onlinepaymenturl2');
$message .= '<br>';
$urlrss = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'" target="_blank" rel="noopener noreferrer">';
$urlrss .= $urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').'</a>';
$urlrss = '<a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'" target="_blank" rel="noopener noreferrer">';
$urlrss .= $urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : 'KEYNOTDEFINED').'</a>';
$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlrss, '<span class="opacitymedium">'.$langs->trans("WebCalUrlForVCalExport", 'rss', '').'</span>');
$message .= '<div class="urllink">';
$message .= '<input type="text" id="onlinepaymenturl3" class="quatrevingtpercent" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'">';
$message .= '<input type="text" id="onlinepaymenturl3" class="quatrevingtpercent" value="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">';
if (getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) {
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...').'">'.img_picto('', 'download').'</a>';
$message .= ' <a href="'.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...').'">'.img_picto('', 'download').'</a>';
}
$message .= '</div>';
$message .= ajax_autoselect('onlinepaymenturl3');

View file

@ -317,19 +317,19 @@ if (!getDolGlobalString('MAIN_DISABLE_METEO') || getDolGlobalInt('MAIN_DISABLE_M
//if (!empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP;
$level0 = $offset;
if (getDolGlobalString('MAIN_METEO_LEVEL0')) {
$level0 = $conf->global->MAIN_METEO_LEVEL0;
$level0 = getDolGlobalString('MAIN_METEO_LEVEL0');
}
$level1 = $offset + $cursor;
if (getDolGlobalString('MAIN_METEO_LEVEL1')) {
$level1 = $conf->global->MAIN_METEO_LEVEL1;
$level1 = getDolGlobalString('MAIN_METEO_LEVEL1');
}
$level2 = $offset + 2 * $cursor;
if (getDolGlobalString('MAIN_METEO_LEVEL2')) {
$level2 = $conf->global->MAIN_METEO_LEVEL2;
$level2 = getDolGlobalString('MAIN_METEO_LEVEL2');
}
$level3 = $offset + 3 * $cursor;
if (getDolGlobalString('MAIN_METEO_LEVEL3')) {
$level3 = $conf->global->MAIN_METEO_LEVEL3;
$level3 = getDolGlobalString('MAIN_METEO_LEVEL3');
}
$text = '';
$options = 'class="valignmiddle" height="60px"';

View file

@ -2597,7 +2597,7 @@ function fieldList($fieldlist, $obj = null, $tabname = '', $context = '')
print '</td>';
} elseif ($value == 'lang') {
print '<td>';
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
print $formadmin->select_language(getDolGlobalString('MAIN_LANG_DEFAULT'), 'lang');
print '</td>';
} elseif (in_array($value, array('element', 'source'))) { // Example: the type and source of the element (for contact types)
$tmparray = array();

View file

@ -48,8 +48,8 @@ $quality = GETPOST('quality', 'alpha');
try {
$url = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV') . '/api/images/products/'.$id_product.'/'.$id_image.'/'.$quality;
$api = new PrestaShopWebservice(
$conf->global->MAIN_MODULE_DOLISTORE_API_SRV,
$conf->global->MAIN_MODULE_DOLISTORE_API_KEY,
getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV'),
getDolGlobalString('MAIN_MODULE_DOLISTORE_API_KEY'),
$dolistore->debug_api
);
//echo $url;

View file

@ -86,9 +86,9 @@ class Dolistore
global $conf;
try {
$this->api = new PrestaShopWebservice($conf->global->MAIN_MODULE_DOLISTORE_API_SRV, $conf->global->MAIN_MODULE_DOLISTORE_API_KEY, $this->debug_api);
$this->api = new PrestaShopWebservice(getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV'), getDolGlobalString('MAIN_MODULE_DOLISTORE_API_KEY'), $this->debug_api);
dol_syslog("Call API with MAIN_MODULE_DOLISTORE_API_SRV = ".getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV'));
// $conf->global->MAIN_MODULE_DOLISTORE_API_KEY is for the login of basic auth. There is no password as it is public data.
// conf MAIN_MODULE_DOLISTORE_API_KEY is for the login of basic auth. There is no password as it is public data.
// Here we set the option array for the Webservice : we want categories resources
$opt = array();
@ -136,9 +136,9 @@ class Dolistore
}
try {
$this->api = new PrestaShopWebservice($conf->global->MAIN_MODULE_DOLISTORE_API_SRV, $conf->global->MAIN_MODULE_DOLISTORE_API_KEY, $this->debug_api);
$this->api = new PrestaShopWebservice(getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV'), getDolGlobalString('MAIN_MODULE_DOLISTORE_API_KEY'), $this->debug_api);
dol_syslog("Call API with MAIN_MODULE_DOLISTORE_API_SRV = ".getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV'));
// $conf->global->MAIN_MODULE_DOLISTORE_API_KEY is for the login of basic auth. There is no password as it is public data.
// conf MAIN_MODULE_DOLISTORE_API_KEY is for the login of basic auth. There is no password as it is public data.
// Here we set the option array for the Webservice : we want products resources
$opt = array();

View file

@ -383,7 +383,7 @@ if ($mode == 'other') {
// Default language
print '<tr class="oddeven"><td>'.$langs->trans("DefaultLanguage").'</td><td>';
print img_picto('', 'language', 'class="pictofixedwidth"');
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
print $formadmin->select_language(getDolGlobalString('MAIN_LANG_DEFAULT'), 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
//print '<input class="button button-save smallpaddingimp" type="submit" name="submit" value="'.$langs->trans("Save").'">';
print '</td>';
print '</tr>';

View file

@ -285,9 +285,9 @@ print '</form>';
*/
$butlabel = $langs->trans("LDAPTestSynchroContact");
$testlabel = 'test';
$key = $conf->global->LDAP_KEY_CONTACTS;
$dn = $conf->global->LDAP_CONTACT_DN;
$objectclass = $conf->global->LDAP_CONTACT_OBJECT_CLASS;
$key = getDolGlobalString('LDAP_KEY_CONTACTS');
$dn = getDolGlobalString('LDAP_CONTACT_DN');
$objectclass = getDolGlobalString('LDAP_CONTACT_OBJECT_CLASS');
show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);

View file

@ -436,9 +436,9 @@ print '</form>';
if (getDolGlobalString('LDAP_MEMBER_ACTIVE')) {
$butlabel = $langs->trans("LDAPTestSynchroMember");
$testlabel = 'testmember';
$key = $conf->global->LDAP_KEY_MEMBERS;
$dn = $conf->global->LDAP_MEMBER_DN;
$objectclass = $conf->global->LDAP_MEMBER_OBJECT_CLASS;
$key = getDolGlobalString('LDAP_KEY_MEMBERS');
$dn = getDolGlobalString('LDAP_MEMBER_DN');
$objectclass = getDolGlobalString('LDAP_MEMBER_OBJECT_CLASS');
show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);
}

View file

@ -192,9 +192,9 @@ print '</form>';
if (getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE') === Ldap::SYNCHRO_DOLIBARR_TO_LDAP) {
$butlabel = $langs->trans("LDAPTestSynchroMemberType");
$testlabel = 'testmembertype';
$key = $conf->global->LDAP_KEY_MEMBERS_TYPES;
$dn = $conf->global->LDAP_MEMBER_TYPE_DN;
$objectclass = $conf->global->LDAP_MEMBER_TYPE_OBJECT_CLASS;
$key = getDolGlobalString('LDAP_KEY_MEMBERS_TYPES');
$dn = getDolGlobalString('LDAP_MEMBER_TYPE_DN');
$objectclass = getDolGlobalString('LDAP_MEMBER_TYPE_OBJECT_CLASS');
show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass);
}

View file

@ -726,7 +726,7 @@ if ($action == 'edit') {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_TLS").'</td><td>';
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn($conf->global->MAIN_MAIL_EMAIL_TLS);
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS'));
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@ -743,7 +743,7 @@ if ($action == 'edit') {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").'</td><td>';
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS);
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS'));
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@ -760,7 +760,7 @@ if ($action == 'edit') {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").'</td><td>';
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED);
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED'));
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}

View file

@ -581,7 +581,7 @@ if ($action == 'edit') {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_EMAIL_TLS").'</td><td>';
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn($conf->global->MAIN_MAIL_EMAIL_TLS_EMAILING);
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS_EMAILING'));
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@ -598,7 +598,7 @@ if ($action == 'edit') {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").'</td><td>';
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING);
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_EMAILING'));
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}

View file

@ -558,7 +558,7 @@ if ($action == 'edit') {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_EMAIL_TLS").'</td><td>';
if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn($conf->global->MAIN_MAIL_EMAIL_TLS_TICKET);
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET'));
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
@ -575,7 +575,7 @@ if ($action == 'edit') {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").'</td><td>';
if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) {
if (function_exists('openssl_open')) {
print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET);
print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET'));
} else {
print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}

View file

@ -49,8 +49,8 @@ foreach ($dirmenus as $dirmenu) {
$action = GETPOST('action', 'aZ09');
$menu_handler_top = $conf->global->MAIN_MENU_STANDARD;
$menu_handler_smartphone = $conf->global->MAIN_MENU_SMARTPHONE;
$menu_handler_top = getDolGlobalString('MAIN_MENU_STANDARD');
$menu_handler_smartphone = getDolGlobalString('MAIN_MENU_SMARTPHONE');
$menu_handler_top = preg_replace('/_backoffice.php/i', '', $menu_handler_top);
$menu_handler_top = preg_replace('/_frontoffice.php/i', '', $menu_handler_top);
$menu_handler_smartphone = preg_replace('/_backoffice.php/i', '', $menu_handler_smartphone);

View file

@ -1242,7 +1242,7 @@ if ($mode == 'deploy') {
print $langs->trans("YouCanSubmitFile").'<br><br>';
$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);

View file

@ -305,7 +305,7 @@ if (empty($tmp)) {
$tmp = 'utf-8'; // By default for other
}
if (getDolGlobalString('MAIN_FILESYSTEM_ENCODING')) {
$tmp = $conf->global->MAIN_FILESYSTEM_ENCODING;
$tmp = getDolGlobalString('MAIN_FILESYSTEM_ENCODING');
}
print '<tr class="oddeven"><td>&nbsp; => '.$langs->trans("File encoding").'</td><td>'.$tmp.'</td></tr>'."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php

View file

@ -89,7 +89,7 @@ if (!preg_match('/\.zip$/i', $xmlfile) && dol_is_file($xmlfile.'.zip')) {
// Remote file to compare to
$xmlremote = GETPOST('xmlremote', 'alphanohtml');
if (empty($xmlremote) && getDolGlobalString('MAIN_FILECHECK_URL')) {
$xmlremote = $conf->global->MAIN_FILECHECK_URL;
$xmlremote = getDolGlobalString('MAIN_FILECHECK_URL');
}
$param = 'MAIN_FILECHECK_URL_'.DOL_VERSION;
if (empty($xmlremote) && getDolGlobalString($param)) {

View file

@ -238,7 +238,7 @@ if (in_array($type, array('mysql', 'mysqli'))) {
if (!getDolGlobalString('SYSTEMTOOLS_MYSQLDUMP')) {
$fullpathofmysqldump = $db->getPathOfDump();
} else {
$fullpathofmysqldump = $conf->global->SYSTEMTOOLS_MYSQLDUMP;
$fullpathofmysqldump = getDolGlobalString('SYSTEMTOOLS_MYSQLDUMP');
}
print '<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.'">';
print '</fieldset>';
@ -281,7 +281,7 @@ if (in_array($type, array('mysql', 'mysqli'))) {
$execmethod = 0;
if (getDolGlobalString('MAIN_EXEC_USE_POPEN')) {
$execmethod = $conf->global->MAIN_EXEC_USE_POPEN;
$execmethod = getDolGlobalString('MAIN_EXEC_USE_POPEN');
}
if (empty($execmethod)) {
$execmethod = 1;
@ -409,7 +409,7 @@ if (in_array($type, array('pgsql'))) {
if (!getDolGlobalString('SYSTEMTOOLS_POSTGRESQLDUMP')) {
$fullpathofpgdump = $db->getPathOfDump();
} else {
$fullpathofpgdump = $conf->global->SYSTEMTOOLS_POSTGRESQLDUMP;
$fullpathofpgdump = getDolGlobalString('SYSTEMTOOLS_POSTGRESQLDUMP');
}
print '<br>';
print '<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.'" />';

View file

@ -700,7 +700,7 @@ function fieldListWebsites($fieldlist, $obj = null, $tabname = '', $context = ''
if ($fieldlist[$field] == 'lang') {
print '<td>';
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
print $formadmin->select_language(getDolGlobalString('MAIN_LANG_DEFAULT'), 'lang');
print '</td>';
} elseif ($fieldlist[$field] == 'code' && isset($obj->$fieldname)) {
print '<td><input type="text" class="flat" value="'.(!empty($obj->$fieldname) ? $obj->$fieldname : '').'" size="10" name="'.$fieldlist[$field].'"></td>';

View file

@ -2030,7 +2030,7 @@ class Setup extends DolibarrApi
// Remote file to compare to
$xmlremote = ($target == 'default' ? '' : $target);
if (empty($xmlremote) && getDolGlobalString('MAIN_FILECHECK_URL')) {
$xmlremote = $conf->global->MAIN_FILECHECK_URL;
$xmlremote = getDolGlobalString('MAIN_FILECHECK_URL');
}
$param = 'MAIN_FILECHECK_URL_'.DOL_VERSION;
if (empty($xmlremote) && getDolGlobalString($param)) {

View file

@ -129,7 +129,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, '', 0, 0, '', '', '', 'mod-asset page-card_agenda');

View file

@ -1550,7 +1550,7 @@ class Asset extends CommonObject
$mybool = false;
$file = getDolGlobalString('ASSET_ASSET_ADDON') . ".php";
$classname = $conf->global->ASSET_ASSET_ADDON;
$classname = getDolGlobalString('ASSET_ASSET_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);

View file

@ -135,7 +135,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, '', 0, 0, '', '', '', 'mod-asset page-model-card_agenda');

View file

@ -120,29 +120,29 @@ $caller = GETPOST('caller', 'alphanohtml');
$called = GETPOST('called', 'alphanohtml');
// IP address of Asterisk server
$strHost = $conf->global->ASTERISK_HOST;
$strHost = getDolGlobalString('ASTERISK_HOST');
// Specify the type of extension through which your extension is connected.
// ex: SIP/, IAX2/, ZAP/, etc
$channel = $conf->global->ASTERISK_TYPE;
$channel = getDolGlobalString('ASTERISK_TYPE');
// Outgoing call sign
$prefix = $conf->global->ASTERISK_INDICATIF;
$prefix = getDolGlobalString('ASTERISK_INDICATIF');
// Asterisk Port
$port = $conf->global->ASTERISK_PORT;
$port = getDolGlobalString('ASTERISK_PORT');
// Context ( generalement from-internal )
$strContext = $conf->global->ASTERISK_CONTEXT;
$strContext = getDolGlobalString('ASTERISK_CONTEXT');
// Waiting time before hanging up
$strWaitTime = $conf->global->ASTERISK_WAIT_TIME;
$strWaitTime = getDolGlobalString('ASTERISK_WAIT_TIME');
// Priority
$strPriority = $conf->global->ASTERISK_PRIORITY;
$strPriority = getDolGlobalString('ASTERISK_PRIORITY');
// Number of call attempts
$strMaxRetry = $conf->global->ASTERISK_MAX_RETRY;
$strMaxRetry = getDolGlobalString('ASTERISK_MAX_RETRY');
/*

View file

@ -84,7 +84,7 @@ if (GETPOST('submitproduct') && GETPOST('submitproduct')) {
$fk_barcode_type = $producttmp->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');
}
if (empty($forbarcode) || empty($fk_barcode_type)) {
@ -100,7 +100,7 @@ if (GETPOST('submitthirdparty') && GETPOST('submitthirdparty')) {
$fk_barcode_type = $thirdpartytmp->barcode_type_code;
if (empty($fk_barcode_type) && getDolGlobalString('GENBARCODE_BARCODETYPE_THIRDPARTY')) {
$fk_barcode_type = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY;
$fk_barcode_type = getDolGlobalString('GENBARCODE_BARCODETYPE_THIRDPARTY');
}
if (empty($forbarcode) || empty($fk_barcode_type)) {

View file

@ -131,7 +131,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|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Agenda';
llxHeader('', $title, $help_url);

View file

@ -878,7 +878,7 @@ class BOM extends CommonObject
$mybool = false;
$file = getDolGlobalString('BOM_ADDON') . ".php";
$classname = $conf->global->BOM_ADDON;
$classname = getDolGlobalString('BOM_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@ -1351,7 +1351,7 @@ class BOM extends CommonObject
if ($this->model_pdf) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('BOM_ADDON_PDF')) {
$modele = $conf->global->BOM_ADDON_PDF;
$modele = getDolGlobalString('BOM_ADDON_PDF');
}
}

View file

@ -137,7 +137,7 @@ if ($user->hasRight('bookcal', 'availabilities', 'read') && isModEnabled('bookca
print '</div><div class="fichetwothirdright">';
$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
$NBMAX = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT');
$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT

View file

@ -1007,7 +1007,7 @@ class Availabilities extends CommonObject
$mybool = false;
$file = getDolGlobalString('BOOKCAL_AVAILABILITIES_ADDON') . ".php";
$classname = $conf->global->BOOKCAL_AVAILABILITIES_ADDON;
$classname = getDolGlobalString('BOOKCAL_AVAILABILITIES_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@ -1070,7 +1070,7 @@ class Availabilities extends CommonObject
if (!empty($this->model_pdf)) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('AVAILABILITIES_ADDON_PDF')) {
$modele = $conf->global->AVAILABILITIES_ADDON_PDF;
$modele = getDolGlobalString('AVAILABILITIES_ADDON_PDF');
}
}

View file

@ -48,7 +48,7 @@ if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) {
if (!getDolGlobalString('AGENDA_EXT_NB')) {
$conf->global->AGENDA_EXT_NB = 5;
}
$MAXAGENDA = $conf->global->AGENDA_EXT_NB;
$MAXAGENDA = getDolGlobalString('AGENDA_EXT_NB');
$DELAYFORCACHE = 300; // 300 seconds
$disabledefaultvalues = GETPOST('disabledefaultvalues', 'int');

View file

@ -170,7 +170,7 @@ if ($resql) {
$modulepart = 'actionsreport';
$documenturl = DOL_URL_ROOT.'/document.php';
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) {
$documenturl = $conf->global->DOL_URL_ROOT_DOCUMENT_PHP; // To use another wrapper
$documenturl = getDolGlobalString('DOL_URL_ROOT_DOCUMENT_PHP'); // To use another wrapper
}
if (file_exists($file)) {

View file

@ -693,7 +693,7 @@ if ($object->id > 0) {
$boxstat = '';
// Nbre max d'elements des petites listes
$MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
$MAXLIST = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT');
// Lien recap
$boxstat .= '<div class="box divboxtable box-halfright">';

View file

@ -853,9 +853,9 @@ if ($action == 'create') {
*/
if ($action == 'sendall') {
// Define message to recommand from command line
$sendingmode = $conf->global->EMAILING_MAIL_SENDMODE;
$sendingmode = getDolGlobalString('EMAILING_MAIL_SENDMODE');
if (empty($sendingmode)) {
$sendingmode = $conf->global->MAIN_MAIL_SENDMODE;
$sendingmode = getDolGlobalString('MAIN_MAIL_SENDMODE');
}
if (empty($sendingmode)) {
$sendingmode = 'mail'; // If not defined, we use php mail function
@ -1147,7 +1147,7 @@ if ($action == 'create') {
$formmail->withfrom = 0;
$formmail->withto = $user->email ? $user->email : 1;
$formmail->withtocc = 0;
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
$formmail->withtoccc = getDolGlobalString('MAIN_EMAIL_USECCC');
$formmail->withtopic = 0;
$formmail->withtopicreadonly = 1;
$formmail->withfile = 0;

View file

@ -126,7 +126,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);

View file

@ -1840,7 +1840,7 @@ if ($action == 'create') {
}
if (isModEnabled('stock') && empty($warehouse_id) && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')) {
if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE')) {
$warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
$warehouse_id = getDolGlobalString('MAIN_DEFAULT_WAREHOUSE');
}
if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE_USER')) {
$warehouse_id = $user->fk_warehouse;

View file

@ -3670,7 +3670,7 @@ class Propal extends CommonObject
global $conf, $langs;
$langs->load("propal");
$classname = $conf->global->PROPALE_ADDON;
$classname = getDolGlobalString('PROPALE_ADDON');
if (!empty($classname)) {
$mybool = false;
@ -3945,7 +3945,7 @@ class Propal extends CommonObject
if ($this->model_pdf) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('PROPALE_ADDON_PDF')) {
$modele = $conf->global->PROPALE_ADDON_PDF;
$modele = getDolGlobalString('PROPALE_ADDON_PDF');
}
}

View file

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

View file

@ -126,7 +126,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, '', 0, 0, '', '', '', 'mod-order page-card_agenda');

View file

@ -1803,7 +1803,7 @@ if ($action == 'create' && $usercancreate) {
}
if (isModEnabled('stock') && empty($warehouse_id) && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')) {
if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE')) {
$warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
$warehouse_id = getDolGlobalString('MAIN_DEFAULT_WAREHOUSE');
}
if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE_USER')) {
$warehouse_id = $user->fk_warehouse;
@ -2016,7 +2016,7 @@ if ($action == 'create' && $usercancreate) {
print '<td>';
include_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php';
$liste = ModelePDFCommandes::liste_modeles($db);
$preselected = $conf->global->COMMANDE_ADDON_PDF;
$preselected = getDolGlobalString('COMMANDE_ADDON_PDF');
print img_picto('', 'pdf', 'class="pictofixedwidth"');
print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth200 widthcentpercentminusx', 1);
print "</td></tr>";

View file

@ -424,7 +424,7 @@ class Commande extends CommonOrder
$mybool = false;
$file = getDolGlobalString('COMMANDE_ADDON') . ".php";
$classname = $conf->global->COMMANDE_ADDON;
$classname = getDolGlobalString('COMMANDE_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@ -4132,7 +4132,7 @@ class Commande extends CommonOrder
if (!empty($this->model_pdf)) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('COMMANDE_ADDON_PDF')) {
$modele = $conf->global->COMMANDE_ADDON_PDF;
$modele = getDolGlobalString('COMMANDE_ADDON_PDF');
}
}

View file

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

View file

@ -85,7 +85,7 @@ if (isModEnabled('categorie')) {
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');
}
}

View file

@ -126,7 +126,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);

View file

@ -3831,11 +3831,11 @@ if ($action == 'create') {
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('PaymentConditionsShortRetainedWarranty').'</td><td colspan="2">';
$retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
if (empty($retained_warranty_fk_cond_reglement)) {
$retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
$retained_warranty_fk_cond_reglement = getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID');
if (!empty($objectsrc->retained_warranty_fk_cond_reglement)) { // use previous situation value
$retained_warranty_fk_cond_reglement = $objectsrc->retained_warranty_fk_cond_reglement;
} else {
$retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
$retained_warranty_fk_cond_reglement = getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID');
}
}
print $form->getSelectConditionsPaiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);

View file

@ -4576,7 +4576,7 @@ class Facture extends CommonInvoice
$conf->global->TAKEPOS_REF_ADDON = 'mod_takepos_ref_simple';
}
$addon = $conf->global->TAKEPOS_REF_ADDON;
$addon = getDolGlobalString('TAKEPOS_REF_ADDON');
} else {
$langs->load('bills');
@ -4593,7 +4593,7 @@ class Facture extends CommonInvoice
$conf->global->FACTURE_ADDON = 'mod_facture_mercure';
}
$addon = $conf->global->FACTURE_ADDON;
$addon = getDolGlobalString('FACTURE_ADDON');
}
if (!empty($addon)) {
@ -5222,7 +5222,7 @@ class Facture extends CommonInvoice
} elseif (getDolGlobalString($thisTypeConfName)) {
$modele = getDolGlobalString($thisTypeConfName);
} elseif (getDolGlobalString('FACTURE_ADDON_PDF')) {
$modele = $conf->global->FACTURE_ADDON_PDF;
$modele = getDolGlobalString('FACTURE_ADDON_PDF');
}
}
@ -5785,7 +5785,7 @@ class Facture extends CommonInvoice
}
// Errors Recipient
$errors_to = $conf->global->MAIN_MAIL_ERRORS_TO;
$errors_to = getDolGlobalString('MAIN_MAIL_ERRORS_TO');
$trackid = 'inv'.$tmpinvoice->id;
$sendcontext = 'standard';

View file

@ -162,7 +162,7 @@ if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('b
} // If $page is not defined, or '' or -1 or if we click on clear filters
$offset = $limit * $page;
if (!$sortorder && getDolGlobalString('INVOICE_DEFAULT_UNPAYED_SORT_ORDER') && $search_status == '1') {
$sortorder = $conf->global->INVOICE_DEFAULT_UNPAYED_SORT_ORDER;
$sortorder = getDolGlobalString('INVOICE_DEFAULT_UNPAYED_SORT_ORDER');
}
if (!$sortorder) {
$sortorder = 'DESC';

View file

@ -363,7 +363,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
// TODO add hook here
if (isModEnabled('paypalplus') && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && !empty($facture->ref_ext)) {
if (getDolGlobalString('PAYPAL_BANK_ACCOUNT')) {
$accountid = $conf->global->PAYPAL_BANK_ACCOUNT;
$accountid = getDolGlobalString('PAYPAL_BANK_ACCOUNT');
}
$paymentnum = $facture->ref_ext;
}

View file

@ -412,7 +412,7 @@ class RemiseCheque extends CommonObject
$mybool = false;
$file = getDolGlobalString('CHEQUERECEIPTS_ADDON') . ".php";
$classname = $conf->global->CHEQUERECEIPTS_ADDON;
$classname = getDolGlobalString('CHEQUERECEIPTS_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);

View file

@ -1125,7 +1125,7 @@ class Paiement extends CommonObject
$mybool = false;
$file = getDolGlobalString('PAYMENT_ADDON') . ".php";
$classname = $conf->global->PAYMENT_ADDON;
$classname = getDolGlobalString('PAYMENT_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);

View file

@ -136,7 +136,7 @@ $nbofyear = ($year_end - $year_start) + 1;
//var_dump("year_start=".$year_start." year_end=".$year_end." nbofyear=".$nbofyear." date_start=".dol_print_date($date_start, 'dayhour')." date_end=".dol_print_date($date_end, 'dayhour'));
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (isModEnabled('accounting')) {
$modecompta = 'BOOKKEEPING';
}

View file

@ -112,7 +112,7 @@ $nbofyear = ($year_end - $year_start) + 1;
//var_dump("year_start=".$year_start." year_end=".$year_end." nbofyear=".$nbofyear." date_start=".dol_print_date($date_start, 'dayhour')." date_end=".dol_print_date($date_end, 'dayhour'));
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (isModEnabled('accounting')) {
$modecompta = 'BOOKKEEPING';
}

View file

@ -140,7 +140,7 @@ if ($cat_id == 0) {
}
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (isModEnabled('accounting')) {
$modecompta = 'BOOKKEEPING';
}

View file

@ -49,7 +49,7 @@ if (isModEnabled('accounting')) {
}
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (GETPOST("modecompta")) {
$modecompta = GETPOST("modecompta");
}

View file

@ -48,7 +48,7 @@ if (isModEnabled('accounting')) {
}
$hookmanager->initHooks(['cabyuserreportlist']);
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (GETPOST("modecompta")) {
$modecompta = GETPOST("modecompta");
}

View file

@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$langs->loadLangs(array('companies', 'categories', 'bills', 'compta'));
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (GETPOST("modecompta")) {
$modecompta = GETPOST("modecompta");
}

View file

@ -104,7 +104,7 @@ $year_end = $tmpe['year'];
$nbofyear = ($year_end - $year_start) + 1;
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (isModEnabled('accounting')) {
$modecompta = 'BOOKKEEPING';
}

View file

@ -101,7 +101,7 @@ $year_end = $tmpe['year'];
$nbofyear = ($year_end - $year_start) + 1;
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (isModEnabled('accounting')) {
$modecompta = 'BOOKKEEPING';
}

View file

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$langs->loadLangs(array("products", "categories", "errors", 'accountancy'));
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (GETPOST("modecompta")) {
$modecompta = GETPOST("modecompta");
}

View file

@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$langs->loadLangs(array('companies', 'categories', 'bills', 'compta'));
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->ACCOUNTING_MODE;
$modecompta = getDolGlobalString('ACCOUNTING_MODE');
if (GETPOST("modecompta")) {
$modecompta = GETPOST("modecompta");
}

View file

@ -754,7 +754,7 @@ class Contact extends CommonObject
if ($mode == 0) {
$dn = getDolGlobalString('LDAP_KEY_CONTACTS') . "=".$info[getDolGlobalString('LDAP_KEY_CONTACTS')]."," . getDolGlobalString('LDAP_CONTACT_DN');
} elseif ($mode == 1) {
$dn = $conf->global->LDAP_CONTACT_DN;
$dn = getDolGlobalString('LDAP_CONTACT_DN');
} elseif ($mode == 2) {
$dn = getDolGlobalString('LDAP_KEY_CONTACTS') . "=".$info[getDolGlobalString('LDAP_KEY_CONTACTS')];
}

View file

@ -65,10 +65,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) {

View file

@ -1765,7 +1765,7 @@ if ($action == 'create') {
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$nbrows = ROWS_2;
if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) {
$nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT;
$nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT');
}
$enable = (isset($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0);
$doleditor = new DolEditor('product_desc', $objp->description, '', 92, 'dolibarr_details', '', false, true, $enable, $nbrows, '90%');

View file

@ -300,7 +300,7 @@ class Contrat extends CommonObject
$mybool = false;
$file = getDolGlobalString('CONTRACT_ADDON') . ".php";
$classname = $conf->global->CONTRACT_ADDON;
$classname = getDolGlobalString('CONTRACT_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@ -2555,7 +2555,7 @@ class Contrat extends CommonObject
if (!empty($this->model_pdf)) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('CONTRACT_ADDON_PDF')) {
$modele = $conf->global->CONTRACT_ADDON_PDF;
$modele = getDolGlobalString('CONTRACT_ADDON_PDF');
}
}
@ -2655,7 +2655,7 @@ class Contrat extends CommonObject
// Set ref
require_once DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').'.php';
$obj = $conf->global->CONTRACT_ADDON;
$obj = getDolGlobalString('CONTRACT_ADDON');
$modContract = new $obj();
$clonedObj->ref = $modContract->getNextValue($objsoc, $clonedObj);

View file

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

View file

@ -1619,12 +1619,12 @@ if (!$error && ($massaction == 'approveleave' || ($action == 'approveleave' && $
$expediteur = new User($db);
$expediteur->fetch($objecttmp->fk_validator);
//$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("HolidaysValidated");

View file

@ -79,7 +79,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
$this->info_box_head = array('text' => $langs->trans("BoxTitleSuspenseAccount"));
if ($user->hasRight('accounting', 'mouvements', 'lire')) {
$suspenseAccount = $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE;
$suspenseAccount = getDolGlobalString('ACCOUNTING_ACCOUNT_SUSPENSE');
if (!empty($suspenseAccount) && $suspenseAccount > 0) {
$sql = "SELECT COUNT(*) as nb_suspense_account";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b";

View file

@ -60,7 +60,7 @@ class box_activity extends ModeleBoxes
$this->db = $db;
// FIXME: Pb into some status
$this->enabled = ($conf->global->MAIN_FEATURES_LEVEL); // Not enabled by default due to bugs (see previous comments)
$this->enabled = (getDolGlobalString('MAIN_FEATURES_LEVEL')); // Not enabled by default due to bugs (see previous comments)
$this->hidden = !(
(isModEnabled('facture') && $user->hasRight('facture', 'read'))
@ -92,7 +92,7 @@ class box_activity extends ModeleBoxes
$conf->global->MAIN_ACTIVATE_FILECACHE = 1;
if (getDolGlobalString('MAIN_BOX_ACTIVITY_DURATION')) {
$nbofperiod = $conf->global->MAIN_BOX_ACTIVITY_DURATION;
$nbofperiod = getDolGlobalString('MAIN_BOX_ACTIVITY_DURATION');
}
$textHead = $langs->trans("Activity").' - '.$langs->trans("LastXMonthRolling", $nbofperiod);

View file

@ -924,11 +924,11 @@ class CMailFile
$loginid = '';
$loginpass = '';
if (!empty($conf->global->$keyforsmtpid)) {
$loginid = $conf->global->$keyforsmtpid;
$loginid = getDolGlobalString($keyforsmtpid);
$this->smtps->setID($loginid);
}
if (!empty($conf->global->$keyforsmtppw)) {
$loginpass = $conf->global->$keyforsmtppw;
$loginpass = getDolGlobalString($keyforsmtppw);
$this->smtps->setPW($loginpass);
}
@ -1162,9 +1162,9 @@ class CMailFile
// DKIM SIGN
if (getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_ENABLED')) {
$privateKey = $conf->global->MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY;
$domainName = $conf->global->MAIN_MAIL_EMAIL_DKIM_DOMAIN;
$selector = $conf->global->MAIN_MAIL_EMAIL_DKIM_SELECTOR;
$privateKey = getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY');
$domainName = getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_DOMAIN');
$selector = getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_SELECTOR');
$signer = new Swift_Signers_DKIMSigner($privateKey, $domainName, $selector);
$this->message->attachSigner($signer->ignoreHeader('Return-Path'));
}

View file

@ -138,8 +138,8 @@ class AntiVir
$bz2archivememlim = 0; // limit memory usage for bzip2 (0/1)
$maxfilesize = 10485760; // archived files larger than this value (in bytes) will not be scanned
$command = $conf->global->MAIN_ANTIVIRUS_COMMAND;
$param = $conf->global->MAIN_ANTIVIRUS_PARAM;
$command = getDolGlobalString('MAIN_ANTIVIRUS_COMMAND');
$param = getDolGlobalString('MAIN_ANTIVIRUS_PARAM');
$param = preg_replace('/%maxreclevel/', $maxreclevel, $param);
$param = preg_replace('/%maxfiles/', $maxfiles, $param);

View file

@ -1822,9 +1822,9 @@ abstract class CommonObject
$idtype = $this->barcode_type;
if (empty($idtype) && $idtype != '0') { // If type of barcode no set, we try to guess. If set to '0' it means we forced to have type remain not defined
if ($this->element == 'product' && getDolGlobalString('PRODUIT_DEFAULT_BARCODE_TYPE')) {
$idtype = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE;
$idtype = getDolGlobalString('PRODUIT_DEFAULT_BARCODE_TYPE');
} elseif ($this->element == 'societe') {
$idtype = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY;
$idtype = getDolGlobalString('GENBARCODE_BARCODETYPE_THIRDPARTY');
} else {
dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING);
}

View file

@ -150,7 +150,7 @@ trait CommonPeople
// List of extra languages
$arrayoflangcode = array();
if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) {
$arrayoflangcode[] = $conf->global->PDF_USE_ALSO_LANGUAGE_CODE;
$arrayoflangcode[] = getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE');
}
if (is_array($arrayoflangcode) && count($arrayoflangcode)) {

View file

@ -53,7 +53,7 @@ class DolGeoIP
$geoipversion = '2'; // 'php', or geoip version '2'
if (getDolGlobalString('GEOIP_VERSION')) {
$geoipversion = $conf->global->GEOIP_VERSION;
$geoipversion = getDolGlobalString('GEOIP_VERSION');
}
if ($type == 'country') {
@ -122,7 +122,7 @@ class DolGeoIP
$geoipversion = '2'; // 'php', or '2'
if (getDolGlobalString('GEOIP_VERSION')) {
$geoipversion = $conf->global->GEOIP_VERSION;
$geoipversion = getDolGlobalString('GEOIP_VERSION');
}
if (empty($this->gi)) {
@ -180,7 +180,7 @@ class DolGeoIP
$geoipversion = '2'; // 'php', or '2'
if (getDolGlobalString('GEOIP_VERSION')) {
$geoipversion = $conf->global->GEOIP_VERSION;
$geoipversion = getDolGlobalString('GEOIP_VERSION');
}
if (empty($this->gi)) {
@ -211,7 +211,7 @@ class DolGeoIP
$geoipversion = '2'; // 'php', or '2'
if (getDolGlobalString('GEOIP_VERSION')) {
$geoipversion = $conf->global->GEOIP_VERSION;
$geoipversion = getDolGlobalString('GEOIP_VERSION');
}
if ($geoipversion == 'php') {

View file

@ -423,7 +423,7 @@ class Form
// List of extra languages
$arrayoflangcode = array();
if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) {
$arrayoflangcode[] = $conf->global->PDF_USE_ALSO_LANGUAGE_CODE;
$arrayoflangcode[] = getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE');
}
if (is_array($arrayoflangcode) && count($arrayoflangcode)) {
@ -4348,7 +4348,7 @@ class Form
// Set default value if not already set by caller
if (empty($selected) && getDolGlobalString('MAIN_DEFAULT_PAYMENT_TERM_ID')) {
dol_syslog(__METHOD__ . "Using deprecated option MAIN_DEFAULT_PAYMENT_TERM_ID", LOG_NOTICE);
$selected = $conf->global->MAIN_DEFAULT_PAYMENT_TERM_ID;
$selected = getDolGlobalString('MAIN_DEFAULT_PAYMENT_TERM_ID');
}
$out .= '<select id="' . $htmlname . '" class="flat selectpaymentterms' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '">';
@ -4453,7 +4453,7 @@ class Form
// Set default value if not already set by caller
if (empty($selected) && getDolGlobalString('MAIN_DEFAULT_PAYMENT_TYPE_ID')) {
dol_syslog(__METHOD__ . "Using deprecated option MAIN_DEFAULT_PAYMENT_TYPE_ID", LOG_NOTICE);
$selected = $conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID;
$selected = getDolGlobalString('MAIN_DEFAULT_PAYMENT_TYPE_ID');
}
$out .= '<select id="select' . $htmlname . '" class="flat selectpaymenttypes' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '">';
@ -6566,7 +6566,7 @@ class Form
// We will use the rate defined into MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS
$defaulttx = '';
if (getDolGlobalString('MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS') != 'none') {
$defaulttx = $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS;
$defaulttx = getDolGlobalString('MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS');
}
if (preg_match('/\((.*)\)/', $defaulttx, $reg)) {
$defaultcode = $reg[1];
@ -9684,7 +9684,7 @@ class Form
// List of extra languages
$arrayoflangcode = array();
if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) {
$arrayoflangcode[] = $conf->global->PDF_USE_ALSO_LANGUAGE_CODE;
$arrayoflangcode[] = getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE');
}
if (is_array($arrayoflangcode) && count($arrayoflangcode)) {

View file

@ -877,7 +877,7 @@ class FormFile
$documenturl = DOL_URL_ROOT.'/document.php';
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) {
$documenturl = $conf->global->DOL_URL_ROOT_DOCUMENT_PHP; // To use another wrapper
$documenturl = getDolGlobalString('DOL_URL_ROOT_DOCUMENT_PHP'); // To use another wrapper
}
// Show file name with link to download

View file

@ -631,7 +631,7 @@ class FormMail extends Form
// Also add robot email
if (!empty($this->fromalsorobot)) {
if (getDolGlobalString('MAIN_MAIL_EMAIL_FROM') && getDolGlobalString('MAIN_MAIL_EMAIL_FROM') != getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')) {
$s = $conf->global->MAIN_MAIL_EMAIL_FROM;
$s = getDolGlobalString('MAIN_MAIL_EMAIL_FROM');
if ($this->frommail) {
$s .= ' &lt;' . getDolGlobalString('MAIN_MAIL_EMAIL_FROM').'&gt;';
}
@ -1239,25 +1239,25 @@ class FormMail extends Form
$showinfobcc = '';
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROPOSAL_TO') && !empty($this->param['models']) && $this->param['models'] == 'propal_send') {
$showinfobcc = $conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO;
$showinfobcc = getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROPOSAL_TO');
}
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_ORDER_TO') && !empty($this->param['models']) && $this->param['models'] == 'order_send') {
$showinfobcc = $conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO;
$showinfobcc = getDolGlobalString('MAIN_MAIL_AUTOCOPY_ORDER_TO');
}
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_INVOICE_TO') && !empty($this->param['models']) && $this->param['models'] == 'facture_send') {
$showinfobcc = $conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO;
$showinfobcc = getDolGlobalString('MAIN_MAIL_AUTOCOPY_INVOICE_TO');
}
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO') && !empty($this->param['models']) && $this->param['models'] == 'supplier_proposal_send') {
$showinfobcc = $conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO;
$showinfobcc = getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO');
}
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO') && !empty($this->param['models']) && $this->param['models'] == 'order_supplier_send') {
$showinfobcc = $conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO;
$showinfobcc = getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO');
}
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO') && !empty($this->param['models']) && $this->param['models'] == 'invoice_supplier_send') {
$showinfobcc = $conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO;
$showinfobcc = getDolGlobalString('MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO');
}
if (getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROJECT_TO') && !empty($this->param['models']) && $this->param['models'] == 'project') {
$showinfobcc = $conf->global->MAIN_MAIL_AUTOCOPY_PROJECT_TO;
$showinfobcc = getDolGlobalString('MAIN_MAIL_AUTOCOPY_PROJECT_TO');
}
if ($showinfobcc) {
$out .= ' + '.$showinfobcc;
@ -1721,7 +1721,7 @@ class FormMail extends Form
$onlinepaymentenabled++;
}
if ($onlinepaymentenabled && getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
$tmparray['__SECUREKEYPAYMENT__'] = $conf->global->PAYMENT_SECURITY_TOKEN;
$tmparray['__SECUREKEYPAYMENT__'] = getDolGlobalString('PAYMENT_SECURITY_TOKEN');
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
if (isModEnabled('adherent')) {
$tmparray['__SECUREKEYPAYMENT_MEMBER__'] = 'SecureKeyPAYMENTUniquePerMember';

View file

@ -1364,7 +1364,7 @@ class FormOther
// Define $box_max_lines
$box_max_lines = 5;
if (getDolGlobalString('MAIN_BOXES_MAXLINES')) {
$box_max_lines = $conf->global->MAIN_BOXES_MAXLINES;
$box_max_lines = getDolGlobalString('MAIN_BOXES_MAXLINES');
}
$ii = 0;

View file

@ -221,10 +221,10 @@ class Ldap
// Server
if (getDolGlobalString('LDAP_SERVER_HOST')) {
$this->server[] = $conf->global->LDAP_SERVER_HOST;
$this->server[] = getDolGlobalString('LDAP_SERVER_HOST');
}
if (getDolGlobalString('LDAP_SERVER_HOST_SLAVE')) {
$this->server[] = $conf->global->LDAP_SERVER_HOST_SLAVE;
$this->server[] = getDolGlobalString('LDAP_SERVER_HOST_SLAVE');
}
$this->serverPort = getDolGlobalInt('LDAP_SERVER_PORT', 389);
$this->ldapProtocolVersion = getDolGlobalString('LDAP_SERVER_PROTOCOLVERSION');

View file

@ -395,7 +395,7 @@ class Notify
// Define some vars
$application = 'Dolibarr';
if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
$application = $conf->global->MAIN_APPLICATION_TITLE;
$application = getDolGlobalString('MAIN_APPLICATION_TITLE');
}
$replyto = $conf->notification->email_from;
$object_type = '';
@ -507,7 +507,7 @@ class Notify
$link = '<a href="'.$urlwithroot.'/commande/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->commande->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'commande');
$object_type = 'order';
$labeltouse = $conf->global->ORDER_CLOSE_TEMPLATE;
$labeltouse = getDolGlobalString('ORDER_CLOSE_TEMPLATE');
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextOrderClose", $link);
break;
case 'PROPAL_VALIDATE':
@ -520,7 +520,7 @@ class Notify
$link = '<a href="'.$urlwithroot.'/comm/propal/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');
$object_type = 'propal';
$labeltouse = $conf->global->PROPAL_CLOSE_REFUSED_TEMPLATE;
$labeltouse = getDolGlobalString('PROPAL_CLOSE_REFUSED_TEMPLATE');
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalClosedRefused", $link);
if (!empty($object->context['closedfromonlinesignature'])) {
$mesg .= ' - From online page';

View file

@ -368,7 +368,7 @@ class SimpleOpenID
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
if (empty($url)) {
$url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL;
$url = getDolGlobalString('MAIN_AUTHENTICATION_OPENID_URL');
}
$response = getURLContent($url, 'GET', '', 1, array(), array('http', 'https'));
@ -493,7 +493,7 @@ class SimpleOpenID
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
if (empty($url)) {
$url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL;
$url = getDolGlobalString('MAIN_AUTHENTICATION_OPENID_URL');
}
dol_syslog(get_class($this).'::sendDiscoveryRequestToGetXRDS get XRDS');

View file

@ -494,7 +494,7 @@ class SMTPs
if (getDolGlobalString('MAIL_SMTP_USE_FROM_FOR_HELO')) {
if (!is_numeric($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO)) {
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is a string, we use it as domain name
$hosth = $conf->global->MAIL_SMTP_USE_FROM_FOR_HELO;
$hosth = getDolGlobalString('MAIL_SMTP_USE_FROM_FOR_HELO');
} elseif (getDolGlobalInt('MAIL_SMTP_USE_FROM_FOR_HELO') == 1) {
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is 1, we use the domain in the from.
// So if the from to is 'aaa <bbb@ccc.com>', we will keep 'ccc.com'
@ -684,7 +684,7 @@ class SMTPs
if (getDolGlobalString('MAIL_SMTP_USE_FROM_FOR_HELO')) {
if (!is_numeric($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO)) {
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is a string, we use it as domain name
$hosth = $conf->global->MAIL_SMTP_USE_FROM_FOR_HELO;
$hosth = getDolGlobalString('MAIL_SMTP_USE_FROM_FOR_HELO');
} elseif (getDolGlobalInt('MAIL_SMTP_USE_FROM_FOR_HELO') == 1) {
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is 1, we use the domain in the from.
// So if the from to is 'aaa <bbb@ccc.com>', we will keep 'ccc.com'

View file

@ -953,7 +953,7 @@ class TimeSpent extends CommonObject
$mybool = false;
$file = getDolGlobalString('TIMESPENT_timespent_ADDON') . ".php";
$classname = $conf->global->TIMESPENT_timespent_ADDON;
$classname = getDolGlobalString('TIMESPENT_timespent_ADDON');
// Include file with class
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
@ -1016,7 +1016,7 @@ class TimeSpent extends CommonObject
if (!empty($this->model_pdf)) {
$modele = $this->model_pdf;
} elseif (getDolGlobalString('timespent_ADDON_PDF')) {
$modele = $conf->global->timespent_ADDON_PDF;
$modele = getDolGlobalString('timespent_ADDON_PDF');
}
}

View file

@ -131,7 +131,7 @@ class Utils
}
if (isModEnabled('syslog')) {
$filelog = $conf->global->SYSLOG_FILE;
$filelog = getDolGlobalString('SYSLOG_FILE');
$filelog = preg_replace('/DOL_DATA_ROOT/i', DOL_DATA_ROOT, $filelog);
$alreadyincluded = false;
@ -274,7 +274,7 @@ class Utils
if (!getDolGlobalString('SYSTEMTOOLS_MYSQLDUMP')) {
$cmddump = $db->getPathOfDump();
} else {
$cmddump = $conf->global->SYSTEMTOOLS_MYSQLDUMP;
$cmddump = getDolGlobalString('SYSTEMTOOLS_MYSQLDUMP');
}
if (empty($cmddump)) {
$this->error = "Failed to detect command to use for mysqldump. Try a manual backup before to set path of command.";
@ -410,7 +410,7 @@ class Utils
$ok = 0;
if ($handle) {
if (getDolGlobalString('MAIN_EXEC_USE_POPEN')) {
$execmethod = $conf->global->MAIN_EXEC_USE_POPEN;
$execmethod = getDolGlobalString('MAIN_EXEC_USE_POPEN');
}
if (empty($execmethod)) {
$execmethod = 1;
@ -586,7 +586,7 @@ class Utils
// POSTGRESQL
if ($type == 'postgresql' || $type == 'pgsql') {
$cmddump = $conf->global->SYSTEMTOOLS_POSTGRESQLDUMP;
$cmddump = getDolGlobalString('SYSTEMTOOLS_POSTGRESQLDUMP');
$outputfile = $outputdir.'/'.$file;
// for compression format, we add extension
@ -714,7 +714,7 @@ class Utils
}
if (getDolGlobalString('MAIN_EXEC_USE_POPEN')) {
$execmethod = $conf->global->MAIN_EXEC_USE_POPEN;
$execmethod = getDolGlobalString('MAIN_EXEC_USE_POPEN');
}
if (empty($execmethod)) {
$execmethod = 1;

View file

@ -84,7 +84,7 @@ $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js");
// Note: not needed on Windows-based servers.
$newmask = '0644';
if (getDolGlobalString('MAIN_UMASK')) {
$newmask = $conf->global->MAIN_UMASK;
$newmask = getDolGlobalString('MAIN_UMASK');
}
$Config['ChmodOnUpload'] = $newmask;

View file

@ -71,7 +71,7 @@ print '<div style="padding: 20px;">';
// 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

View file

@ -61,7 +61,7 @@ if (defined('PHP-BARCODE_PATH_COMMAND')) {
} else {
$genbarcode_loc = '';
if (getDolGlobalString('GENBARCODE_LOCATION')) {
$genbarcode_loc = $conf->global->GENBARCODE_LOCATION;
$genbarcode_loc = getDolGlobalString('GENBARCODE_LOCATION');
}
}

View file

@ -125,7 +125,7 @@ function dol_print_cron_urls()
$pathtoscript = '/pathtoscript';
if (getDolGlobalString('MAIN_DOL_SCRIPTS_ROOT')) {
$pathtoscript = $conf->global->MAIN_DOL_SCRIPTS_ROOT;
$pathtoscript = getDolGlobalString('MAIN_DOL_SCRIPTS_ROOT');
}
$file = $pathtoscript.'/scripts/cron/cron_run_jobs.php '.(!getDolGlobalString('CRON_KEY') ? 'securitykey' : '' . getDolGlobalString('CRON_KEY')).' '.$logintouse.' [cronjobid]';

View file

@ -690,7 +690,7 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask
return -3;
}
if (empty($newmask) && getDolGlobalString('MAIN_UMASK')) {
$newmask = $conf->global->MAIN_UMASK;
$newmask = getDolGlobalString('MAIN_UMASK');
}
if (empty($newmask)) { // This should no happen
dol_syslog("Warning: dolReplaceInFile called with empty value for newmask and no default value defined", LOG_WARNING);
@ -761,7 +761,7 @@ function dol_copy($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1, $te
return -3;
}
if (empty($newmask) && getDolGlobalString('MAIN_UMASK')) {
$newmask = $conf->global->MAIN_UMASK;
$newmask = getDolGlobalString('MAIN_UMASK');
}
if (empty($newmask)) { // This should no happen
dol_syslog("Warning: dol_copy called with empty value for newmask and no default value defined", LOG_WARNING);
@ -2509,7 +2509,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles =
$zip->close();
if (empty($newmask) && getDolGlobalString('MAIN_UMASK')) {
$newmask = $conf->global->MAIN_UMASK;
$newmask = getDolGlobalString('MAIN_UMASK');
}
if (empty($newmask)) { // This should no happen
dol_syslog("Warning: dol_copy called with empty value for newmask and no default value defined", LOG_WARNING);

View file

@ -3552,7 +3552,7 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
return '';
}
if (getDolGlobalString('MAIN_PHONE_SEPAR')) {
$separ = $conf->global->MAIN_PHONE_SEPAR;
$separ = getDolGlobalString('MAIN_PHONE_SEPAR');
}
if (empty($countrycode) && is_object($mysoc)) {
$countrycode = $mysoc->country_code;
@ -5465,7 +5465,7 @@ function dol_print_error_email($prefixcode, $errormessage = '', $errormessages =
global $langs, $conf;
if (empty($email)) {
$email = $conf->global->MAIN_INFO_SOCIETE_MAIL;
$email = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL');
}
$langs->load("errors");
@ -5911,7 +5911,7 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
//$pagesizechoices.=',0:'.$langs->trans("All"); // Not yet supported
//$pagesizechoices.=',2:2';
if (getDolGlobalString('MAIN_PAGESIZE_CHOICES')) {
$pagesizechoices = $conf->global->MAIN_PAGESIZE_CHOICES;
$pagesizechoices = getDolGlobalString('MAIN_PAGESIZE_CHOICES');
}
print '<li class="pagination">';
@ -6091,7 +6091,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
}
// Si on depasse max
if ($trunc && $nbdecimal > $conf->global->MAIN_MAX_DECIMALS_SHOWN) {
$nbdecimal = $conf->global->MAIN_MAX_DECIMALS_SHOWN;
$nbdecimal = getDolGlobalString('MAIN_MAX_DECIMALS_SHOWN');
if (preg_match('/\.\.\./i', $conf->global->MAIN_MAX_DECIMALS_SHOWN)) {
// Si un affichage est tronque, on montre des ...
$end = '...';
@ -6101,9 +6101,9 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
// If force rounding
if ((string) $forcerounding != '-1') {
if ($forcerounding === 'MU') {
$nbdecimal = $conf->global->MAIN_MAX_DECIMALS_UNIT;
$nbdecimal = getDolGlobalString('MAIN_MAX_DECIMALS_UNIT');
} elseif ($forcerounding === 'MT') {
$nbdecimal = $conf->global->MAIN_MAX_DECIMALS_TOT;
$nbdecimal = getDolGlobalString('MAIN_MAX_DECIMALS_TOT');
} elseif ($forcerounding >= 0) {
$nbdecimal = $forcerounding;
}
@ -6232,9 +6232,9 @@ function price2num($amount, $rounding = '', $option = 0)
if ($rounding) {
$nbofdectoround = '';
if ($rounding == 'MU') {
$nbofdectoround = $conf->global->MAIN_MAX_DECIMALS_UNIT;
$nbofdectoround = getDolGlobalString('MAIN_MAX_DECIMALS_UNIT');
} elseif ($rounding == 'MT') {
$nbofdectoround = $conf->global->MAIN_MAX_DECIMALS_TOT;
$nbofdectoround = getDolGlobalString('MAIN_MAX_DECIMALS_TOT');
} elseif ($rounding == 'MS') {
$nbofdectoround = isset($conf->global->MAIN_MAX_DECIMALS_STOCK) ? $conf->global->MAIN_MAX_DECIMALS_STOCK : 5;
} elseif ($rounding == 'CU') {
@ -6737,7 +6737,7 @@ function get_product_vat_for_country($idprod, $thirdpartytouse, $idprodfournpric
// or '1.23 (CODE)'
$defaulttx = '';
if (getDolGlobalString('MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS') != 'none') {
$defaulttx = $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS;
$defaulttx = getDolGlobalString('MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS');
}
/*if (preg_match('/\((.*)\)/', $defaulttx, $reg)) {
$defaultcode = $reg[1];
@ -9454,7 +9454,7 @@ function dol_osencode($str)
$tmp = 'utf-8'; // By default for other
}
if (getDolGlobalString('MAIN_FILESYSTEM_ENCODING')) {
$tmp = $conf->global->MAIN_FILESYSTEM_ENCODING;
$tmp = getDolGlobalString('MAIN_FILESYSTEM_ENCODING');
}
if ($tmp == 'iso-8859-1') {

View file

@ -1059,7 +1059,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
if (is_numeric($yearoffsettype) && $yearoffsettype >= 1) {
$maskraz = $yearoffsettype; // For backward compatibility
} elseif ($yearoffsettype === '0' || (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') > 1)) {
$maskraz = $conf->global->SOCIETE_FISCAL_MONTH_START;
$maskraz = getDolGlobalString('SOCIETE_FISCAL_MONTH_START');
}
//print "maskraz=".$maskraz; // -1=no reset

View file

@ -261,7 +261,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'y
$out = $urltouse.'/public/payment/newpayment.php?amount='.($mode ? '<span style="color: #666666">' : '').$amount.($mode ? '</span>' : '').'&tag='.($mode ? '<span style="color: #666666">' : '').$freetag.($mode ? '</span>' : '');
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
$out .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN'));
} else {
$out .= '&securekey='.urlencode(dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN'), 2));
}
@ -278,7 +278,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'y
$out .= ($mode ? '</span>' : '');
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
$out .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN'));
} else {
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
if ($mode == 1) {
@ -301,7 +301,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'y
$out .= ($mode ? '</span>' : '');
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
$out .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN'));
} else {
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
if ($mode == 1) {
@ -324,7 +324,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'y
$out .= ($mode ? '</span>' : '');
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
$out .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN'));
} else {
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
if ($mode == 1) {
@ -350,7 +350,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'y
$out .= ($mode ? '</span>' : '');
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
$out .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN'));
} else {
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
if ($mode == 1) {
@ -373,7 +373,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'y
$out .= ($mode ? '</span>' : '');
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
$out .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN'));
} else {
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
if ($mode == 1) {
@ -396,7 +396,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'y
$out .= ($mode ? '</span>' : '');
if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) {
if (!getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) {
$out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
$out .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN'));
} else {
$out .= '&securekey='.($mode ? '<span style="color: #666666">' : '');
if ($mode == 1) {

View file

@ -97,7 +97,7 @@ function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup')
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$pdfformat = dol_getDefaultFormat($outputlangs);
} else {
$pdfformat = $conf->global->MAIN_PDF_FORMAT;
$pdfformat = getDolGlobalString('MAIN_PDF_FORMAT');
}
$sql = "SELECT code, label, width, height, unit FROM ".MAIN_DB_PREFIX."c_paper_format";
@ -181,7 +181,7 @@ function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P')
$pdfa = false; // PDF-1.3
if (getDolGlobalString('PDF_USE_A')) {
$pdfa = $conf->global->PDF_USE_A; // PDF/A-1 ou PDF/A-3
$pdfa = getDolGlobalString('PDF_USE_A'); // PDF/A-1 ou PDF/A-3
}
if (class_exists('TCPDI')) {
@ -297,7 +297,7 @@ function pdf_getPDFFontSize($outputlangs)
}
}
if (getDolGlobalString('MAIN_PDF_FORCE_FONT_SIZE')) {
$size = $conf->global->MAIN_PDF_FORCE_FONT_SIZE;
$size = getDolGlobalString('MAIN_PDF_FORCE_FONT_SIZE');
}
return $size;

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