Clean code with rector 2

This commit is contained in:
Laurent Destailleur 2024-01-05 04:18:53 +01:00
parent c3fb26086f
commit 4501872f17
305 changed files with 731 additions and 740 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;
@ -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')];

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

@ -445,7 +445,7 @@ if (!isset($_SERVER['WINDIR'])) {
print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.getDolGlobalString('GENBARCODE_LOCATION').'">';
if (getDolGlobalString('GENBARCODE_LOCATION') && !@file_exists($conf->global->GENBARCODE_LOCATION)) {
$langs->load("errors");
print '<br><span class="error">'.$langs->trans("ErrorFileNotFound", $conf->global->GENBARCODE_LOCATION).'</span>';
print '<br><span class="error">'.$langs->trans("ErrorFileNotFound", getDolGlobalString('GENBARCODE_LOCATION')).'</span>';
}
print '</td>';
print '<td>&nbsp;</td>';

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

@ -289,11 +289,11 @@ if (function_exists("ldap_connect")) {
if (getDolGlobalString('LDAP_ADMIN_DN') && getDolGlobalString('LDAP_ADMIN_PASS')) {
if ($result == 2) {
print img_picto('', 'info').' ';
print '<span class="ok">'.$langs->trans("LDAPBindOK", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
print '<span class="ok">'.$langs->trans("LDAPBindOK", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), getDolGlobalString('LDAP_ADMIN_DN'), preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
print '<br>';
} else {
print img_picto('', 'error').' ';
print '<span class="error">'.$langs->trans("LDAPBindKO", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
print '<span class="error">'.$langs->trans("LDAPBindKO", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), getDolGlobalString('LDAP_ADMIN_DN'), preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
print '<br>';
print $langs->trans("Error").' '.$ldap->error;
print '<br>';

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").')';
}
@ -996,23 +996,23 @@ if ($action == 'edit') {
if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') {
if (getDolGlobalString('MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD')) {
// List of string to add in SPF if the setup use the mail method. Example 'include:sendgrid.net include:spf.mydomain.com'
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD -->'.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD);
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD -->'.$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD'));
} else {
// MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is list of IPs where email is sent from. Example: '1.2.3.4, [aaaa:bbbb:cccc:dddd]'.
if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) {
// List of IP show as record to add in SPF if we use the mail method
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS -->'.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS -->'.$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
}
}
} else {
if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) {
// List of IP show as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]'
// TODO Add a key to allow to show the IP/name of server detected dynamically
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS -->'.$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS -->'.$langs->trans("WarningPHPMail2", getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
}
if (getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD')) { // Should be required only if you have preset the Dolibarr to use your own SMTP and you want to warn users to update their domain name to match your SMTP server.
// List of string to add in SPF if we use the smtp method. Example 'include:spf.mydomain.com'
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD -->'.$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD);
$text .= ($text ? '<br><br>' : '').'<!-- MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD -->'.$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD'));
}
}
$companyemail = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL');

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

@ -558,7 +558,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
$deschelp .= '<div class="info hideonsmartphone">'.$desc."<br></div>\n";
}
if (getDolGlobalString('MAIN_SETUP_MODULES_INFO')) { // Show a custom message
$deschelp .= '<div class="info">'.$langs->trans($conf->global->MAIN_SETUP_MODULES_INFO)."<br></div>\n";
$deschelp .= '<div class="info">'.$langs->trans(getDolGlobalString('MAIN_SETUP_MODULES_INFO'))."<br></div>\n";
}
if ($deschelp) {
$deschelp .= '<br>';
@ -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

@ -87,12 +87,12 @@ print '<tr class="oddeven"><td>'.$langs->trans("CurrentVersion").' ('.$langs->tr
if (!getDolGlobalString('MAIN_VERSION_LAST_UPGRADE')) {
// Compare version with last install database version (upgrades never occured)
if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_INSTALL) {
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_INSTALL));
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, getDolGlobalString('MAIN_VERSION_LAST_INSTALL')));
}
} else {
// Compare version with last upgrade database version
if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) {
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_UPGRADE));
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, getDolGlobalString('MAIN_VERSION_LAST_UPGRADE')));
}
}
@ -260,7 +260,7 @@ if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') {
}
$txt = $langs->trans("OSTZ").' (variable system TZ): '.(!empty($_ENV["TZ"]) ? $_ENV["TZ"] : $langs->trans("NotDefined")).'<br>'."\n";
$txt .= $langs->trans("PHPTZ").' (date_default_timezone_get() / php.ini date.timezone): '.(getServerTimeZoneString()." / ".(ini_get("date.timezone") ? ini_get("date.timezone") : $langs->trans("NotDefined")))."<br>\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
$txt .= $langs->trans("Dolibarr constant MAIN_SERVER_TZ").': '.(!getDolGlobalString('MAIN_SERVER_TZ') ? $langs->trans("NotDefined") : $conf->global->MAIN_SERVER_TZ);
$txt .= $langs->trans("Dolibarr constant MAIN_SERVER_TZ").': '.getDolGlobalString('MAIN_SERVER_TZ', $langs->trans("NotDefined"));
print '<tr class="oddeven"><td>'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
$a = getServerTimeZoneInt('now');
$b = getServerTimeZoneInt('winter');
@ -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

@ -61,12 +61,12 @@ print '<tr class="oddeven"><td width="300">'.$langs->trans("VersionProgram").'</
if (!getDolGlobalString('MAIN_VERSION_LAST_UPGRADE')) {
// Compare version with last install database version (upgrades never occured)
if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_INSTALL) {
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_INSTALL));
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, getDolGlobalString('MAIN_VERSION_LAST_INSTALL')));
}
} else {
// Compare version with last upgrade database version
if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) {
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_UPGRADE));
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, getDolGlobalString('MAIN_VERSION_LAST_UPGRADE')));
}
}
print '</td></tr>'."\n";
@ -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

@ -495,7 +495,7 @@ if ($resql) {
if (!getDolGlobalString('PRODUIT_USE_SEARCH_TO_SELECT')) {
print img_picto('', 'warning.png').' '.$langs->trans("YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"), 'PRODUIT_USE_SEARCH_TO_SELECT');
} else {
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"), 'PRODUIT_USE_SEARCH_TO_SELECT', $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"), 'PRODUIT_USE_SEARCH_TO_SELECT', getDolGlobalString('PRODUIT_USE_SEARCH_TO_SELECT'));
}
} else {
print img_picto('', 'tick.png').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"));
@ -516,7 +516,7 @@ if ($resql) {
if (!getDolGlobalString('COMPANY_USE_SEARCH_TO_SELECT')) {
print img_picto('', 'warning.png').' '.$langs->trans("YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv("ThirdParties"), 'COMPANY_USE_SEARCH_TO_SELECT');
} else {
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ThirdParties"), 'COMPANY_USE_SEARCH_TO_SELECT', $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ThirdParties"), 'COMPANY_USE_SEARCH_TO_SELECT', getDolGlobalString('COMPANY_USE_SEARCH_TO_SELECT'));
}
} else {
print img_picto('', 'tick.png').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("ThirdParties"));
@ -537,7 +537,7 @@ if ($resql) {
if (!getDolGlobalString('CONTACT_USE_SEARCH_TO_SELECT')) {
print img_picto('', 'warning.png').' '.$langs->trans("YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv("Contacts"), 'CONTACT_USE_SEARCH_TO_SELECT');
} else {
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("Contacts"), 'CONTACT_USE_SEARCH_TO_SELECT', $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("Contacts"), 'CONTACT_USE_SEARCH_TO_SELECT', getDolGlobalString('CONTACT_USE_SEARCH_TO_SELECT'));
}
} else {
print img_picto('', 'tick.png').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("Contacts"));
@ -558,7 +558,7 @@ if ($resql) {
if (!getDolGlobalString('PROJECT_USE_SEARCH_TO_SELECT')) {
print img_picto('', 'warning.png').' '.$langs->trans("YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv("Projects"), 'PROJECT_USE_SEARCH_TO_SELECT');
} else {
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("Projects"), 'PROJECT_USE_SEARCH_TO_SELECT', $conf->global->PROJECT_USE_SEARCH_TO_SELECT);
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("Projects"), 'PROJECT_USE_SEARCH_TO_SELECT', getDolGlobalString('PROJECT_USE_SEARCH_TO_SELECT'));
}
} else {
print img_picto('', 'tick.png').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("Projects"));
@ -585,7 +585,7 @@ if ($resql) {
print img_picto('', 'warning.png').' '.$langs->trans("YouHaveXObjectUseSearchOptim", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"), 'PRODUCT_DONOTSEARCH_ANYWHERE');
print $langs->trans("YouHaveXObjectUseSearchOptimDesc");
} else {
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"), 'PRODUCT_DONOTSEARCH_ANYWHERE', $conf->global->PRODUCT_DONOTSEARCH_ANYWHERE);
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"), 'PRODUCT_DONOTSEARCH_ANYWHERE', getDolGlobalString('PRODUCT_DONOTSEARCH_ANYWHERE'));
}
} else {
print img_picto('', 'tick.png').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"));
@ -608,7 +608,7 @@ if ($resql) {
print img_picto('', 'warning.png').' '.$langs->trans("YouHaveXObjectUseSearchOptim", $nb, $langs->transnoentitiesnoconv("ThirdParties"), 'COMPANY_DONOTSEARCH_ANYWHERE');
print $langs->trans("YouHaveXObjectUseSearchOptimDesc");
} else {
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ThirdParties"), 'COMPANY_DONOTSEARCH_ANYWHERE', $conf->global->COMPANY_DONOTSEARCH_ANYWHERE);
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ThirdParties"), 'COMPANY_DONOTSEARCH_ANYWHERE', getDolGlobalString('COMPANY_DONOTSEARCH_ANYWHERE'));
}
} else {
print img_picto('', 'tick.png').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("ThirdParties"));

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

@ -85,31 +85,31 @@ if (empty($conf->clicktodial->enabled)) {
// Define Asterisk setup
if (!isset($conf->global->ASTERISK_HOST)) {
if (!getDolGlobalString('ASTERISK_HOST')) {
$conf->global->ASTERISK_HOST = "127.0.0.1";
}
if (!isset($conf->global->ASTERISK_TYPE)) {
if (!getDolGlobalString('ASTERISK_TYPE')) {
$conf->global->ASTERISK_TYPE = "SIP/";
}
if (!isset($conf->global->ASTERISK_INDICATIF)) {
if (!getDolGlobalString('ASTERISK_INDICATIF')) {
$conf->global->ASTERISK_INDICATIF = "0";
}
if (!isset($conf->global->ASTERISK_PORT)) {
if (!getDolGlobalString('ASTERISK_PORT')) {
$conf->global->ASTERISK_PORT = 5038;
}
if (getDolGlobalString('ASTERISK_INDICATIF') == 'NONE') {
$conf->global->ASTERISK_INDICATIF = '';
}
if (!isset($conf->global->ASTERISK_CONTEXT)) {
if (!getDolGlobalString('ASTERISK_CONTEXT')) {
$conf->global->ASTERISK_CONTEXT = "from-internal";
}
if (!isset($conf->global->ASTERISK_WAIT_TIME)) {
if (!getDolGlobalString('ASTERISK_WAIT_TIME')) {
$conf->global->ASTERISK_WAIT_TIME = "30";
}
if (!isset($conf->global->ASTERISK_PRIORITY)) {
if (!getDolGlobalString('ASTERISK_PRIORITY')) {
$conf->global->ASTERISK_PRIORITY = "1";
}
if (!isset($conf->global->ASTERISK_MAX_RETRY)) {
if (!getDolGlobalString('ASTERISK_MAX_RETRY')) {
$conf->global->ASTERISK_MAX_RETRY = "2";
}
@ -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

@ -112,7 +112,7 @@ function printDropdownBookmarksList()
if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
$bookmarkList = '<div id="dropdown-bookmarks-list" >';
$i = 0;
while ((!getDolGlobalString('BOOKMARKS_SHOW_IN_MENU') || $i < $conf->global->BOOKMARKS_SHOW_IN_MENU) && $obj = $db->fetch_object($resql)) {
while ((!getDolGlobalString('BOOKMARKS_SHOW_IN_MENU') || $i < getDolGlobalInt('BOOKMARKS_SHOW_IN_MENU')) && $obj = $db->fetch_object($resql)) {
$bookmarkList .= '<a class="dropdown-item bookmark-item'.(strpos($obj->url, 'http') === 0 ? ' bookmark-item-external' : '').'" id="bookmark-item-'.$obj->rowid.'" data-id="'.$obj->rowid.'" '.($obj->target == 1 ? ' target="_blank" rel="noopener noreferrer"' : '').' href="'.dol_escape_htmltag($obj->url).'" >';
$bookmarkList .= dol_escape_htmltag($obj->title);
$bookmarkList .= '</a>';
@ -138,7 +138,7 @@ function printDropdownBookmarksList()
}
}
$i = 0;
while ((!getDolGlobalString('BOOKMARKS_SHOW_IN_MENU') || $i < $conf->global->BOOKMARKS_SHOW_IN_MENU) && $obj = $db->fetch_object($resql)) {
while ((!getDolGlobalString('BOOKMARKS_SHOW_IN_MENU') || $i < getDolGlobalInt('BOOKMARKS_SHOW_IN_MENU')) && $obj = $db->fetch_object($resql)) {
$searchForm .= '<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1 ? ' target="_blank" rel="noopener noreferrer"' : '').' rel="'.dol_escape_htmltag($obj->url).'" >';
$searchForm .= dol_escape_htmltag($obj->title);
$searchForm .= '</option>';

View File

@ -82,7 +82,7 @@ if (empty($reshook)) {
$file = $_FILES['userfile'];
if (is_array($file['name']) && count($file['name']) > 0) {
foreach ($file['name'] as $i => $name) {
if (empty($file['tmp_name'][$i]) || intval($conf->global->MAIN_UPLOAD_DOC) * 1000 <= filesize($file['tmp_name'][$i])) {
if (empty($file['tmp_name'][$i]) || (getDolGlobalInt('MAIN_UPLOAD_DOC') * 1000) <= filesize($file['tmp_name'][$i])) {
setEventMessage($file['name'][$i].' : '.$langs->trans(empty($file['tmp_name'][$i]) ? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles'));
unset($file['name'][$i], $file['type'][$i], $file['tmp_name'][$i], $file['error'][$i], $file['size'][$i]);
}

View File

@ -1872,7 +1872,7 @@ if ($id > 0) {
print '<label for="fullday">'.$langs->trans("EventOnFullDay").'</label>';
// // Recurring event
// $userepeatevent = ($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0);
// $userepeatevent = (getDolGlobalInt('MAIN_FEATURES_LEVEL') == 2 ? 1 : 0);
// if ($userepeatevent) {
// // Repeat
// //print '<tr><td></td><td colspan="3">';
@ -2048,7 +2048,7 @@ if ($id > 0) {
print '<div>';
$events = array(); // 'method'=parameter action of url, 'url'=url to call that return new list of contacts
$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
// TODO Refresh also list of project if $conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY not defined with list linked to socid ?
// TODO Refresh also list of project if conf PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY not defined with list linked to socid ?
// FIXME If we change company, we may get a project that does not match
print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company($object->socid, 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth200');
print '</div>';

View File

@ -1771,8 +1771,6 @@ class ActionComm extends CommonObject
$dataparams = ' data-params="'.dol_escape_htmltag(json_encode($params)).'"';
$tooltip = '';
}
//if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
// $linkclose = ' style="background-color:#'.$this->type_color.'"';
if (empty($notooltip)) {
if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
$label = $langs->trans("ShowAction");

View File

@ -114,7 +114,7 @@ $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda|DE:Mod
llxHeader('', $langs->trans("Agenda"), $help_url);
$now = dol_now();
$delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;
$delay_warning = getDolGlobalInt('MAIN_DELAY_ACTIONS_TODO') * 24 * 60 * 60;
if ($object->id > 0) {
$result1 = $object->fetch($id);

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

@ -447,7 +447,7 @@ if ($object->fetch($id) >= 0) {
print '</td><td colspan="3">';
$nbemail = ($object->nbemail ? $object->nbemail : '0');
if (getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) {
$text = $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
$text = $langs->trans('LimitSendingEmailing', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
print $form->textwithpicto($nbemail, $text, 1, 'warning');
} else {
print $nbemail;

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
@ -879,7 +879,7 @@ if ($action == 'create') {
setEventMessages($messagetoshow, null, 'warnings');
if (getDolGlobalString('MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS')) {
setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings');
setEventMessages($langs->trans("MailSendSetupIs3", getDolGlobalString('MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS')), null, 'warnings');
}
$_GET["action"] = '';
} elseif (getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') < 0) {
@ -908,11 +908,11 @@ if ($action == 'create') {
$text = '';
if (isset($conf->global->MAILING_LIMIT_SENDBYDAY) && getDolGlobalInt('MAILING_LIMIT_SENDBYDAY') >= 0) {
$text .= $langs->trans('WarningLimitSendByDay', $conf->global->MAILING_LIMIT_SENDBYDAY);
$text .= $langs->trans('WarningLimitSendByDay', getDolGlobalString('MAILING_LIMIT_SENDBYDAY'));
$text .= '<br><br>';
}
$text .= $langs->trans('ConfirmSendingEmailing').'<br>';
$text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
if (!isset($conf->global->MAILING_LIMIT_SENDBYCLI) || getDolGlobalInt('MAILING_LIMIT_SENDBYCLI') >= 0) {
$text .= '<br><br>';
@ -1000,7 +1000,7 @@ if ($action == 'create') {
$text = '';
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || ($object->statut == 2 && $nbtry < $nbemail))) {
if (getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') > 0) {
$text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
} else {
$text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed');
}
@ -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;
@ -1290,7 +1290,7 @@ if ($action == 'create') {
$text = '';
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || $object->statut == 2)) {
if (getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') > 0) {
$text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
} else {
$text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed');
}

View File

@ -348,7 +348,7 @@ if ($object->fetch($id) >= 0) {
$text = '';
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || ($object->statut == 2 && $nbtry < $nbemail))) {
if (getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') > 0) {
$text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
} else {
$text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed');
}

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

@ -1784,7 +1784,7 @@ class Account extends CommonObject
);
if (getDolGlobalString('BANK_SHOW_ORDER_OPTION')) {
if (is_numeric($conf->global->BANK_SHOW_ORDER_OPTION)) {
if (is_numeric(getDolGlobalString('BANK_SHOW_ORDER_OPTION'))) {
if (getDolGlobalString('BANK_SHOW_ORDER_OPTION') == '1') {
$fieldlists = array(
'BankCode',
@ -2354,7 +2354,7 @@ class AccountLine extends CommonObjectLine
// Check statement field
if (getDolGlobalString('BANK_STATEMENT_REGEX_RULE')) {
if (!preg_match('/' . getDolGlobalString('BANK_STATEMENT_REGEX_RULE').'/', $this->num_releve)) {
$this->errors[] = $langs->trans("ErrorBankStatementNameMustFollowRegex", $conf->global->BANK_STATEMENT_REGEX_RULE);
$this->errors[] = $langs->trans("ErrorBankStatementNameMustFollowRegex", getDolGlobalString('BANK_STATEMENT_REGEX_RULE'));
return -1;
}
}

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

@ -704,8 +704,8 @@ class CMailFile
$this->error .= '<br>'.$langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']);
$this->errors[] = $langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']);
if (getDolGlobalString('MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS')) {
$this->error .= '<br>'.$langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS);
$this->errors[] = $langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS);
$this->error .= '<br>'.$langs->trans("MailSendSetupIs3", getDolGlobalString('MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS'));
$this->errors[] = $langs->trans("MailSendSetupIs3", getDolGlobalString('MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS'));
}
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_WARNING);
@ -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

@ -649,7 +649,7 @@ class FormCompany extends Form
if (!empty($conf->use_javascript_ajax) && getDolGlobalString('COMPANY_USE_SEARCH_TO_SELECT')) {
// Use Ajax search
$minLength = (is_numeric($conf->global->COMPANY_USE_SEARCH_TO_SELECT) ? $conf->global->COMPANY_USE_SEARCH_TO_SELECT : 2);
$minLength = (is_numeric(getDolGlobalString('COMPANY_USE_SEARCH_TO_SELECT')) ? $conf->global->COMPANY_USE_SEARCH_TO_SELECT : 2);
$socid = 0;
$name = '';

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

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