diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 79dc2385983..88c88da5901 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3224,7 +3224,7 @@ class Facture extends CommonInvoice // Check for mandatory prof id (but only if country is other than ours) if ($mysoc->country_id > 0 && $this->thirdparty->country_id == $mysoc->country_id) { $idprof_mandatory = 'SOCIETE_'.$key.'_INVOICE_MANDATORY'; - if (!$vallabel && !empty($conf->global->$idprof_mandatory)) { + if (!$vallabel && getDolGlobalString($idprof_mandatory)) { $langs->load("errors"); $this->error = $langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId'.$i, $this->thirdparty->country_code)).' ('.$langs->trans("ForbiddenBySetupRules").') ['.$langs->trans('Company').' : '.$this->thirdparty->name.']'; dol_syslog(__METHOD__.' '.$this->error, LOG_ERR); diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index a4bd1e2426c..28ebd8c0dfc 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1035,10 +1035,10 @@ class CMailFile // If we use SSL/TLS $server = getDolGlobalString($keyforsmtpserver); $secure = ''; - if (!empty($conf->global->$keyfortls) && function_exists('openssl_open')) { + if (getDolGlobalString($keyfortls) && function_exists('openssl_open')) { $secure = 'ssl'; } - if (!empty($conf->global->$keyforstarttls) && function_exists('openssl_open')) { + if (getDolGlobalString($keyforstarttls) && function_exists('openssl_open')) { $secure = 'tls'; } $server = ($secure ? $secure.'://' : '').$server; @@ -1050,11 +1050,11 @@ class CMailFile $loginid = ''; $loginpass = ''; - if (!empty($conf->global->$keyforsmtpid)) { + if (getDolGlobalString($keyforsmtpid)) { $loginid = getDolGlobalString($keyforsmtpid); $this->smtps->setID($loginid); } - if (!empty($conf->global->$keyforsmtppw)) { + if (getDolGlobalString($keyforsmtppw)) { $loginpass = getDolGlobalString($keyforsmtppw); $this->smtps->setPW($loginpass); } @@ -1199,19 +1199,19 @@ class CMailFile // If we use SSL/TLS $server = getDolGlobalString($keyforsmtpserver); $secure = ''; - if (!empty($conf->global->$keyfortls) && function_exists('openssl_open')) { + if (getDolGlobalString($keyfortls) && function_exists('openssl_open')) { $secure = 'ssl'; } - if (!empty($conf->global->$keyforstarttls) && function_exists('openssl_open')) { + if (getDolGlobalString($keyforstarttls) && function_exists('openssl_open')) { $secure = 'tls'; } $this->transport = new Swift_SmtpTransport($server, getDolGlobalString($keyforsmtpport), $secure); - if (!empty($conf->global->$keyforsmtpid)) { + if (getDolGlobalString($keyforsmtpid)) { $this->transport->setUsername($conf->global->$keyforsmtpid); } - if (!empty($conf->global->$keyforsmtppw) && getDolGlobalString($keyforsmtpauthtype) != "XOAUTH2") { + if (getDolGlobalString($keyforsmtppw) && getDolGlobalString($keyforsmtpauthtype) != "XOAUTH2") { $this->transport->setPassword($conf->global->$keyforsmtppw); } if (getDolGlobalString($keyforsmtpauthtype) === "XOAUTH2") { @@ -1864,7 +1864,7 @@ class CMailFile } // If we use SSL/TLS - if (!empty($conf->global->$keyfortls) && function_exists('openssl_open')) { + if (getDolGlobalString($keyfortls) && function_exists('openssl_open')) { $host = 'ssl://'.$host; } // tls smtp start with no encryption diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 92b32d2f257..f0b5ded8db6 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -437,7 +437,7 @@ class Translate // Kept for backward compatibility. if (empty($loadfromfileonly)) { $overwritekey = 'MAIN_OVERWRITE_TRANS_' . $this->defaultlang; - if (!empty($conf->global->$overwritekey)) { // Overwrite translation with key1:newstring1,key2:newstring2 + if (getDolGlobalString($overwritekey)) { // Overwrite translation with key1:newstring1,key2:newstring2 // Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX $tmparray = explode(',', getDolGlobalString($overwritekey)); foreach ($tmparray as $tmp) { @@ -683,7 +683,7 @@ class Translate // Make some string replacement after translation $replacekey = 'MAIN_REPLACE_TRANS_' . $this->defaultlang; - if (!empty($conf->global->$replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2 + if (getDolGlobalString($replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2 $tmparray = explode(';', getDolGlobalString($replacekey)); foreach ($tmparray as $tmp) { $tmparray2 = explode(':', $tmp); @@ -777,7 +777,7 @@ class Translate // Make some string replacement after translation $replacekey = 'MAIN_REPLACE_TRANS_' . $this->defaultlang; - if (!empty($conf->global->$replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2 + if (getDolGlobalString($replacekey)) { // Replacement translation variable with string1:newstring1;string2:newstring2 $tmparray = explode(';', getDolGlobalString($replacekey)); foreach ($tmparray as $tmp) { $tmparray2 = explode(':', $tmp); diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index f21101cd1ae..06c89bef1bb 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -697,8 +697,8 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof '."\n"; $out .= ''; - $out .= ''.($revertonoff ? img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).''; - $out .= ''.($revertonoff ? img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).''; + $out .= ''.($revertonoff ? img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).''; + $out .= ''.($revertonoff ? img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).''; $out .= "\n"; } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index ca1d72e1cd3..8bab1e1bd0e 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1029,7 +1029,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ $dims = $pdf->getPageDimensions(); // Line of free text - if (empty($hidefreetext) && !empty($conf->global->$paramfreetext)) { + if (empty($hidefreetext) && getDolGlobalString($paramfreetext)) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); // More substitution keys $substitutionarray['__FROM_NAME__'] = $fromcompany->name; @@ -1633,7 +1633,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, // Check if description must be output if (!empty($object->element)) { $tmpkey = 'MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_'.strtoupper($object->element); - if (!empty($conf->global->$tmpkey)) { + if (getDolGlobalString($tmpkey)) { $hidedesc = 1; } } diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 0d91d521370..a3fda66b87a 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -467,7 +467,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t while ($i <= $MAXFTP) { $paramkey = 'FTP_NAME_'.$i; //print $paramkey; - if (!empty($conf->global->$paramkey)) { + if (getDolGlobalString($paramkey)) { $link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; $newmenu->add($link, dol_trunc($conf->global->$paramkey, 24)); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 65ad8a26263..b2f3e48a76e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -873,7 +873,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM while ($i <= $MAXFTP) { $paramkey = 'FTP_NAME_'.$i; //print $paramkey; - if (!empty($conf->global->$paramkey)) { + if (getDolGlobalString($paramkey)) { $link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; $newmenu->add($link, dol_trunc($conf->global->$paramkey, 24)); } diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php index 3d767b59571..a04f323bcb3 100644 --- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php +++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php @@ -322,7 +322,7 @@ class doc_generic_asset_odt extends ModelePDFAsset // Line of free text $newfreetext = ''; $paramfreetext = 'ORDER_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index 9233a93f151..89347b5b0c1 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -323,7 +323,7 @@ class doc_generic_bom_odt extends ModelePDFBom // Line of free text $newfreetext = ''; $paramfreetext = 'BOM_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 5cecdaa413d..babd72f3d68 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -445,7 +445,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts complete_substitutions_array($substitutionarray, $outputlangs, $object); $newfreetext = ''; $paramfreetext = 'BANK_CHEQUERECEIPT_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 529ca3a8539..0dd24592bb4 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -333,7 +333,7 @@ class doc_generic_order_odt extends ModelePDFCommandes // Line of free text $newfreetext = ''; $paramfreetext = 'ORDER_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index c5b938fe8f1..0112484d973 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -344,7 +344,7 @@ class doc_generic_contract_odt extends ModelePDFContract // Line of free text $newfreetext = ''; $paramfreetext = 'CONTRACT_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $tmparray); } diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 50d33d378d3..f2a1d1ee530 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -331,7 +331,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // Line of free text $newfreetext = ''; $paramfreetext = 'EXPEDITION_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index d279edc8b01..e03194f9f41 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -373,7 +373,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Line of free text $newfreetext = ''; $paramfreetext = 'INVOICE_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index 1a784af2dcb..f19deec6f4c 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -316,7 +316,7 @@ class doc_generic_mo_odt extends ModelePDFMo // Line of free text $newfreetext = ''; $paramfreetext = 'MRP_MO_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 85450edf7f0..13d913dc460 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -328,7 +328,7 @@ class doc_generic_product_odt extends ModelePDFProduct // Line of free text $newfreetext = ''; $paramfreetext = 'PRODUCT_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index e5fddcddd5f..9f60a580234 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -365,7 +365,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales // Line of free text $newfreetext = ''; $paramfreetext = 'PROPOSAL_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index c51179964e2..6d8c91419f9 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -326,7 +326,7 @@ class doc_generic_reception_odt extends ModelePdfReception // Line of free text $newfreetext = ''; $paramfreetext = 'RECEPTION_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 4db3e9f93d2..d4d838f3475 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -327,7 +327,7 @@ class doc_generic_stock_odt extends ModelePDFStock // Line of free text $newfreetext = ''; $paramfreetext = 'stock_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php index 8246efc372d..c84c52cb729 100644 --- a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php @@ -329,7 +329,7 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices // Line of free text $newfreetext = ''; $paramfreetext = 'INVOICE_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index a6750022925..a7d4da8c278 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -324,7 +324,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // Line of free text $newfreetext = ''; $paramfreetext = 'ORDER_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 17e7fb8ae2c..db87bed9cce 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -353,7 +353,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // Line of free text $newfreetext = ''; $paramfreetext = 'SUPPLIER_PROPOSAL_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index cabdf9611aa..475a1f555fe 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -352,7 +352,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // Line of free text $newfreetext = ''; $paramfreetext = 'user_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) { + if (getDolGlobalString($paramfreetext)) { $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray); } diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 82759e7a8d5..67380570aad 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -61,11 +61,11 @@ $select_pricing_rules = array( 'PRODUIT_CUSTOMER_PRICES' => $langs->trans('PriceByCustomer'), // Different price for each customer ); $keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY'; -if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1 || !empty($conf->global->$keyforparam)) { +if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1 || getDolGlobalString($keyforparam)) { $select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice } $keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'; -if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 || !empty($conf->global->$keyforparam)) { +if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2 || getDolGlobalString($keyforparam)) { $select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = $langs->trans('MultiPricesAbility').'+'.$langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; } diff --git a/htdocs/public/eventorganization/subscriptionok.php b/htdocs/public/eventorganization/subscriptionok.php index fab5a6e70bf..a4416a3e849 100644 --- a/htdocs/public/eventorganization/subscriptionok.php +++ b/htdocs/public/eventorganization/subscriptionok.php @@ -178,7 +178,7 @@ print '
'."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) { +if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index b38b1140896..fb3890a478b 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -268,7 +268,7 @@ print ''."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_SIGN_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) { +if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_SIGN_LOGO')) { $logosmall = getDolGlobalString('ONLINE_SIGN_LOGO'); diff --git a/htdocs/public/opensurvey/index.php b/htdocs/public/opensurvey/index.php index b07b047d586..54d98ebccf5 100644 --- a/htdocs/public/opensurvey/index.php +++ b/htdocs/public/opensurvey/index.php @@ -135,7 +135,7 @@ print ''."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_OPENSURVEY_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) { +if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_OPENSURVEY_LOGO')) { $logosmall = getDolGlobalString('ONLINE_OPENSURVEY_LOGO_'); diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index d6d7edd6e96..177c4ae64c0 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -345,9 +345,9 @@ if (empty($validpaymentmethod)) { $creditor = $mysoc->name; $paramcreditor = 'ONLINE_PAYMENT_CREDITOR'; $paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix; -if (!empty($conf->global->$paramcreditorlong)) { +if (getDolGlobalString($paramcreditorlong)) { $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show -} elseif (!empty($conf->global->$paramcreditor)) { +} elseif (getDolGlobalString($paramcreditor)) { $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show } @@ -897,7 +897,7 @@ print "\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) { +if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 4cd8a67fdf6..fc550a763b7 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -233,7 +233,7 @@ if (empty($doactionsthenredirect)) { $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; - if (!empty($conf->global->$paramlogo)) { + if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); @@ -275,7 +275,7 @@ if (empty($doactionsthenredirect)) { print $langs->trans("YourPaymentHasNotBeenRecorded")."

"; $key = 'ONLINE_PAYMENT_MESSAGE_KO'; - if (!empty($conf->global->$key)) { + if (getDolGlobalString($key)) { print $conf->global->$key; } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 082ac3c4d1d..2fac1e73f71 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -220,7 +220,7 @@ if (empty($doactionsthenredirect)) { $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; - if (!empty($conf->global->$paramlogo)) { + if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index 7c088fa7249..3b30add2308 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -236,7 +236,7 @@ print "\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) { +if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_PAYMENT_LOGO')) { $logosmall = getDolGlobalString('ONLINE_PAYMENT_LOGO'); diff --git a/htdocs/public/recruitment/index.php b/htdocs/public/recruitment/index.php index 5615e8133e2..586d3d8f872 100644 --- a/htdocs/public/recruitment/index.php +++ b/htdocs/public/recruitment/index.php @@ -136,7 +136,7 @@ print ''."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) { +if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) { $logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO_'); diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index 60b5191d468..228f29633f6 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -198,7 +198,7 @@ print ''."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) { +if (getDolGlobalString($paramlogo)) { $logosmall = getDolGlobalString($paramlogo); } elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) { $logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO'); diff --git a/htdocs/webportal/class/html.formwebportal.class.php b/htdocs/webportal/class/html.formwebportal.class.php index 662f8f9835a..232dc10e8ff 100644 --- a/htdocs/webportal/class/html.formwebportal.class.php +++ b/htdocs/webportal/class/html.formwebportal.class.php @@ -556,7 +556,7 @@ class FormWebPortal extends Form $textifempty = ' '; //if (!empty($conf->use_javascript_ajax) || $forcecombo) $textifempty=''; - if (!empty($conf->global->$confkeyforautocompletemode)) { + if (getDolGlobalString($confkeyforautocompletemode)) { if ($showempty && !is_numeric($showempty)) { $textifempty = $langs->trans($showempty); } else {