';
/*
-if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
-{
+if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION')) {
if ($user->socid == 0 && $object->statut == 0 && $action == '')
{
if ($user->hasRight('facture', 'paiement')){
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index d3f124a39a1..81efbf470a7 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -1212,7 +1212,7 @@ class CMailFile
$result = $this->smtps->sendMsg();
- if (!empty($conf->global->MAIN_MAIL_DEBUG)) {
+ if (getDolGlobalString('MAIN_MAIL_DEBUG')) {
$this->dump_mail();
}
*/
@@ -1937,7 +1937,7 @@ class CMailFile
$host = 'ssl://'.$host;
}
// tls smtp start with no encryption
- //if (!empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS) && function_exists('openssl_open')) $host='tls://'.$host;
+ //if (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS') && function_exists('openssl_open')) $host='tls://'.$host;
dol_syslog("Try socket connection to host=".$host." port=".$port." timeout=".$timeout);
//See if we can connect to the SMTP server
diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index cb7d1654e0b..734bed17111 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -541,7 +541,6 @@ function calendars_prepare_head($param)
$head[$h][2] = 'cardday';
$h++;
- //if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
if (getDolGlobalString('AGENDA_SHOW_PERTYPE')) {
$head[$h][0] = DOL_URL_ROOT.'/comm/action/pertype.php'.($param ? '?'.$param : '');
$head[$h][1] = $langs->trans("ViewPerType");
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index f8561095469..9aed8d23db4 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -5094,9 +5094,6 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco
$enabledisablehtml = '';
- /*if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
- $enabledisablehtml .= $titlealt;
- }*/
$enabledisablehtml .= '';
return $enabledisablehtml;
@@ -5322,9 +5319,6 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco
$enabledisablehtml = '';
- /*if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
- $enabledisablehtml .= $titlealt;
- }*/
$enabledisablehtml .= '';
return $enabledisablehtml;
diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php
index 9a9238f91c1..fb65821491d 100644
--- a/htdocs/core/lib/stock.lib.php
+++ b/htdocs/core/lib/stock.lib.php
@@ -55,8 +55,7 @@ function stock_prepare_head($object)
*/
/* Disabled because will never be implemented. Table always empty.
- if (!empty($conf->global->STOCK_USE_WAREHOUSE_BY_USER))
- {
+ if (getDolGlobalString('STOCK_USE_WAREHOUSE_BY_USER')) {
// Should not be enabled by default because does not work yet correctly because
// personal stocks are not tagged into table llx_entrepot
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$object->id;
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index 255bacdc977..ff3552ea13e 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -1089,7 +1089,7 @@ class pdf_einstein extends ModelePDFCommandes
}
//Local tax 1 after VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION() == 'localtax1on')
//{
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('2', '4', '6'))) {
@@ -1128,7 +1128,7 @@ class pdf_einstein extends ModelePDFCommandes
}
//}
//Local tax 2 after VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FATURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('2', '4', '6'))) {
diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php
index a4aeedd0736..888bafe69b3 100644
--- a/htdocs/core/modules/modBlockedLog.class.php
+++ b/htdocs/core/modules/modBlockedLog.class.php
@@ -79,9 +79,8 @@ class modBlockedLog extends DolibarrModules
// Currently, activation is not automatic because only companies (in France) making invoices to non business customers must
// enable this module.
- /*if (!empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY))
- {
- $tmp=explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY);
+ /*if (getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY')) {
+ $tmp=explode(',', getDolGlobalString('BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY'));
$this->automatic_activation = array();
foreach($tmp as $key)
{
diff --git a/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php b/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php
index fd18aca6973..7a0624cb99b 100644
--- a/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php
+++ b/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php
@@ -1065,8 +1065,7 @@ class pdf_standard_movementstock extends ModelePDFMovement
// Get contact
/*
- if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP))
- {
+ if (getDolGlobalString('DOC_SHOW_FIRST_SALES_REP')) {
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
if (count($arrayidcontact) > 0)
{
@@ -1097,7 +1096,7 @@ class pdf_standard_movementstock extends ModelePDFMovement
// Show sender
$posy=42;
$posx=$this->marge_gauche;
- if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
+ if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) $posx=$this->page_largeur-$this->marge_droite-80;
$hautcadre=40;
// Show sender frame
diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
index 79ea3d51119..77f20d1c33e 100644
--- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
+++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
@@ -795,7 +795,7 @@ class pdf_vinci extends ModelePDFMo
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
}
} else {
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
//Local tax 1
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
@@ -825,7 +825,7 @@ class pdf_vinci extends ModelePDFMo
}
}
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
//Local tax 2
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
@@ -1248,7 +1248,7 @@ class pdf_vinci extends ModelePDFMo
//}
//$posy = 42 + $top_shift;
//$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
- //if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
+ //if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
// $posx = $this->marge_gauche;
//}
//
diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php
index e1fff4b2dcd..68f6a5a7e81 100644
--- a/htdocs/core/modules/product/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php
@@ -508,7 +508,7 @@ class pdf_standard extends ModelePDFProduct
$this->tva[$vatrate] += $tvaligne;
// Add line
- if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
+ if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@@ -815,11 +815,9 @@ class pdf_standard extends ModelePDFProduct
// Get contact
/*
- if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP))
- {
+ if (getDolGlobalString('DOC_SHOW_FIRST_SALES_REP')) {
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
- if (count($arrayidcontact) > 0)
- {
+ if (count($arrayidcontact) > 0) {
$usertmp=new User($this->db);
$usertmp->fetch($arrayidcontact[0]);
$posy+=4;
@@ -842,7 +840,7 @@ class pdf_standard extends ModelePDFProduct
// Show sender
$posy=42;
$posx=$this->marge_gauche;
- if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
+ if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) $posx=$this->page_largeur-$this->marge_droite-80;
$hautcadre=40;
// Show sender frame
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index f30314443f0..bb025e78755 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -1278,7 +1278,7 @@ class pdf_cyan extends ModelePDFPropales
// Nothing to do
} else {
//Local tax 1 before VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('1', '3', '5'))) {
@@ -1311,7 +1311,7 @@ class pdf_cyan extends ModelePDFPropales
}
//}
//Local tax 2 before VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('1', '3', '5'))) {
@@ -1368,7 +1368,7 @@ class pdf_cyan extends ModelePDFPropales
}
//Local tax 1 after VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('2', '4', '6'))) {
@@ -1402,7 +1402,7 @@ class pdf_cyan extends ModelePDFPropales
}
//}
//Local tax 2 after VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('2', '4', '6'))) {
diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php
index 868488bd4a2..07ad702dd36 100644
--- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php
+++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php
@@ -110,7 +110,6 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
if (getDolGlobalInt('COMPANY_AQUARIUM_REMOVE_SPECIAL')) {
$texte .= $langs->trans('RemoveSpecialChars').' = '.yn(1)." \n";
}
- //if (!empty($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)) $texte.=$langs->trans('COMPANY_AQUARIUM_REMOVE_ALPHA').' = '.yn($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)." \n";
if (getDolGlobalString('COMPANY_AQUARIUM_CLEAN_REGEX')) {
$texte .= $langs->trans('COMPANY_AQUARIUM_CLEAN_REGEX').' = ' . getDolGlobalString('COMPANY_AQUARIUM_CLEAN_REGEX')." \n";
}
diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php
index 56910f912b4..b9db4237bf7 100644
--- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php
+++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php
@@ -128,7 +128,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$this->posxwarehousedestination = $this->page_largeur - $this->marge_droite - 35;
$this->posxpuht = $this->page_largeur - $this->marge_droite;
- /*if (!empty($conf->global->STOCKTRANSFER_PDF_DISPLAY_AMOUNT_HT)) { // Show also the prices
+ /*if (getDolGlobalString('STOCKTRANSFER_PDF_DISPLAY_AMOUNT_HT')) { // Show also the prices
$this->posxqty = $this->page_largeur - $this->marge_droite - 118;
$this->posxwarehousesource = $this->page_largeur - $this->marge_droite - 96;
$this->posxwarehousedestination = $this->page_largeur - $this->marge_droite - 68;
@@ -151,7 +151,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$this->posxwarehousedestination -= 20;
}
- /*if (!empty($conf->global->STOCKTRANSFER_PDF_HIDE_ORDERED)) {
+ /*if (getDolGlobalString('STOCKTRANSFER_PDF_HIDE_ORDERED')) {
$this->posxqty += ($this->posxwarehousedestination - $this->posxwarehousesource);
$this->posxpicture += ($this->posxwarehousedestination - $this->posxwarehousesource);
$this->posxwarehousesource = $this->posxwarehousedestination;
@@ -960,7 +960,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$pdf->MultiCell(($this->posxpuht - $this->posxwarehousedestination + 4), 2, $outputlangs->transnoentities("WarehouseTarget"), '', 'C');
}
- /*if (!empty($conf->global->STOCKTRANSFER_PDF_DISPLAY_AMOUNT_HT)) {
+ /*if (getDolGlobalString('STOCKTRANSFER_PDF_DISPLAY_AMOUNT_HT')) {
$pdf->line($this->posxpuht - 1, $tab_top, $this->posxpuht - 1, $tab_top + $tab_height);
if (empty($hidetop))
{
diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
index 9b8f2f8089f..d5f3301771c 100644
--- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
@@ -123,7 +123,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->posxdiscount = 162;
$this->postotalht = 174;
- /* if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) {
+ /* if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT') || getDolGlobalString('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN')) {
$this->posxtva = $this->posxup;
} */
$this->posxpicture = $this->posxtva - (getDolGlobalInt('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH', 20)); // width of images
@@ -705,7 +705,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2, 0, $outputlangs), 0, 'R', 1);
}
} else {
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
//Local tax 1
foreach ($this->localtax1 as $tvakey => $tvaval) {
@@ -730,7 +730,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
}
//}
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
//Local tax 2
foreach ($this->localtax2 as $tvakey => $tvaval) {
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index ec9669b9156..d7949762329 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -1020,7 +1020,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
}
} else {
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
//Local tax 1
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
@@ -1050,7 +1050,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
}
}
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
//Local tax 2
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
index 112d7d4b90a..657ed4bfa5e 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
@@ -882,7 +882,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
}
} else {
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
//Local tax 1
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
@@ -912,7 +912,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
}
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
//Local tax 2
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php
index e4383bd322c..17437d579de 100644
--- a/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php
+++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php
@@ -212,7 +212,7 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
//$objectrefsupplier = dol_sanitizeFileName($object->ref_supplier);
$dir = $conf->fournisseur->payment->dir_output.'/'.$objectref;
$file = $dir."/".$objectref.".pdf";
- //if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) {
+ //if (getDolGlobalString('SUPPLIER_REF_IN_NAME')) {
// $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf";
//}
}
@@ -663,7 +663,7 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
$pdf->SetFont('','', $default_font_size - 1);
- if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) {
+ if (getDolGlobalString('PDF_SHOW_PROJECT_TITLE')) {
$object->fetchProject();
if (!empty($object->project->ref)) {
$posy += 3;
@@ -673,8 +673,7 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
}
}
- if (!empty($conf->global->PDF_SHOW_PROJECT))
- {
+ if (getDolGlobalString('PDF_SHOW_PROJECT')) {
$object->fetchProject();
if (!empty($object->project->ref))
{
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 3bd62f5ef54..d63b869da06 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -920,7 +920,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
// Nothing to do
} else {
//Local tax 1 before VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('1', '3', '5'))) {
@@ -950,7 +950,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
}
//}
//Local tax 2 before VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('1', '3', '5'))) {
@@ -1004,7 +1004,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
}
//Local tax 1 after VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('2', '4', '6'))) {
@@ -1034,7 +1034,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
}
//}
//Local tax 2 after VAT
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
if (in_array((string) $localtax_type, array('2', '4', '6'))) {
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
index 06e88bcdefc..094aa90d753 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
@@ -1003,7 +1003,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
}
} else {
- //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')
//{
//Local tax 1
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
@@ -1033,7 +1033,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
}
}
- //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
+ //if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') && getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')
//{
//Local tax 2
foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index 7b9029cf6b8..ef2f44d0630 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -434,7 +434,6 @@ if (getDolGlobalInt('MAIN_MODULE_OPENIDCONNECT', 0) > 0 && isset($conf->file->ma
dol_include_once('/core/lib/openid_connect.lib.php');
$langs->load("users");
- //if (!empty($conf->global->MAIN_OPENIDURL_PERUSER)) $url=
print '
';
print '
';
diff --git a/htdocs/expedition/dispatch.php b/htdocs/expedition/dispatch.php
index 6e2d7997a70..e1340a8b0d7 100644
--- a/htdocs/expedition/dispatch.php
+++ b/htdocs/expedition/dispatch.php
@@ -332,7 +332,7 @@ if ($action == 'updatelines' && $usercancreate) {
$mouv->setOrigin($objectorder->element, $objectorder->id);
// Method change if qty < 0
- if (!empty($conf->global->SUPPLIER_ORDER_ALLOW_NEGATIVE_QTY_FOR_SUPPLIER_ORDER_RETURN) && $qtymouv < 0) {
+ if (getDolGlobalString('SUPPLIER_ORDER_ALLOW_NEGATIVE_QTY_FOR_SUPPLIER_ORDER_RETURN') && $qtymouv < 0) {
$result = $mouv->reception($user, $product, $entrepot, $qtymouv*(-1), $price, $comment, $eatby, $sellby, $batch, '', 0, $inventorycode);
} else {
$result = $mouv->livraison($user, $product, $entrepot, $qtymouv, $price, $comment, $now, $eatby, $sellby, $batch, 0, $inventorycode);
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 1d798f5c2fb..e883fafacf0 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -639,10 +639,6 @@ if ($id > 0 || !empty($ref)) {
// if ($mesg) print $mesg;
print ' ';
- /*$disabled = 1;
- if (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) {
- $disabled = 0;
- }*/
$disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
// Line of orders
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 89905a9426d..1d330322f87 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -3991,7 +3991,6 @@ if ($action == 'create') {
$dateSelector = 0;
$inputalsopricewithtax = 1;
$senderissupplier = 2; // $senderissupplier=2 is same than 1 but disable test on minimum qty and disable autofill qty with minimum.
- //if (!empty($conf->global->SUPPLIER_INVOICE_WITH_NOPRICEDEFINED)) $senderissupplier=2;
if (getDolGlobalInt('SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY')) {
$senderissupplier = getDolGlobalInt('SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY');
}
diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php
index cbf958ad41b..c920f319621 100644
--- a/htdocs/includes/odtphp/odf.php
+++ b/htdocs/includes/odtphp/odf.php
@@ -926,7 +926,7 @@ IMG;
throw new OdfException("headers already sent ($filename at $linenum)");
}
- if (!empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
+ if (getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
$name=preg_replace('/\.od(x|t)/i', '', $name);
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.basename($name).'.pdf"');
@@ -934,7 +934,7 @@ IMG;
}
}
- if (!empty($conf->global->MAIN_ODT_AS_PDF_DEL_SOURCE)) {
+ if (getDolGlobalString('MAIN_ODT_AS_PDF_DEL_SOURCE')) {
unlink($name);
}
} else {
diff --git a/htdocs/partnership/admin/website.php b/htdocs/partnership/admin/website.php
index c6b95626f8c..a6292b5b9cc 100644
--- a/htdocs/partnership/admin/website.php
+++ b/htdocs/partnership/admin/website.php
@@ -168,7 +168,7 @@ print ' ';
/*
-if (!empty($conf->global->PARTNERSHIP_ENABLE_PUBLIC)) {
+if (getDolGlobalString('PARTNERSHIP_ENABLE_PUBLIC')) {
print ' ';
print '
';
diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php
index fe0c342b3d9..488627e73c9 100644
--- a/htdocs/product/stock/class/productlot.class.php
+++ b/htdocs/product/stock/class/productlot.class.php
@@ -881,7 +881,7 @@ class Productlot extends CommonObject
// Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot)
// if it's a virtual product, maybe it is in invoice by extension
- // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) {
+ // if (getDolGlobalString('PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC')) {
// $TFather = $this->getFather();
// if (is_array($TFather) && !empty($TFather)) {
// foreach ($TFather as &$fatherData) {
@@ -955,7 +955,7 @@ class Productlot extends CommonObject
// Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot)
// if it's a virtual product, maybe it is in invoice by extension
- // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) {
+ // if (getDolGlobalString('PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC')) {
// $TFather = $this->getFather();
// if (is_array($TFather) && !empty($TFather)) {
// foreach ($TFather as &$fatherData) {
@@ -1028,7 +1028,7 @@ class Productlot extends CommonObject
// Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot)
// if it's a virtual product, maybe it is in invoice by extension
- // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) {
+ // if (getDolGlobalString('PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC')) {
// $TFather = $this->getFather();
// if (is_array($TFather) && !empty($TFather)) {
// foreach ($TFather as &$fatherData) {
diff --git a/htdocs/product/stock/stats/commande_fournisseur.php b/htdocs/product/stock/stats/commande_fournisseur.php
index a55a9341b1c..ce07ee4a3de 100644
--- a/htdocs/product/stock/stats/commande_fournisseur.php
+++ b/htdocs/product/stock/stats/commande_fournisseur.php
@@ -185,7 +185,7 @@ if ($id > 0 || !empty($ref)) {
// print '';
// }
//
- // if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABILITY)) {
+ // if (getDolGlobalString('PRODUCT_LOT_ENABLE_TRACEABILITY')) {
// print '