diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index ef0c2b74009..168e6367fcc 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -1157,7 +1157,7 @@ if ($mode == 'marketplace') {
-
-
-";
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index d5e5892ac74..838fe0fc1c0 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -117,7 +117,7 @@ if (getDolGlobalString('ADD_UNSPLASH_LOGIN_BACKGROUND')) {
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
?>
-
>
@@ -249,7 +249,7 @@ if (!empty($captcha)) {
-element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier' || $object->element == 'invoice_supplier_rec') { // We must have same test in printObjectLines
?>
';
if ($object->statut == 0 && $num_prod > 0) {
- if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('expedition', 'delivery', 'creer'))
- || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('expedition', 'delivery_advance', 'validate'))) {
+ if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'delivery', 'creer'))
+ || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'delivery_advance', 'validate'))) {
print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, '');
}
}
diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php
index b890746e2a4..b07e7f412d6 100644
--- a/htdocs/delivery/class/delivery.class.php
+++ b/htdocs/delivery/class/delivery.class.php
@@ -409,9 +409,9 @@ class Delivery extends CommonObject
$error = 0;
- if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('expedition', 'delivery', 'creer'))
- || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('expedition', 'delivery_advance', 'validate'))) {
- if (!empty($conf->global->DELIVERY_ADDON_NUMBER)) {
+ if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'delivery', 'creer'))
+ || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'delivery_advance', 'validate'))) {
+ if (getDolGlobalString('DELIVERY_ADDON_NUMBER')) {
// Setting the command numbering module name
$modName = $conf->global->DELIVERY_ADDON_NUMBER;
@@ -569,7 +569,7 @@ class Delivery extends CommonObject
$line->description = $expedition->lines[$i]->description;
$line->qty = $expedition->lines[$i]->qty_shipped;
$line->fk_product = $expedition->lines[$i]->fk_product;
- if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($expedition->lines[$i]->array_options) && count($expedition->lines[$i]->array_options) > 0) { // For avoid conflicts if trigger used
+ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED') && is_array($expedition->lines[$i]->array_options) && count($expedition->lines[$i]->array_options) > 0) { // For avoid conflicts if trigger used
$line->array_options = $expedition->lines[$i]->array_options;
}
$this->lines[$i] = $line;
@@ -606,7 +606,7 @@ class Delivery extends CommonObject
global $conf;
$error = 0;
- if ($id > 0 && !$error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used
+ if ($id > 0 && !$error && !getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED') && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used
$line = new DeliveryLine($this->db);
$line->array_options = $array_options;
$line->id = $id;
@@ -643,7 +643,7 @@ class Delivery extends CommonObject
$line->origin_id = $origin_id;
$line->qty = $qty;
- if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used
+ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED') && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used
$line->array_options = $array_options;
}
$this->lines[$num] = $line;
@@ -1125,7 +1125,7 @@ class Delivery extends CommonObject
if ($this->model_pdf) {
$modele = $this->model_pdf;
- } elseif (!empty($conf->global->DELIVERY_ADDON_PDF)) {
+ } elseif (getDolGlobalString('DELIVERY_ADDON_PDF')) {
$modele = $conf->global->DELIVERY_ADDON_PDF;
}
}
diff --git a/htdocs/delivery/tpl/linkedobjectblock.tpl.php b/htdocs/delivery/tpl/linkedobjectblock.tpl.php
index fae712658f7..3c7e12abe45 100644
--- a/htdocs/delivery/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/delivery/tpl/linkedobjectblock.tpl.php
@@ -48,7 +48,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
}
echo '
';
echo '| '.$langs->trans("Delivery");
- if (!empty($showImportButton) && !empty($conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES)) {
+ if (!empty($showImportButton) && getDolGlobalString('MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES')) {
print ' ';
diff --git a/htdocs/don/card.php b/htdocs/don/card.php
index eb8c8069ed7..eaa8a1c3969 100644
--- a/htdocs/don/card.php
+++ b/htdocs/don/card.php
@@ -131,7 +131,7 @@ if (empty($reshook)) {
$result = $object->reopen($user);
if ($result >= 0) {
// Define output language
- if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
+ if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
if (method_exists($object, 'generateDocument')) {
$outputlangs = $langs;
$newlang = '';
@@ -225,7 +225,7 @@ if (empty($reshook)) {
$error = 0;
- if (isModEnabled("societe") && !empty($conf->global->DONATION_USE_THIRDPARTIES) && !(GETPOST("socid", 'int') > 0)) {
+ if (isModEnabled("societe") && getDolGlobalString('DONATION_USE_THIRDPARTIES') && !(GETPOST("socid", 'int') > 0)) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty")), null, 'errors');
$action = "create";
$error++;
@@ -417,7 +417,7 @@ if ($action == 'create') {
print ' |
| '.$langs->trans('Ref').' | '.$langs->trans('Draft').' |
';
// Company
- if (isModEnabled("societe") && !empty($conf->global->DONATION_USE_THIRDPARTIES)) {
+ if (isModEnabled("societe") && getDolGlobalString('DONATION_USE_THIRDPARTIES')) {
// Thirdparty
if ($soc->id > 0) {
print '
'.$langs->trans('ThirdParty').' | ';
@@ -443,7 +443,7 @@ if ($action == 'create') {
$filter = '((s.client:IN:1,2,3) AND (status:=:1))';
print $form->select_company($soc->id, 'socid', $filter, 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
// Option to reload page to retrieve customer informations. Note, this clear other input
- if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) {
+ if (getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) {
print '