diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php
index 7065e20f92b..3d72ebe6739 100755
--- a/build/generate_filelist_xml.php
+++ b/build/generate_filelist_xml.php
@@ -56,7 +56,7 @@ if (empty($argv[1])) {
$i=0;
while ($i < $argc) {
- if (! empty($argv[$i])) {
+ if (!empty($argv[$i])) {
parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ...
}
if (preg_match('/includeconstant=/', $argv[$i])) {
diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php
index 0b1c24dc139..8af71d441a1 100755
--- a/dev/initdata/generate-proposal.php
+++ b/dev/initdata/generate-proposal.php
@@ -152,7 +152,7 @@ $user->rights->propal->creer=1;
$user->rights->propal->propal_advance->validate=1;
-if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) {
+if (!empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) {
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
}
diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php
index 9214f34d810..d75c9fae8b2 100755
--- a/dev/initdata/purge-data.php
+++ b/dev/initdata/purge-data.php
@@ -218,7 +218,7 @@ if ($date == 'all') {
}
// Replace database handler
-if (! empty($argv[4])) {
+if (!empty($argv[4])) {
$db->close();
unset($db);
$db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]);
diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php
index 1a997ddc63c..76be3804f1a 100644
--- a/dev/tools/dolibarr-postgres2mysql.php
+++ b/dev/tools/dolibarr-postgres2mysql.php
@@ -487,7 +487,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$pkey = $line;
$linenumber ++;
- if (! empty($lines[$linenumber])) {
+ if (!empty($lines[$linenumber])) {
$line = $lines[$linenumber];
} else {
$line = '';
@@ -517,7 +517,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if (substr($line, 0, 12) == "CREATE INDEX") {
$matches = array();
preg_match('/CREATE INDEX "?([a-zA-Z0-9_]*)"? ON "?([a-zA-Z0-9_\.]*)"? USING btree \((.*)\);/', $line, $matches);
- if (! empty($matches[3])) {
+ if (!empty($matches[3])) {
$indexname = $matches[1];
$tablename = str_replace('public.', '', $matches[2]);
$columns = $matches[3];
@@ -529,7 +529,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if (substr($line, 0, 19) == "CREATE UNIQUE INDEX") {
$matches = array();
preg_match('/CREATE UNIQUE INDEX "?([a-zA-Z0-9_]*)"? ON "?([a-zA-Z0-9_\.]*)"? USING btree \((.*)\);/', $line, $matches);
- if (! empty($matches[3])) {
+ if (!empty($matches[3])) {
$indexname = $matches[1];
$tablename = str_replace('public.', '', $matches[2]);
$columns = str_replace('"', '', $matches[3]);
diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php
index 956ad95b9b6..bf1b121b03f 100644
--- a/dev/translation/autotranslator.class.php
+++ b/dev/translation/autotranslator.class.php
@@ -309,11 +309,11 @@ class autoTranslator
{
// We want to be sure that src_lang and dest_lang are using 2 chars only
$tmp=explode('_', $src_lang);
- if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) {
+ if (!empty($tmp[1]) && $tmp[0] == $tmp[1]) {
$src_lang=$tmp[0];
}
$tmp=explode('_', $dest_lang);
- if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) {
+ if (!empty($tmp[1]) && $tmp[0] == $tmp[1]) {
$dest_lang=$tmp[0];
}
@@ -349,7 +349,7 @@ class autoTranslator
// now, process the JSON string
$json = json_decode($body, true);
- if ((! empty($json['responseStatus']) && $json['responseStatus'] != 200)
+ if ((!empty($json['responseStatus']) && $json['responseStatus'] != 200)
|| count($json['data']['translations']) == 0) {
print "Error: ".$json['responseStatus']." ".$url."\n";
return false;
diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php
index 840f09a0adb..95ea90e3f34 100755
--- a/dev/translation/sanity_check_en_langfiles.php
+++ b/dev/translation/sanity_check_en_langfiles.php
@@ -221,7 +221,7 @@ foreach ($dups as $string => $pages) {
// Loop on each line keword was found into file.
$listoffilesforthisentry=array();
foreach ($lines as $line => $translatedvalue) {
- if (! empty($listoffilesforthisentry[$file])) {
+ if (!empty($listoffilesforthisentry[$file])) {
$duplicateinsamefile=1;
}
$listoffilesforthisentry[$file]=1;
@@ -300,7 +300,7 @@ if ($web) {
// STEP 2 - Search key not used
-if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true')) {
+if ((!empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true')) {
print "***** Strings in en_US that are never used:\n";
$unused=array();
diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php
index f0a0397cd6e..b2427c9f57a 100755
--- a/dev/translation/strip_language_file.php
+++ b/dev/translation/strip_language_file.php
@@ -303,8 +303,8 @@ foreach ($filesToProcess as $fileToProcess) {
// String exists in both files and value into alternative language differs from main language but also from english files
// so we keep it.
- if ((! empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key]
- && ! empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key])
+ if ((!empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key]
+ && !empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key])
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)
) {
//print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n";
diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php
index c8c4099e67e..e4af034b1f4 100644
--- a/htdocs/accountancy/class/accountancyexport.class.php
+++ b/htdocs/accountancy/class/accountancyexport.class.php
@@ -1347,7 +1347,7 @@ class AccountancyExport
}
print $nature_piece.$separator;
// RACI
- // if (! empty($line->subledger_account)) {
+ // if (!empty($line->subledger_account)) {
// if ($line->doc_type == 'supplier_invoice') {
// $racine_subledger_account = '40';
// } elseif ($line->doc_type == 'customer_invoice') {
@@ -1610,7 +1610,7 @@ class AccountancyExport
}
print $nature_piece.$separator;
// RACI
- // if (! empty($line->subledger_account)) {
+ // if (!empty($line->subledger_account)) {
// if ($line->doc_type == 'supplier_invoice') {
// $racine_subledger_account = '40';
// } elseif ($line->doc_type == 'customer_invoice') {
diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
index 502249907e8..45d9c4f8fce 100644
--- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php
+++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
@@ -65,7 +65,7 @@ abstract class ActionsAdherentCardCommon
/*if (is_object($this->object) && method_exists($this->object,'fetch'))
{
- if (! empty($id)) $this->object->fetch($id);
+ if (!empty($id)) $this->object->fetch($id);
}
else
{*/
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 1d2df6c04ab..46420995312 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -1108,7 +1108,7 @@ class Adherent extends CommonObject
// Mise a jour
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
$sql .= " SET pass_crypted = '".$this->db->escape($password_crypted)."'";
- //if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
+ //if (!empty($conf->global->DATABASE_PWD_ENCRYPTED))
if ($isencrypted) {
$sql .= ", pass = null";
} else {
@@ -2061,7 +2061,7 @@ class Adherent extends CommonObject
$err = 0;
// mailman
- if (!empty($conf->global->ADHERENT_USE_MAILMAN) && !empty($conf->mailmanspip->enabled)) {
+ if (!empty($conf->global->ADHERENT_USE_MAILMAN) && isModEnabled('mailmanspip')) {
$result = $mailmanspip->add_to_mailman($this);
if ($result < 0) {
@@ -2081,7 +2081,7 @@ class Adherent extends CommonObject
}
// spip
- if (!empty($conf->global->ADHERENT_USE_SPIP) && !empty($conf->mailmanspip->enabled)) {
+ if (!empty($conf->global->ADHERENT_USE_SPIP) && isModEnabled('mailmanspip')) {
$result = $mailmanspip->add_to_spip($this);
if ($result < 0) {
$this->errors[] = $mailmanspip->error;
@@ -2132,7 +2132,7 @@ class Adherent extends CommonObject
}
}
- if ($conf->global->ADHERENT_USE_SPIP && !empty($conf->mailmanspip->enabled)) {
+ if ($conf->global->ADHERENT_USE_SPIP && isModEnabled('mailmanspip')) {
$result = $mailmanspip->del_to_spip($this);
if ($result < 0) {
$this->errors[] = $mailmanspip->error;
diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php
index 8f98b4d25e9..8b8f2c6c921 100644
--- a/htdocs/admin/clicktodial.php
+++ b/htdocs/admin/clicktodial.php
@@ -107,7 +107,7 @@ print '* https://myphoneserver/phoneurl?login=__LOGIN__&password=__PASS__&caller
print '* sip:__PHONETO__@my.sip.server';
print '';
-//if (! empty($user->clicktodial_url))
+//if (!empty($user->clicktodial_url))
//{
print '
';
print info_admin($langs->trans("ValueOverwrittenByUserSetup"));
diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index eec8bb16417..4bffad16ee3 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -644,7 +644,7 @@ if ($conf->banque->enabled) {
print '
| ';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").' | | ';
- if (! empty($conf->use_javascript_ajax))
+ if (!empty($conf->use_javascript_ajax))
{
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER');
}
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/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index 1715b97f81e..d6e1517344a 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -183,7 +183,7 @@ class BlockedLog
*/
// Members
- if (!empty($conf->adherent->enabled)) {
+ 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';
diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php
index d2c64eea0b6..623af8c79d8 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);
@@ -150,7 +150,7 @@ if ($object->id > 0) {
// Thirdparty
$morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project
- if (! empty($conf->project->enabled))
+ if (!empty($conf->project->enabled))
{
$langs->load("projects");
$morehtmlref.=' '.$langs->trans('Project') . ' ';
@@ -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 f088ae34050..25b7a8730dd 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);
@@ -457,7 +457,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Thirdparty
$morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
// Project
- if (! empty($conf->project->enabled))
+ if (!empty($conf->project->enabled))
{
$langs->load("projects");
$morehtmlref.=' '.$langs->trans('Project') . ' ';
@@ -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/comm/action/card.php b/htdocs/comm/action/card.php
index 6f6ddc5383e..0d7953db900 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 7fb2f0f129e..4260cd0c583 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 ec8ebdd67e6..27391a4cd3d 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 ' |
| |