| '.$langs->trans("TicketPublicInterfaceTextHelpMessageLabelAdmin").'';
print ' | ';
diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php
index 8b1e8ebf8c0..3f3316f6996 100644
--- a/htdocs/admin/tools/export.php
+++ b/htdocs/admin/tools/export.php
@@ -153,7 +153,7 @@ if ($what == 'postgresql') {
$cmddump = dol_sanitizePathName($cmddump);
/* Not required, the command is output on screen but not ran for pgsql
- if (! empty($dolibarr_main_restrict_os_commands))
+ if (!empty($dolibarr_main_restrict_os_commands))
{
$arrayofallowedcommand=explode(',', $dolibarr_main_restrict_os_commands);
dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$cmddump);
diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php
index 68cb81ccc24..84bbd197a64 100644
--- a/htdocs/admin/tools/export_files.php
+++ b/htdocs/admin/tools/export_files.php
@@ -127,7 +127,7 @@ $result = dol_mkdir($outputdir);
$utils = new Utils($db);
-if ($export_type == 'externalmodule' && ! empty($what)) {
+if ($export_type == 'externalmodule' && !empty($what)) {
$fulldirtocompress = DOL_DOCUMENT_ROOT.'/custom/'.dol_sanitizeFileName($what);
} else {
$fulldirtocompress = DOL_DATA_ROOT;
diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php
index e1899b35a56..e29a351a705 100644
--- a/htdocs/admin/workflow.php
+++ b/htdocs/admin/workflow.php
@@ -62,13 +62,13 @@ $workflowcodes = array(
'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array(
'family'=>'create',
'position'=>10,
- 'enabled'=>(isModEnabled("propal") && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled("propal") && isModEnabled('commande')),
'picto'=>'order'
),
'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array(
'family'=>'create',
'position'=>20,
- 'enabled'=>(!empty($conf->commande->enabled) && isModEnabled('facture')),
+ 'enabled'=>(isModEnabled('commande') && isModEnabled('facture')),
'picto'=>'bill'
),
'WORKFLOW_TICKET_CREATE_INTERVENTION' => array (
@@ -84,7 +84,7 @@ $workflowcodes = array(
'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array(
'family'=>'classify_proposal',
'position'=>30,
- 'enabled'=>(isModEnabled("propal") && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled("propal") && isModEnabled('commande')),
'picto'=>'propal',
'warning'=>''
),
@@ -100,19 +100,19 @@ $workflowcodes = array(
'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING'=>array( // when shipping validated
'family'=>'classify_order',
'position'=>40,
- 'enabled'=>(isModEnabled("expedition") && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled("expedition") && isModEnabled('commande')),
'picto'=>'order'
),
'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED'=>array( // when shipping closed
'family'=>'classify_order',
'position'=>41,
- 'enabled'=>(isModEnabled("expedition") && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled("expedition") && isModEnabled('commande')),
'picto'=>'order'
),
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array(
'family'=>'classify_order',
'position'=>42,
- 'enabled'=>(isModEnabled('facture') && !empty($conf->commande->enabled)),
+ 'enabled'=>(isModEnabled('facture') && isModEnabled('commande')),
'picto'=>'order',
'warning'=>''
), // For this option, if module invoice is disabled, it does not exists, so "Classify billed" for order must be done manually from order card.
@@ -123,7 +123,7 @@ $workflowcodes = array(
'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array(
'family'=>'classify_supplier_proposal',
'position'=>60,
- 'enabled'=>(!empty($conf->supplier_proposal->enabled) && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))),
+ 'enabled'=>(isModEnabled('supplier_proposal') && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))),
'picto'=>'supplier_proposal',
'warning'=>''
),
diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php
index 5282a43dacc..d5362f4ac56 100644
--- a/htdocs/api/class/api_login.class.php
+++ b/htdocs/api/class/api_login.class.php
@@ -88,7 +88,7 @@ class Login
global $conf, $dolibarr_main_authentication, $dolibarr_auto_user;
// Is the login API disabled ? The token must be generated from backoffice only.
- if (! empty($conf->global->API_DISABLE_LOGIN_API)) {
+ if (!empty($conf->global->API_DISABLE_LOGIN_API)) {
dol_syslog("Warning: A try to use the login API has been done while the login API is disabled. You must generate or get the token from the backoffice.", LOG_WARNING);
throw new RestException(403, "Error, the login API has been disabled for security purpose. You must generate or get the token from the backoffice.");
}
diff --git a/htdocs/asset/agenda.php b/htdocs/asset/agenda.php
index 437e51cf0b1..8d325954a76 100644
--- a/htdocs/asset/agenda.php
+++ b/htdocs/asset/agenda.php
@@ -123,7 +123,7 @@ $form = new Form($db);
if ($object->id > 0) {
$title = $langs->trans("Agenda");
- //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
+ //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
$help_url = 'EN:Module_Agenda_En';
llxHeader('', $title, $help_url);
diff --git a/htdocs/asset/model/agenda.php b/htdocs/asset/model/agenda.php
index 51a7fb515bf..fb2ff12aa88 100644
--- a/htdocs/asset/model/agenda.php
+++ b/htdocs/asset/model/agenda.php
@@ -125,7 +125,7 @@ $form = new Form($db);
if ($object->id > 0) {
$title = $langs->trans("Agenda");
- //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
+ //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
$help_url = 'EN:Module_Agenda_En';
llxHeader('', $title, $help_url);
diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php
index 8880e6c1e86..0f9034e374a 100644
--- a/htdocs/blockedlog/admin/blockedlog.php
+++ b/htdocs/blockedlog/admin/blockedlog.php
@@ -22,22 +22,25 @@
* \brief Page setup for blockedlog module
*/
+
+// Load Dolibarr environment
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
// Load translation files required by the page
-$langs->loadLangs(array("admin", "other", "blockedlog"));
+$langs->loadLangs(array('admin', 'blockedlog', 'other'));
+// Access Control
if (!$user->admin || empty($conf->blockedlog->enabled)) {
accessforbidden();
}
-$action = GETPOST('action', 'aZ09');
+// Get Parameters
+$action = GETPOST('action', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
-
-$withtab = GETPOST('withtab', 'int');
+$withtab = GETPOST('withtab', 'int');
/*
diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php
index 4490b3897df..934ef9fba7b 100644
--- a/htdocs/blockedlog/admin/blockedlog_list.php
+++ b/htdocs/blockedlog/admin/blockedlog_list.php
@@ -18,11 +18,13 @@
*/
/**
- * \file htdocs/blockedlog/admin/blockedlog_list.php
- * \ingroup blockedlog
- * \brief Page setup for blockedlog module
+ * \file htdocs/blockedlog/admin/blockedlog_list.php
+ * \ingroup blockedlog
+ * \brief Page setup for blockedlog module
*/
+
+// Load Dolibarr environment
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
@@ -31,16 +33,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
// Load translation files required by the page
-$langs->loadLangs(array("admin", "other", "blockedlog", "bills"));
+$langs->loadLangs(array('admin', 'bills', 'blockedlog', 'other'));
+// Access Control
if ((!$user->admin && empty($user->rights->blockedlog->read)) || empty($conf->blockedlog->enabled)) {
accessforbidden();
}
-$action = GETPOST('action', 'aZ09');
+// Get Parameters
+$action = GETPOST('action', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'blockedloglist'; // To manage different context of search
-$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
-$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
+$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
+$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$search_showonlyerrors = GETPOST('search_showonlyerrors', 'int');
if ($search_showonlyerrors < 0) {
@@ -95,7 +99,7 @@ $block_static->loadTrackedEvents();
$result = restrictedArea($user, 'blockedlog', 0, '');
-
+// Execution Time
$max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined
$max_time = @ini_get("max_execution_time");
if ($max_time && $max_time < $max_execution_time_for_importexport) {
diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index 3ab2b63ad3f..d6e1517344a 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -140,6 +140,7 @@ class BlockedLog
$this->trackedevents = array();
+ // Customer Invoice/Facture / Payment
if (isModEnabled('facture')) {
$this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE';
$this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE';
@@ -151,18 +152,19 @@ class BlockedLog
}
/* Supplier
+ // Supplier Invoice / Payment
if (isModEnabled("fournisseur")) {
- $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate';
+ $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate';
$this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete';
$this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done
- $this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done
- $this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done
-
- $this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate';
- $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate';
+ $this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done
+ $this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done
+ $this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate';
+ $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate';
}
*/
+ // Donation
if (!empty($conf->don->enabled)) {
$this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE';
$this->trackedevents['DON_DELETE'] = 'logDON_DELETE';
@@ -172,23 +174,29 @@ class BlockedLog
}
/*
+ // Salary
if (!empty($conf->salary->enabled)) {
- $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate';
- $this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate';
- $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate';
+ $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate';
+ $this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate';
+ $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate';
}
*/
- if (!empty($conf->adherent->enabled)) {
+ // Members
+ if (isModEnabled('adherent')) {
$this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE';
$this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY';
$this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE';
}
+
+ // Bank
if (isModEnabled("banque")) {
$this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE';
$this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY';
$this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE';
}
+
+ // Cashdesk
// $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules
$moduleposenabled = (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->BANK_ENABLE_POS_CASHCONTROL));
if ($moduleposenabled) {
diff --git a/htdocs/blockedlog/lib/blockedlog.lib.php b/htdocs/blockedlog/lib/blockedlog.lib.php
index 44f7074d582..23a7ec1f62d 100644
--- a/htdocs/blockedlog/lib/blockedlog.lib.php
+++ b/htdocs/blockedlog/lib/blockedlog.lib.php
@@ -16,9 +16,9 @@
*/
/**
- * \file htdocs/blockedlog/lib/blockedlog.lib.php
- * \ingroup system
- * \brief Library for common blockedlog functions
+ * \file htdocs/blockedlog/lib/blockedlog.lib.php
+ * \ingroup system
+ * \brief Library for common blockedlog functions
*/
/**
diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php
index 3c2f3e732ba..97e446ec7a8 100644
--- a/htdocs/bom/bom_agenda.php
+++ b/htdocs/bom/bom_agenda.php
@@ -126,7 +126,7 @@ $form = new Form($db);
if ($object->id > 0) {
$title = $langs->trans("Agenda");
- //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
+ //if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Agenda';
llxHeader('', $title, $help_url);
@@ -171,7 +171,7 @@ if ($object->id > 0) {
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
}
} else {
- if (! empty($object->fk_project)) {
+ if (!empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
$morehtmlref.='';
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index c39711ce296..db58d8d5a33 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -335,7 +335,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
$text = $langs->trans('ConfirmValidateBom', $numref);
- /*if (! empty($conf->notification->enabled))
+ /*if (!empty($conf->notification->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
@@ -363,7 +363,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Confirmation of closing
if ($action == 'close') {
$text = $langs->trans('ConfirmCloseBom', $object->ref);
- /*if (! empty($conf->notification->enabled))
+ /*if (!empty($conf->notification->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
@@ -391,7 +391,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Confirmation of reopen
if ($action == 'reopen') {
$text = $langs->trans('ConfirmReopenBom', $object->ref);
- /*if (! empty($conf->notification->enabled))
+ /*if (!empty($conf->notification->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
@@ -477,7 +477,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
}
} else {
- if (! empty($object->fk_project)) {
+ if (!empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
$morehtmlref.=$proj->getNomUrl();
diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php
index 48798db9b8f..eb78228f068 100644
--- a/htdocs/bom/bom_list.php
+++ b/htdocs/bom/bom_list.php
@@ -366,7 +366,7 @@ foreach($object->fields as $key => $val)
$sql .= "t.".$key.", ";
}
// Add fields from extrafields
-if (! empty($extrafields->attributes[$object->table_element]['label'])) {
+if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
}
diff --git a/htdocs/bom/bom_net_needs.php b/htdocs/bom/bom_net_needs.php
index baf4b096324..668ed29a62e 100644
--- a/htdocs/bom/bom_net_needs.php
+++ b/htdocs/bom/bom_net_needs.php
@@ -195,19 +195,19 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
*/
$text_stock_options = $langs->trans("RealStockDesc").' ';
$text_stock_options .= $langs->trans("RealStockWillAutomaticallyWhen").' ';
- $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) ? '- '.$langs->trans("DeStockOnShipment").' ' : '');
- $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) ? '- '.$langs->trans("DeStockOnValidateOrder").' ' : '');
- $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_BILL) ? '- '.$langs->trans("DeStockOnBill").' ' : '');
- $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) ? '- '.$langs->trans("ReStockOnBill").' ' : '');
- $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) ? '- '.$langs->trans("ReStockOnValidateOrder").' ' : '');
- $text_stock_options .= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) ? '- '.$langs->trans("ReStockOnDispatchOrder").' ' : '');
+ $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) ? '- '.$langs->trans("DeStockOnShipment").' ' : '');
+ $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) ? '- '.$langs->trans("DeStockOnValidateOrder").' ' : '');
+ $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_BILL) ? '- '.$langs->trans("DeStockOnBill").' ' : '');
+ $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) ? '- '.$langs->trans("ReStockOnBill").' ' : '');
+ $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) ? '- '.$langs->trans("ReStockOnValidateOrder").' ' : '');
+ $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) ? '- '.$langs->trans("ReStockOnDispatchOrder").' ' : '');
$text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) ? '- '.$langs->trans("StockOnReception").' ' : '');
print '';
print "\n";
print '';
print '| '.$langs->trans('Product');
- if (! empty($conf->global->BOM_SUB_BOM) && $action == 'treeview') {
+ if (!empty($conf->global->BOM_SUB_BOM) && $action == 'treeview') {
print ' '.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").' ';
print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").' ';
}
@@ -216,11 +216,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' | '.$form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1).' | ';
print ''.$form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")).' | ';
print ' ';
- if (! empty($TChildBom)) {
+ if (!empty($TChildBom)) {
if ($action == 'treeview') {
foreach ($TChildBom as $fk_bom => $TProduct) {
$repeatChar = ' ';
- if (! empty($TProduct['bom'])) {
+ if (!empty($TProduct['bom'])) {
if ($TProduct['parentid'] != $object->id) print '';
else print ' ';
print '| '.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1);
@@ -233,7 +233,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' | | ';
print ' ';
}
- if (! empty($TProduct['product'])) {
+ if (!empty($TProduct['product'])) {
foreach ($TProduct['product'] as $fk_product => $TInfos) {
$prod = new Product($db);
$prod->fetch($fk_product);
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index 576d8f5fb09..1bbd9babfba 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -821,8 +821,8 @@ class BOM extends CommonObject
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->create))
- || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate))))
+ /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->create))
+ || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate))))
{
$this->error='NotEnoughPermissions';
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
@@ -933,8 +933,8 @@ class BOM extends CommonObject
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write))
- || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate))))
+ /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->write))
+ || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate))))
{
$this->error='Permission denied';
return -1;
@@ -957,8 +957,8 @@ class BOM extends CommonObject
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write))
- || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate))))
+ /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->write))
+ || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate))))
{
$this->error='Permission denied';
return -1;
@@ -981,8 +981,8 @@ class BOM extends CommonObject
return 0;
}
- /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->write))
- || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->bom->bom_advance->validate))))
+ /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->write))
+ || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->bom->bom_advance->validate))))
{
$this->error='Permission denied';
return -1;
@@ -1338,9 +1338,9 @@ class BOM extends CommonObject
*/
public function getNetNeeds(&$TNetNeeds = array(), $qty = 0)
{
- if (! empty($this->lines)) {
+ if (!empty($this->lines)) {
foreach ($this->lines as $line) {
- if (! empty($line->childBom)) {
+ if (!empty($line->childBom)) {
foreach ($line->childBom as $childBom) $childBom->getNetNeeds($TNetNeeds, $line->qty*$qty);
} else {
if (empty($TNetNeeds[$line->fk_product])) {
@@ -1362,9 +1362,9 @@ class BOM extends CommonObject
*/
public function getNetNeedsTree(&$TNetNeeds = array(), $qty = 0, $level = 0)
{
- if (! empty($this->lines)) {
+ if (!empty($this->lines)) {
foreach ($this->lines as $line) {
- if (! empty($line->childBom)) {
+ if (!empty($line->childBom)) {
foreach ($line->childBom as $childBom) {
$TNetNeeds[$childBom->id]['bom'] = $childBom;
$TNetNeeds[$childBom->id]['parentid'] = $this->id;
@@ -1572,7 +1572,7 @@ class BOMLine extends CommonObjectLine
public function fetch($id, $ref = null)
{
$result = $this->fetchCommon($id, $ref);
- //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines();
+ //if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines();
return $result;
}
diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php
index 0a618974024..d5345106093 100644
--- a/htdocs/categories/class/api_categories.class.php
+++ b/htdocs/categories/class/api_categories.class.php
@@ -682,9 +682,6 @@ class Categories extends DolibarrApi
unset($object->total_ttc);
unset($object->total_tva);
unset($object->lines);
- unset($object->fk_incoterms);
- unset($object->label_incoterms);
- unset($object->location_incoterms);
unset($object->civility_id);
unset($object->name);
unset($object->lastname);
diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 380c5813155..14654914dd5 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1362,7 +1362,7 @@ if ($action == 'create') {
$formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200');
print '';
- if (!empty($conf->categorie->enabled)) {
+ if (isModEnabled('categorie')) {
// Categories
print '| '.$langs->trans("Categories").' | ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1);
@@ -1870,7 +1870,7 @@ if ($id > 0) {
print ' | ';
// Tags-Categories
- if (!empty($conf->categorie->enabled)) {
+ if (isModEnabled('categorie')) {
print '| '.$langs->trans("Categories").' | ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1);
$c = new Categorie($db);
@@ -2285,7 +2285,7 @@ if ($id > 0) {
}
// Categories
- if (!empty($conf->categorie->enabled)) {
+ if (isModEnabled('categorie')) {
print ' | | '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_ACTIONCOMM, 1);
print " | ";
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index 9a7114a6113..571815fb615 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -457,11 +457,11 @@ class ActionComm extends CommonObject
if (!empty($this->datep) && !empty($this->datef)) {
$this->durationp = ($this->datef - $this->datep); // deprecated
}
- //if (! empty($this->date) && ! empty($this->dateend)) $this->durationa=($this->dateend - $this->date);
+ //if (!empty($this->date) && !empty($this->dateend)) $this->durationa=($this->dateend - $this->date);
if (!empty($this->datep) && !empty($this->datef) && $this->datep > $this->datef) {
$this->datef = $this->datep;
}
- //if (! empty($this->date) && ! empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date;
+ //if (!empty($this->date) && !empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date;
if (!isset($this->fk_project) || $this->fk_project < 0) {
$this->fk_project = 0;
}
diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php
index db9f28c7763..2d57cfe1284 100644
--- a/htdocs/comm/action/class/cactioncomm.class.php
+++ b/htdocs/comm/action/class/cactioncomm.class.php
@@ -201,7 +201,7 @@ class CActionComm
if ($obj->module == 'invoice' && isModEnabled('facture') && !empty($user->rights->facture->lire)) {
$qualified = 1;
}
- if ($obj->module == 'order' && !empty($conf->commande->enabled) && empty($user->rights->commande->lire)) {
+ if ($obj->module == 'order' && isModEnabled('commande') && empty($user->rights->commande->lire)) {
$qualified = 1;
}
if ($obj->module == 'propal' && isModEnabled("propal") && !empty($user->rights->propale->lire)) {
@@ -218,7 +218,7 @@ class CActionComm
}
// For case module = 'myobject@eventorganization'
$tmparray = preg_split("/@/", $obj->module, -1);
- if (count($tmparray) > 1 && $tmparray[1] == 'eventorganization' && !empty($conf->eventorganization->enabled)) {
+ if (count($tmparray) > 1 && $tmparray[1] == 'eventorganization' && isModEnabled('eventorganization')) {
$qualified = 1;
}
// For the generic case with type = 'module...' and module = 'myobject@mymodule'
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 278096b3b75..e287ccfd2d7 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -1911,7 +1911,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
}
//print 'background: #'.$colortouse.';';
//print 'background: -webkit-gradient(linear, left top, left bottom, from(#'.dol_color_minus($color, -3).'), to(#'.dol_color_minus($color, -1).'));';
- //if (! empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));';
+ //if (!empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));';
//else print 'background-color: transparent !important; background: none; border: 1px solid #bbb;';
//print ' -moz-border-radius:4px;"';
//print 'border: 1px solid #ccc" width="100%"';
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index dd877e903e4..b42bf003333 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -830,7 +830,7 @@ 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($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, '', 'align="center"', $sortfield, $sortorder);
$totalarray['nbfield']++;
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 7c1d9da7e29..6b3161190d8 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -47,16 +47,16 @@ if (isModEnabled('facture')) {
if (isModEnabled("propal")) {
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
}
-if (!empty($conf->commande->enabled)) {
+if (isModEnabled('commande')) {
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
}
if (isModEnabled("expedition")) {
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
}
-if (!empty($conf->contrat->enabled)) {
+if (isModEnabled('contrat')) {
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
}
-if (!empty($conf->adherent->enabled)) {
+if (isModEnabled('adherent')) {
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
}
if (!empty($conf->ficheinter->enabled)) {
@@ -66,10 +66,10 @@ if (!empty($conf->ficheinter->enabled)) {
// Load translation files required by the page
$langs->loadLangs(array('companies', 'banks'));
-if (!empty($conf->contrat->enabled)) {
+if (isModEnabled('contrat')) {
$langs->load("contracts");
}
-if (!empty($conf->commande->enabled)) {
+if (isModEnabled('commande')) {
$langs->load("orders");
}
if (isModEnabled("expedition")) {
@@ -510,7 +510,7 @@ if ($object->id > 0) {
}
if ($object->client) {
- if (!empty($conf->commande->enabled) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) {
+ if (isModEnabled('commande') && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) {
print ''."\n";
print '';
print '| ';
@@ -584,7 +584,7 @@ if ($object->id > 0) {
print ' | ';
}
- if (!empty($conf->intracommreport->enabled)) {
+ if (isModEnabled('intracommreport')) {
// Transport mode by default
print '';
print '| ';
@@ -605,7 +605,7 @@ if ($object->id > 0) {
}
// Categories
- if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
+ if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
$langs->load("categories");
print ' | | '.$langs->trans("CustomersCategoriesShort").' | ';
print '';
@@ -621,7 +621,7 @@ if ($object->id > 0) {
include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
// Module Adherent
- if (!empty($conf->adherent->enabled)) {
+ if (isModEnabled('adherent')) {
$langs->load("members");
$langs->load("users");
@@ -718,7 +718,7 @@ if ($object->id > 0) {
}
}
- if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
+ if (isModEnabled('commande') && $user->rights->commande->lire) {
// Box commandes
$tmp = $object->getOutstandingOrders();
$outstandingOpened = $tmp['opened'];
@@ -913,7 +913,7 @@ if ($object->id > 0) {
/*
* Latest orders
*/
- if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
+ if (isModEnabled('commande') && $user->rights->commande->lire) {
$param ="";
$sql = "SELECT s.nom, s.rowid";
@@ -1122,7 +1122,7 @@ if ($object->id > 0) {
/*
* Latest contracts
*/
- if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
+ if (isModEnabled('contrat') && $user->rights->contrat->lire) {
$sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut as contract_status, c.datec as dc, c.date_contrat as dcon, c.ref_customer as refcus, c.ref_supplier as refsup, c.entity,";
$sql .= " c.last_main_doc, c.model_pdf";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
@@ -1553,7 +1553,7 @@ if ($object->id > 0) {
print '';
}
- if (!empty($conf->commande->enabled) && $user->rights->commande->creer && $object->status == 1) {
+ if (isModEnabled('commande') && $user->rights->commande->creer && $object->status == 1) {
$langs->load("orders");
print '';
}
@@ -1570,7 +1570,7 @@ if ($object->id > 0) {
// Add invoice
if ($user->socid == 0) {
- if (!empty($conf->deplacement->enabled) && $object->status == 1) {
+ if (isModEnabled('deplacement') && $object->status == 1) {
$langs->load("trips");
print '';
}
@@ -1581,7 +1581,7 @@ if ($object->id > 0) {
} else {
$langs->loadLangs(array("orders", "bills"));
- if (!empty($conf->commande->enabled)) {
+ if (isModEnabled('commande')) {
if ($object->client != 0 && $object->client != 2) {
if (!empty($orders2invoice) && $orders2invoice > 0) {
print '';
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 9eb37d80799..c2852cd45c9 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -93,10 +93,10 @@ $companystatic = new Societe($db);
if (isModEnabled("propal")) {
$propalstatic = new Propal($db);
}
-if (!empty($conf->supplier_proposal->enabled)) {
+if (isModEnabled('supplier_proposal')) {
$supplierproposalstatic = new SupplierProposal($db);
}
-if (!empty($conf->commande->enabled)) {
+if (isModEnabled('commande')) {
$orderstatic = new Commande($db);
}
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) {
@@ -226,7 +226,7 @@ if (isModEnabled("propal") && $user->rights->propal->lire) {
* Draft supplier proposals
*/
-if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
+if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->lire) {
$sql = "SELECT p.rowid, p.ref, p.total_ht, p.total_tva, p.total_ttc, p.fk_statut as status";
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
$sql .= ", s.code_client, s.code_compta, s.client";
@@ -323,7 +323,7 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa
* Draft customer orders
*/
-if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
+if (isModEnabled('commande') && $user->rights->commande->lire) {
$sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.total_tva, c.total_ttc, c.fk_statut as status";
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
$sql .= ", s.code_client, s.code_compta, s.client";
@@ -810,7 +810,7 @@ if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERM
/*
* Latest contracts
*/
-if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) { // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
+if (isModEnabled('contrat') && $user->rights->contrat->lire && 0) { // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
$staticcontrat = new Contrat($db);
$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias";
@@ -1007,7 +1007,7 @@ if (isModEnabled("propal") && $user->rights->propal->lire) {
/*
* Opened (validated) order
*/
-if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
+if (isModEnabled('commande') && $user->rights->commande->lire) {
$sql = "SELECT c.rowid as commandeid, c.total_ttc, c.total_ht, c.total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed";
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
$sql .= ", s.code_client, s.code_compta, s.client";
diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php
index bd052f4161e..8f0a2b38c7d 100644
--- a/htdocs/comm/mailing/advtargetemailing.php
+++ b/htdocs/comm/mailing/advtargetemailing.php
@@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// Load translation files required by the page
$langs->loadLangs(array('mails', 'companies'));
-if (!empty($conf->categorie->enabled)) {
+if (isModEnabled('categorie')) {
$langs->load("categories");
}
diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php
index eb1b50cee1b..ed1fa3f523e 100644
--- a/htdocs/comm/mailing/card.php
+++ b/htdocs/comm/mailing/card.php
@@ -980,7 +980,7 @@ if ($action == 'create') {
}
if (($object->statut == 0 || $object->statut == 1 || $object->statut == 2) && $user->rights->mailing->creer) {
- if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING)) {
+ if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_MAILING)) {
print ''.$langs->trans("EditWithEditor").'';
} else {
print ''.$langs->trans("EditWithTextEditor").'';
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index c9b48665c95..764455e5f62 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -515,7 +515,7 @@ if ($object->fetch($id) >= 0) {
$num = $db->num_rows($resql);
$param = "&id=".$object->id;
- //if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
+ //if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.urlencode($limit);
}
diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php
index bd1a83e9959..9ac09ac529b 100644
--- a/htdocs/comm/mailing/index.php
+++ b/htdocs/comm/mailing/index.php
@@ -58,7 +58,7 @@ print load_fiche_titre($title);
print '';
-//if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+//if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
//{
// Search into emailings
print ' |
| |