From b0ce1788d4a531172d67fd82102c678b27168cf6 Mon Sep 17 00:00:00 2001 From: Joachim Kueter Date: Sat, 4 Jan 2025 08:21:28 +0100 Subject: [PATCH 1/7] Backport of fix from v21 to v20 I just tried to fix the same issue and saw that it has already been fixed in develop just 18 hours ago... --- htdocs/core/modules/contract/doc/pdf_strato.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index d493a7d11f6..83695130b11 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; - +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; /** * Class to build contracts documents with model Strato From 79eaf3063884c4bdda36c254f7ab527590dd4f36 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 5 Jan 2025 12:53:10 +0100 Subject: [PATCH 2/7] Prepare v21 --- build/makepack-howto.txt | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index 674d6e2fd01..f152282f143 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -45,8 +45,7 @@ Prerequisites to build autoexe DoliWamp package from Windows: ***** Actions to do a BETA ***** -This files describe steps made by Dolibarr packaging team to make a -beta version of Dolibarr, step by step. +This files describe steps made by Dolibarr packaging team to make a beta version of Dolibarr, step by step. - Check all files are committed. - Update version/info in ChangeLog, for this you can: @@ -58,20 +57,17 @@ Recopy the content of the output file into the file ChangeLog. - Update version number with x.y.z-w in file htdocs/filefunc.inc.php - Commit all changes. -- Run makepack-dolibarr.pl to generate all packages. +- Run makepack-dolibarr.pl to check the generation of all packages. No need to publish them. -- Create a branch (x.y), if version seems stable enough. +- Post a news on dolibarr.org/dolibarr.fr + social networks about the freeze -- Move build files into www.dolibarr.org web site - (/home/dolibarr/wwwroot/files/lastbuild). - -- Post a news on dolibarr.org/dolibarr.fr + social networks +- Create a branch x.y (but only when version seems stable enough). ***** Actions to do a RELEASE ***** -This files describe steps made by Dolibarr packaging team to make a -complete release of Dolibarr, step by step. +This files describe steps made by Dolibarr packaging team to make a complete release of Dolibarr, step by step. +We suppose the branch x.y has already been created during the beta (see previous step). - Check all files are committed. - Update version/info in ChangeLog, for this you can: @@ -87,11 +83,7 @@ Recopy the content of the output file into the file ChangeLog. - Check content of built packages. -- Run makepack-dolibarr.pl again with option to publish files on - dolibarr foundation server (Dir /home/dolibarr/wwwroot/files/stable on www.dolibarr.org). -- Run makepack-dolibarr.pl again with option to publish files on - sourceforge. This will also add official tag. -- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx" - on server to point to new files (used by some web sites). +- Run makepack-dolibarr.pl again with option to publish files on dolibarr foundation server (Dir /home/dolibarr/wwwroot/files/stable on www.dolibarr.org). +- Run makepack-dolibarr.pl again with option to publish files on sourceforge. This will also add official tag. - Post a news on dolibarr.org/dolibarr.fr + social networks From d832961311f5324d19412db61eb38d5f00e0dcae Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 5 Jan 2025 13:38:02 +0100 Subject: [PATCH 3/7] Debug v21 --- htdocs/fourn/commande/dispatch.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index d61d72ea72b..1d798f5c2fb 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -1196,7 +1196,7 @@ if ($id > 0 || !empty($ref)) { $sql .= " cfd.rowid as dispatchlineid, cfd.fk_product, cfd.qty, cfd.eatby, cfd.sellby, cfd.batch, cfd.comment, cfd.status, cfd.datec"; $sql .= " ,cd.rowid, cd.subprice"; if (isModEnabled('reception')) { - $sql .= " ,cfd.fk_reception, r.date_delivery"; + $sql .= ", cfd.fk_reception, r.date_delivery"; } $sql .= " FROM ".MAIN_DB_PREFIX."product as p,"; $sql .= " ".MAIN_DB_PREFIX."receptiondet_batch as cfd"; @@ -1245,7 +1245,7 @@ if ($id > 0 || !empty($ref)) { print ''.$langs->trans("Comment").''; // Status - if (getDolGlobalString('SUPPLIER_ORDER_USE_DISPATCH_STATUS') && $reception !== null && empty($reception->rowid)) { + if (getDolGlobalString('SUPPLIER_ORDER_USE_DISPATCH_STATUS') && !isModEnabled("reception")) { print ''.$langs->trans("Status").''; } elseif (isModEnabled("reception")) { print ''; @@ -1256,9 +1256,6 @@ if ($id > 0 || !empty($ref)) { print "\n"; - - $reception = null; - while ($i < $num) { $objp = $db->fetch_object($resql); @@ -1364,7 +1361,7 @@ if ($id > 0 || !empty($ref)) { print ''.$objp->comment.''; // Status - if (getDolGlobalString('SUPPLIER_ORDER_USE_DISPATCH_STATUS') && ($reception === null || empty($reception->rowid))) { + if (getDolGlobalString('SUPPLIER_ORDER_USE_DISPATCH_STATUS') && !isModEnabled("reception")) { print ''; $supplierorderdispatch->status = (empty($objp->status) ? 0 : $objp->status); // print $supplierorderdispatch->status; @@ -1383,7 +1380,7 @@ if ($id > 0 || !empty($ref)) { } } else { $disabled = ''; - if ($object->statut == 5) { + if ($object->status == $object::STATUS_RECEIVED_COMPLETELY) { $disabled = 1; } if (empty($objp->status)) { From d985190a5352befa974dc4dcdaca2a58c6a88d1d Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 5 Jan 2025 15:32:24 +0100 Subject: [PATCH 4/7] FIX #32387 --- htdocs/hrm/class/evaluation.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index be26c853199..4144add377c 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -171,7 +171,7 @@ class Evaluation extends CommonObject */ public function __construct(DoliDB $db) { - global $conf, $langs, $user; + global $langs, $user; $this->db = $db; @@ -185,8 +185,8 @@ class Evaluation extends CommonObject $this->fields['entity']['enabled'] = 0; } - if (!$user->hasRight('hrm', 'evaluation', 'readall')) { - $this->fields['fk_user']['type'] .= ':rowid IN('.$this->db->sanitize(implode(", ", $user->getAllChildIds(1))).')'; + if (!$user->hasRight('hrm', 'evaluation', 'readall') || 1) { + $this->fields['fk_user']['type'] .= ':t.rowid:IN:'.$this->db->sanitize(implode(",", $user->getAllChildIds(1))); } $this->date_eval = dol_now(); From 2b9c4ab25f5e6c37210371fe29c35590475a6596 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 5 Jan 2025 15:33:45 +0100 Subject: [PATCH 5/7] FIX #32387 --- htdocs/hrm/class/evaluation.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index 4144add377c..dc0cdfa6c08 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -185,7 +185,7 @@ class Evaluation extends CommonObject $this->fields['entity']['enabled'] = 0; } - if (!$user->hasRight('hrm', 'evaluation', 'readall') || 1) { + if (!$user->hasRight('hrm', 'evaluation', 'readall')) { $this->fields['fk_user']['type'] .= ':t.rowid:IN:'.$this->db->sanitize(implode(",", $user->getAllChildIds(1))); } From 6a368edca1b813266e2a0b67079830c5b82d68e5 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 5 Jan 2025 15:38:11 +0100 Subject: [PATCH 6/7] Trans --- htdocs/langs/en_US/hrm.lang | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/hrm.lang b/htdocs/langs/en_US/hrm.lang index 8d2d2cf651d..a04adc105e0 100644 --- a/htdocs/langs/en_US/hrm.lang +++ b/htdocs/langs/en_US/hrm.lang @@ -46,11 +46,11 @@ NewEval=New competency assessment ValidateEvaluation=Validate competency assessment ConfirmValidateEvaluation=Are you sure you want to validate this competency assessment with the reference %s? EvaluationCard=Competency assessment -RequiredRank=Required rank for the job profile -RequiredRankShort=Required rank +RequiredRank=Required level for the job profile +RequiredRankShort=Required level PositionsWithThisProfile=Positions with this job profiles -EmployeeRank=Employee rank for this skill -EmployeeRankShort=Employee rank +EmployeeRank=Employee level for this skill +EmployeeRankShort=Employee level EmployeePosition=Employee position EmployeePositions=Employee positions EmployeesInThisPosition=Employees in this position From 1cfa3b58038de29e1a24984bf0b8d79e39560fa0 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 5 Jan 2025 18:34:01 +0100 Subject: [PATCH 7/7] Fix warning --- htdocs/admin/delais.php | 2 - htdocs/comm/action/list.php | 1 - htdocs/commande/card.php | 3 +- htdocs/commande/class/commande.class.php | 3 +- htdocs/compta/localtax/quadri_detail.php | 4 +- htdocs/compta/paiement.php | 4 +- htdocs/compta/payment_sc/card.php | 3 +- htdocs/core/class/CMailFile.class.php | 4 +- htdocs/core/lib/agenda.lib.php | 1 - htdocs/core/lib/functions.lib.php | 6 --- htdocs/core/lib/stock.lib.php | 3 +- .../commande/doc/pdf_einstein.modules.php | 4 +- htdocs/core/modules/modBlockedLog.class.php | 5 +- .../pdf_standard_movementstock.modules.php | 5 +- .../modules/mrp/doc/pdf_vinci.modules.php | 6 +-- .../product/doc/pdf_standard.modules.php | 10 ++-- .../modules/propale/doc/pdf_cyan.modules.php | 8 +-- .../societe/mod_codecompta_aquarium.php | 1 - .../stocktransfer/doc/pdf_eagle.modules.php | 6 +-- .../doc/pdf_canelle.modules.php | 6 +-- .../supplier_order/doc/pdf_cornas.modules.php | 4 +- .../doc/pdf_muscadet.modules.php | 4 +- .../pdf_standard_supplierpayment.modules.php | 7 ++- .../doc/pdf_aurore.modules.php | 8 +-- .../doc/pdf_zenith.modules.php | 4 +- htdocs/core/tpl/login.tpl.php | 1 - htdocs/expedition/dispatch.php | 2 +- htdocs/fourn/commande/dispatch.php | 4 -- htdocs/fourn/facture/card.php | 1 - htdocs/includes/odtphp/odf.php | 4 +- htdocs/partnership/admin/website.php | 2 +- .../product/stock/class/productlot.class.php | 6 +-- .../stock/stats/commande_fournisseur.php | 4 +- htdocs/product/stock/stats/expedition.php | 4 +- htdocs/product/stock/stats/reception.php | 4 +- htdocs/projet/tasks.php | 12 ----- htdocs/public/partnership/new.php | 50 +++++++++---------- htdocs/public/payment/newpayment.php | 3 +- htdocs/public/project/suggestbooth.php | 8 +-- htdocs/reception/dispatch.php | 2 +- htdocs/recruitment/admin/public_interface.php | 2 +- ...tandard_recruitmentjobposition.modules.php | 4 +- ...recruitment_recruitmentjobposition.lib.php | 7 ++- htdocs/takepos/index.php | 2 +- 44 files changed, 98 insertions(+), 136 deletions(-) diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 85f95e9a0c7..fe17368d821 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -326,8 +326,6 @@ if (!getDolGlobalString('MAIN_DISABLE_METEO') || getDolGlobalInt('MAIN_DISABLE_M $offset = 0; $cursor = 10; // By default - //if (!empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET; - //if (!empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP; $level0 = $offset; if (getDolGlobalString('MAIN_METEO_LEVEL0')) { $level0 = getDolGlobalString('MAIN_METEO_LEVEL0'); diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 71a8884e0d2..3c3100ab6bd 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -886,7 +886,6 @@ if (!empty($arrayfields['a.note']['checked'])) { print_liste_field_titre($arrayfields['a.note']['label'], $_SERVER["PHP_SELF"], "a.note", $param, "", "", $sortfield, $sortorder); $totalarray['nbfield']++; } -//if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) if (!empty($arrayfields['a.datep']['checked'])) { print_liste_field_titre($arrayfields['a.datep']['label'], $_SERVER["PHP_SELF"], "a.datep,a.id", $param, '', '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 372c85dcdc7..e60536c9bcb 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -501,8 +501,7 @@ if (empty($reshook)) { // Now we create same links to contact than the ones found on origin object /* Useless, already into the create - if (!empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) - { + if (getDolGlobalString('MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN')) { $originforcontact = $object->origin; $originidforcontact = $object->origin_id; if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index e3b381a518a..517a8698581 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1846,8 +1846,7 @@ class Commande extends CommonOrder $this->lines[] = $line; /** POUR AJOUTER AUTOMATIQUEMENT LES SOUSPRODUITS a LA COMMANDE - if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) - { + if (getDolGlobalString('PRODUIT_SOUSPRODUITS')) { $prod = new Product($this->db); $prod->fetch($idproduct); $prod -> get_sousproduits_arbo(); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 40b573d117d..9e0e7584df3 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -201,10 +201,10 @@ $builddate = dol_now(); if (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'payment') $description.=$langs->trans("RulesVATInProducts"); if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'invoice') $description.='
'.$langs->trans("RulesVATDueServices"); if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'payment') $description.='
'.$langs->trans("RulesVATInServices"); -if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { +if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) { $description.='
'.$langs->trans("DepositsAreNotIncluded"); } -if (! empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) { +if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) { $description.='
'.$langs->trans("SupplierDepositsAreNotIncluded"); } */ diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 17bf8c8534c..7ed19ae9a1b 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -904,7 +904,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''; /*if (isModEnabled('prelevement')) { $langs->load("withdrawals"); - if (!empty($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS)) print '
'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed"); + if (getDolGlobalString('WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS')) { + print '
'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed"); + } }*/ print '


'; print ''; diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index c18606594bd..777973ca035 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -253,8 +253,7 @@ if ($resql) { print '
'; /* -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 ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''; // print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').''; // print ''; @@ -198,7 +198,7 @@ if ($id > 0 || !empty($ref)) { // } // // // Quality control - // if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { + // if (getDolGlobalString('PRODUCT_LOT_ENABLE_QUALITY_CONTROL')) { // print ''.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''; // print ''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').''; // print ''; diff --git a/htdocs/product/stock/stats/expedition.php b/htdocs/product/stock/stats/expedition.php index e6a24a0cb16..98e95f94520 100644 --- a/htdocs/product/stock/stats/expedition.php +++ b/htdocs/product/stock/stats/expedition.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 ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''; // print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').''; // print ''; @@ -198,7 +198,7 @@ if ($id > 0 || !empty($ref)) { // } // // // Quality control - // if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { + // if (getDolGlobalString('PRODUCT_LOT_ENABLE_QUALITY_CONTROL')) { // print ''.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''; // print ''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').''; // print ''; diff --git a/htdocs/product/stock/stats/reception.php b/htdocs/product/stock/stats/reception.php index 00f44bbf175..00eae3cb6aa 100644 --- a/htdocs/product/stock/stats/reception.php +++ b/htdocs/product/stock/stats/reception.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 ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''; // print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').''; // print ''; @@ -198,7 +198,7 @@ if ($id > 0 || !empty($ref)) { // } // // // Quality control - // if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { + // if (getDolGlobalString('PRODUCT_LOT_ENABLE_QUALITY_CONTROL')) { // print ''.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''; // print ''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').''; // print ''; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 7d41c983205..2dde9cf51ed 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -1060,12 +1060,6 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object- print ''; } } - // Contacts of task, disabled because available by default just after - /* - if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { - print ''; - } - */ if (!empty($arrayfields['t.budget_amount']['checked'])) { print ''; @@ -1148,12 +1142,6 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object- print_liste_field_titre($arrayfields['t.billed']['label'], $_SERVER["PHP_SELF"], "t.billed", '', $param, '', $sortfield, $sortorder, 'right '); } } - // Contacts of task, disabled because available by default just after - /* - if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { - print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', $param, $sortfield, $sortorder); - } - */ if (!empty($arrayfields['t.budget_amount']['checked'])) { print_liste_field_titre($arrayfields['t.budget_amount']['label'], $_SERVER["PHP_SELF"], "t.budget_amount", "", $param, '', $sortfield, $sortorder, 'center '); diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php index 6733a91edf8..14fdfee4b99 100644 --- a/htdocs/public/partnership/new.php +++ b/htdocs/public/partnership/new.php @@ -393,12 +393,12 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he // Send email to the foundation to say a new member subscribed with autosubscribe form /* - if (getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') && !empty($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL_SUBJECT) && - !empty($conf->global->PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL)) { + if (getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') && getDolGlobalString('PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL_SUBJECT') && + getDolGlobalString('PARTNERSHIP_AUTOREGISTER_NOTIF_MAIL')) { // Define link to login card $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { - $appli = $conf->global->MAIN_APPLICATION_TITLE; + if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { + $appli = getDolGlobalString('MAIN_APPLICATION_TITLE'); if (preg_match('/\d\.\d/', $appli)) { if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) { $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core @@ -441,8 +441,8 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he } /* - if (!empty($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE) && $conf->global->PARTNERSHIP_NEWFORM_PAYONLINE != '-1') { - if ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'all') { + if (getDolGlobalString('PARTNERSHIP_NEWFORM_PAYONLINE') && getDolGlobalString('PARTNERSHIP_NEWFORM_PAYONLINE' != '-1') { + if (getDolGlobalString('PARTNERSHIP_NEWFORM_PAYONLINE') == 'all') { $urlback = DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); if (price2num(GETPOST('amount', 'alpha'))) { $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); @@ -450,14 +450,14 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he if (GETPOST('email')) { $urlback .= '&email='.urlencode(GETPOST('email')); } - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, '2')); + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN()) { + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE()) { + $urlback .= '&securekey='.urlencode(dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'membersubscription'.$partnership->ref, '2')); } else { - $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + $urlback .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN')); } } - } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'paybox') { + } elseif (getDolGlobalString('PARTNERSHIP_NEWFORM_PAYONLINE') == 'paybox') { $urlback = DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); if (price2num(GETPOST('amount', 'alpha'))) { $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); @@ -465,14 +465,14 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he if (GETPOST('email')) { $urlback .= '&email='.urlencode(GETPOST('email')); } - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, '2')); + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) { + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { + $urlback .= '&securekey='.urlencode(dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'membersubscription'.$partnership->ref, '2')); } else { - $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + $urlback .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN')); } } - } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'paypal') { + } elseif (getDolGlobalString('PARTNERSHIP_NEWFORM_PAYONLINE') == 'paypal') { $urlback = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.urlencode($partnership->ref); if (price2num(GETPOST('amount', 'alpha'))) { $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); @@ -480,14 +480,14 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he if (GETPOST('email')) { $urlback .= '&email='.urlencode(GETPOST('email')); } - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, '2')); + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) { + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { + $urlback .= '&securekey='.urlencode(dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'membersubscription'.$partnership->ref, '2')); } else { - $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + $urlback .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN')); } } - } elseif ($conf->global->PARTNERSHIP_NEWFORM_PAYONLINE == 'stripe') { + } elseif (getDolGlobalString('PARTNERSHIP_NEWFORM_PAYONLINE') == 'stripe') { $urlback = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?from=partnershipnewform&source=membersubscription&ref='.$partnership->ref; if (price2num(GETPOST('amount', 'alpha'))) { $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); @@ -495,11 +495,11 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he if (GETPOST('email')) { $urlback .= '&email='.urlencode(GETPOST('email')); } - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$partnership->ref, '2')); + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) { + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { + $urlback .= '&securekey='.urlencode(dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'membersubscription'.$partnership->ref, '2')); } else { - $urlback .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + $urlback .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN')); } } } else { diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 94c1ae17167..e11b86d1c5b 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -662,8 +662,7 @@ if ($action == 'charge' && isModEnabled('stripe')) { // Test on permission not r // Create the VAT record in Stripe /* We don't know country of customer, so we can't create tax - if (!empty($conf->global->STRIPE_SAVE_TAX_IDS)) // We setup to save Tax info on Stripe side. Warning: This may result in error when saving customer - { + if (getDolGlobalString('STRIPE_SAVE_TAX_IDS')) { // We setup to save Tax info on Stripe side. Warning: This may result in error when saving customer if (!empty($vatcleaned)) { $isineec=isInEEC($object); diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index e83055b3eb7..949bb286c48 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -480,11 +480,11 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he $sourcetouse = 'boothlocation'; $reftouse = $facture->id; $redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.$sourcetouse.'&ref='.$reftouse.'&booth='.$conforbooth->id; - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { - $redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, '2'); // Use the source in the hash to avoid duplicates if the references are identical + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) { + if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { + $redirection .= '&securekey='.dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $sourcetouse . $reftouse, '2'); // Use the source in the hash to avoid duplicates if the references are identical } else { - $redirection .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; + $redirection .= '&securekey='.getDolGlobalString('PAYMENT_SECURITY_TOKEN'); } } header("Location: ".$redirection); diff --git a/htdocs/reception/dispatch.php b/htdocs/reception/dispatch.php index e9c496a5e2c..8a08ff920ff 100644 --- a/htdocs/reception/dispatch.php +++ b/htdocs/reception/dispatch.php @@ -239,7 +239,7 @@ if ($action == 'updatelines' && $permissiontoreceive) { $mouv->setOrigin($objectsrc->element, $objectsrc->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->livraison($user, $product, $entrepot, $qtymouv*(-1), $price, $comment, $now, $eatby, $sellby, $batch, 0, $inventorycode); } else { $result = $mouv->reception($user, $product, $entrepot, $qtymouv, $price, $comment, $eatby, $sellby, $batch, '', 0, $inventorycode); diff --git a/htdocs/recruitment/admin/public_interface.php b/htdocs/recruitment/admin/public_interface.php index 50982ae7757..a29b9d342d4 100644 --- a/htdocs/recruitment/admin/public_interface.php +++ b/htdocs/recruitment/admin/public_interface.php @@ -127,7 +127,7 @@ print ''; diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index 7402190de2b..64983e640de 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -927,7 +927,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) $posx = $this->marge_gauche; // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -1099,7 +1099,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio ), 'border-left' => true, // add left line separator ); - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalString('PRODUCT_USE_UNITS')) { $this->cols['unit']['status'] = true; } diff --git a/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php b/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php index 1c632710b1f..bb6a707e628 100644 --- a/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php +++ b/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php @@ -138,10 +138,9 @@ function getPublicJobPositionUrl($mode, $ref = '', $localorexternal = 0) } $out = $urltouse . '/public/recruitment/view.php?ref=' . ($mode ? '' : '') . $ref . ($mode ? '' : ''); - /*if (!empty($conf->global->RECRUITMENT_SECURITY_TOKEN)) - { - if (empty($conf->global->RECRUITMENT_SECURITY_TOKEN)) $out .= '&securekey='.urlencode($conf->global->RECRUITMENT_SECURITY_TOKEN); - else $out .= '&securekey='.urlencode(dol_hash($conf->global->RECRUITMENT_SECURITY_TOKEN, '2')); + /*if (getDolGlobalString('RECRUITMENT_SECURITY_TOKEN')) { + if (!getDolGlobalString('RECRUITMENT_SECURITY_TOKEN')) $out .= '&securekey='.urlencode(getDolGlobalString('RECRUITMENT_SECURITY_TOKEN')); + else $out .= '&securekey='.urlencode(dol_hash(getDolGlobalString('RECRUITMENT_SECURITY_TOKEN'), '2')); }*/ // For multicompany diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 62a1d45ce34..f3a7faf2532 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -604,7 +604,7 @@ function Reduction() { function CloseBill() { global->TAKEPOS_FORBID_SALES_TO_DEFAULT_CUSTOMER)) { + if (getDolGlobalString('TAKEPOS_FORBID_SALES_TO_DEFAULT_CUSTOMER')) { echo "customerAnchorTag = document.querySelector('a[id=\"customer\"]'); "; echo "if (customerAnchorTag && customerAnchorTag.innerText.trim() === '".$langs->trans("Customer")."') { "; echo "alert('".dol_escape_js($langs->trans("NoClientErrorMessage"))."'); ";