diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php
index 8d0cd566a7f9afcaceb1b557e701e8cb23c09521..4b9f5e672e8cdc5fc92bfd5a879d4c79086f61ac 100644
--- a/htdocs/adherents/admin/adherent.php
+++ b/htdocs/adherents/admin/adherent.php
@@ -178,7 +178,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
 print '<input type="hidden" name="action" value="update">';
 print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
 print '<tr '.$bc[$var].'><td>'.$langs->trans("AddSubscriptionIntoAccount").'</td>';
-if ($conf->banque->enabled)
+if (! empty($conf->banque->enabled))
 {
     print '<td>';
     print $form->selectyesno('constvalue',$conf->global->ADHERENT_BANK_USE,1);
diff --git a/htdocs/adherents/admin/mailman.php b/htdocs/adherents/admin/mailman.php
index 05dba9a696cb56ee833223118da6c4902b47f73d..b3169c721f2ed5e822bd76d7d89b4a5b36f257bd 100644
--- a/htdocs/adherents/admin/mailman.php
+++ b/htdocs/adherents/admin/mailman.php
@@ -163,7 +163,7 @@ dol_htmloutput_mesg($mesg);
  * Mailman
  */
 $var=!$var;
-if ($conf->global->ADHERENT_USE_MAILMAN)
+if (! empty($conf->global->ADHERENT_USE_MAILMAN))
 {
     //$lien=img_picto($langs->trans("Active"),'tick').' ';
     $lien='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
@@ -214,7 +214,7 @@ else
 
 dol_fiche_end();
 
-if ($conf->global->ADHERENT_USE_MAILMAN)
+if (! empty($conf->global->ADHERENT_USE_MAILMAN))
 {
     print '<form action="'.$_SERVER["PHP_SELF"].'">';
     print '<input type="hidden" name="action" value="testsubscribe">';
diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php
index 37ae2d63c25c493a83935a9f0d4f4a6e71215856..9dfac613f2a3dab461632b4efc6a9951d03ea348 100755
--- a/htdocs/adherents/admin/public.php
+++ b/htdocs/adherents/admin/public.php
@@ -167,8 +167,8 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
     print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
     print '</td><td width="60" align="right">';
     $listofval=array();
-    if ($conf->paybox->enabled) $listofval['paybox']='Paybox';
-    if ($conf->paypal->enabled) $listofval['paypal']='PayPal';
+    if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox';
+    if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal';
     print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1);
     print "</td></tr>\n";
 }
diff --git a/htdocs/adherents/admin/spip.php b/htdocs/adherents/admin/spip.php
index c099d0a93a353416615e506c9c55e61e00ba3e8c..29ae8e9e8940382af841b4ff4db113ede450d4a4 100644
--- a/htdocs/adherents/admin/spip.php
+++ b/htdocs/adherents/admin/spip.php
@@ -123,7 +123,7 @@ dol_htmloutput_mesg($mesg);
  * Spip
  */
 $var=!$var;
-if ($conf->global->ADHERENT_USE_SPIP)
+if (! empty($conf->global->ADHERENT_USE_SPIP))
 {
     //$lien=img_picto($langs->trans("Active"),'tick').' ';
     $lien='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_SPIP">';
diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php
index db8a055e32f7d252aaf7d74359728826e358f4d4..487c763644521cf236e824b2375f8cc0cdeb3fad 100644
--- a/htdocs/adherents/agenda.php
+++ b/htdocs/adherents/agenda.php
@@ -79,7 +79,7 @@ if ($id)
 
 	llxHeader("",$langs->trans("Agenda"),'');
 
-	if ($conf->notification->enabled) $langs->load("mails");
+	if (! empty($conf->notification->enabled)) $langs->load("mails");
 	$head = member_prepare_head($object);
 
 	dol_fiche_head($head, 'agenda', $langs->trans("Member"),0,'user');
@@ -142,7 +142,7 @@ if ($id)
 
     print '<div class="tabsAction">';
 
-    if ($conf->agenda->enabled)
+    if (! empty($conf->agenda->enabled))
     {
         print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>';
     }
diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index 61ef0da1314e0f56eaa900ca47308d38cefd1729..77814af9620a4f964518864bf9569d90dbfc3c0f 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -479,7 +479,7 @@ if ($rowid)
 
     $rowspan=9;
     if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1;
-    if ($conf->societe->enabled) $rowspan++;
+    if (! empty($conf->societe->enabled)) $rowspan++;
 
     print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
     print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@@ -545,7 +545,7 @@ if ($rowid)
     print '</td></tr>';
 
     // Third party Dolibarr
-    if ($conf->societe->enabled)
+    if (! empty($conf->societe->enabled))
     {
         print '<tr><td>';
         print '<table class="nobordernopadding" width="100%"><tr><td>';
@@ -675,7 +675,7 @@ if ($rowid)
             print '<td align="center">'.$langs->trans("DateSubscription").'</td>';
             print '<td align="center">'.$langs->trans("DateEnd").'</td>';
             print '<td align="right">'.$langs->trans("Amount").'</td>';
-            if ($conf->banque->enabled)
+            if (! empty($conf->banque->enabled))
             {
                 print '<td align="right">'.$langs->trans("Account").'</td>';
             }
@@ -693,7 +693,7 @@ if ($rowid)
                 print '<td align="center">'.dol_print_date($db->jdate($objp->dateadh),'day')."</td>\n";
                 print '<td align="center">'.dol_print_date($db->jdate($objp->datef),'day')."</td>\n";
                 print '<td align="right">'.price($objp->cotisation).'</td>';
-                if ($conf->banque->enabled)
+                if (! empty($conf->banque->enabled))
                 {
                     print '<td align="right">';
                     if ($objp->bid)
@@ -720,7 +720,7 @@ if ($rowid)
 
 
         // Link for paypal payment
-        if ($conf->paypal->enabled)
+        if (! empty($conf->paypal->enabled))
         {
             include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
             print showPaypalPaymentUrl('membersubscription',$object->ref);
@@ -889,7 +889,7 @@ if ($rowid)
                 print '</td>';
                 print '<td>';
                 print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(!$bankdirect&&!$bankviainvoice?' checked="checked"':'').'> '.$langs->trans("None").'<br>';
-                if ($conf->banque->enabled)
+                if (! empty($conf->banque->enabled))
                 {
                     print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.($bankdirect?' checked="checked"':'');
                     print '> '.$langs->trans("MoreActionBankDirect").'<br>';
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 3c0290b4eeb44931f277fcc267b2916df802f9b1..ebdb9f824cca8046462c79b1fdaacb1646b1e146 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -160,7 +160,7 @@ class Adherent extends CommonObject
 
         // Envoi mail confirmation
         $from=$conf->email_from;
-        if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
+        if (! empty($conf->global->ADHERENT_MAIL_FROM)) $from=$conf->global->ADHERENT_MAIL_FROM;
 
         include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
         $mailfile = new CMailFile($subjecttosend, $this->email, $from, $texttosend, $filename_list, $mimetype_list, $mimefilename_list, $addr_cc, $addr_bcc, $deliveryreceipt, $msgishtml);
diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php
index b0a75427697ace62980c9b70988d5e3c161252cc..e7b898ffd1e1a412cba55f4be939ebb80595405d 100644
--- a/htdocs/adherents/cotisations.php
+++ b/htdocs/adherents/cotisations.php
@@ -99,7 +99,7 @@ if ($result)
     print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield,$sortorder);
     print_liste_field_titre($langs->trans("Login"),"cotisations.php","d.login",$param,"","",$sortfield,$sortorder);
     print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder);
-    if ($conf->banque->enabled)
+    if (! empty($conf->banque->enabled))
     {
         print_liste_field_titre($langs->trans("Account"),"cotisations.php","b.fk_account",$pram,"","",$sortfield,$sortorder);
     }
@@ -153,7 +153,7 @@ if ($result)
         print '</td>';
 
         // Banque
-        if ($conf->banque->enabled)
+        if (! empty($conf->banque->enabled))
         {
             if ($objp->fk_account)
             {
@@ -207,7 +207,7 @@ if ($result)
     print "<td align=\"right\">&nbsp;</td>\n";
     print "<td align=\"right\">&nbsp;</td>\n";
     print "<td align=\"right\">&nbsp;</td>\n";
-    if ($conf->banque->enabled)
+    if (! empty($conf->banque->enabled))
     {
         print '<td>&nbsp;</td>';
     }
diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php
index 5647ae168390c09398d03adffcdb369dc5ef19ad..e12ec01d3a944d50dc1756f62a2cb7d9af998c61 100644
--- a/htdocs/adherents/fiche.php
+++ b/htdocs/adherents/fiche.php
@@ -54,7 +54,7 @@ $socid=GETPOST('socid','int');
 // Security check
 $result=restrictedArea($user,'adherent',$rowid);
 
-if ($conf->mailmanspip->enabled)
+if (! empty($conf->mailmanspip->enabled))
 {
 	include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
 
@@ -212,7 +212,7 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes')
 	if ($object->email)
 	{
         $from=$conf->email_from;
-        if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
+        if (! empty($conf->global->ADHERENT_MAIL_FROM)) $from=$conf->global->ADHERENT_MAIL_FROM;
 
         $result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
 
@@ -844,7 +844,7 @@ if ($action == 'create')
 
 	/*
     // Third party Dolibarr
-    if ($conf->societe->enabled)
+    if (! empty($conf->societe->enabled))
     {
         print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td class="valeur">';
         print $form->select_company($object->fk_soc,'socid','',1);
@@ -924,7 +924,7 @@ if ($action == 'edit')
 
 	$rowspan=15;
     if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
-	if ($conf->societe->enabled) $rowspan++;
+	if (! empty($conf->societe->enabled)) $rowspan++;
 
 	print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
 	print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
@@ -1064,7 +1064,7 @@ if ($action == 'edit')
     }
 
 	// Third party Dolibarr
-    if ($conf->societe->enabled)
+    if (! empty($conf->societe->enabled))
     {
     	print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2" class="valeur">';
     	if ($object->fk_soc)
@@ -1148,7 +1148,7 @@ if ($rowid && $action != 'edit')
 		array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login)
 		);
         $text=$langs->trans("ConfirmCreateLogin").'<br>';
-        if ($conf->societe->enabled)
+        if (! empty($conf->societe->enabled))
         {
             if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser");
             else $text.=$langs->trans("UserWillBeInternalUser");
@@ -1204,8 +1204,8 @@ if ($rowid && $action != 'edit')
         // Cree un tableau formulaire
         $formquestion=array();
 		if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label,  'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?true:false));
-		if ($conf->global->ADHERENT_USE_MAILMAN) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"),'value'=>''); }
-		if ($conf->global->ADHERENT_USE_SPIP)    { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); }
+		if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"),'value'=>''); }
+		if (! empty($conf->global->ADHERENT_USE_SPIP))    { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); }
 		print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1);
     }
 
@@ -1276,7 +1276,7 @@ if ($rowid && $action != 'edit')
 
     $rowspan=17;
     if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
-    if ($conf->societe->enabled) $rowspan++;
+    if (! empty($conf->societe->enabled)) $rowspan++;
 
     print '<table class="border" width="100%">';
 
@@ -1382,7 +1382,7 @@ if ($rowid && $action != 'edit')
     }
 
 	// Third party Dolibarr
-    if ($conf->societe->enabled)
+    if (! empty($conf->societe->enabled))
     {
 	    print '<tr><td>';
 		print '<table class="nobordernopadding" width="100%"><tr><td>';
diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php
index 02c9539d2627ef44c38d759bc443b222f3d88340..e9fa20f7e98d6eb26f6dcabe22228a9117af96cc 100644
--- a/htdocs/adherents/fiche_subscription.php
+++ b/htdocs/adherents/fiche_subscription.php
@@ -220,7 +220,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
 	print '<input type="text" class="flat" size="60" name="note" value="'.$subscription->note.'"></td></tr>';
 
 	// Bank line
-	if ($conf->banque->enabled)
+	if (! empty($conf->banque->enabled))
 	{
 		if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank)
 	    {
@@ -335,7 +335,7 @@ if ($rowid && $action != 'edit')
     print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="3">'.$subscription->note.'</td></tr>';
 
     // Bank line
-	if ($conf->banque->enabled)
+	if (! empty($conf->banque->enabled))
 	{
 		if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank)
 	    {
diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php
index a97c729a908dd8542b283eaadc7e4d0ad4ca6509..5cc02159675a9ceaed2414f7429fcbd5bfaa1336 100644
--- a/htdocs/adherents/ldap.php
+++ b/htdocs/adherents/ldap.php
@@ -120,7 +120,7 @@ print '</tr>';
 print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$adh->login.'&nbsp;</td></tr>';
 
 // Password not crypted
-if ($conf->global->LDAP_MEMBER_FIELD_PASSWORD)
+if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD))
 {
 	print '<tr><td>'.$langs->trans("LDAPFieldPasswordNotCrypted").'</td>';
 	print '<td class="valeur">'.$adh->pass.'</td>';
@@ -128,7 +128,7 @@ if ($conf->global->LDAP_MEMBER_FIELD_PASSWORD)
 }
 
 // Password crypted
-if ($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)
+if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED))
 {
 	print '<tr><td>'.$langs->trans("LDAPFieldPasswordCrypted").'</td>';
 	print '<td class="valeur">'.$adh->pass_crypted.'</td>';
diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php
index 93549d1c51630e8c24f97f4284737bf1dd91c568..ca87562153a00bdf506762880786f6919f070d39 100644
--- a/htdocs/adherents/liste.php
+++ b/htdocs/adherents/liste.php
@@ -198,7 +198,7 @@ if ($resql)
 
 	// Filter on categories
 	$moreforfilter='';
-	if ($conf->categorie->enabled)
+	if (! empty($conf->categorie->enabled))
 	{
 		$moreforfilter.=$langs->trans('Categories'). ': ';
 		$moreforfilter.=$formother->select_categories(3,$search_categ,'search_categ',1);
diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php
index 91c376a32f6fd8a32b1003693d6e88128f1ff544..2bd8736dfda4cbfd5a5b6c9496662c299fb178ec 100644
--- a/htdocs/admin/barcode.php
+++ b/htdocs/admin/barcode.php
@@ -290,7 +290,7 @@ if (! isset($_SERVER['WINDIR']))
 }
 
 // Module produits
-if ($conf->societe->enabled)
+if (! empty($conf->societe->enabled))
 {
 	$var=!$var;
 	print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
@@ -308,7 +308,7 @@ if ($conf->societe->enabled)
 }
 
 // Module produits
-if ($conf->product->enabled)
+if (! empty($conf->product->enabled))
 {
 	$var=!$var;
 	print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index 18d7aafe3f51e049896e5f388f0f7839ede7afb9..b183892851101dfb1a6b67d47c2d2156cdc06838 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -661,7 +661,7 @@ else
 
     $var=!$var;
     print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
-    if ($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT) print getState($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT);
+    if (! empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)) print getState($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT);
     else print '&nbsp;';
     print '</td></tr>';
 
diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php
index 86d87117ac1a3eada8be517982c89814dca9393e..6f45e70bc988f9629b00caad30b49a0419079c4f 100644
--- a/htdocs/admin/compta.php
+++ b/htdocs/admin/compta.php
@@ -113,7 +113,7 @@ print "</tr>\n";
 print '<tr '.$bc[false].'><td width="200"><input type="radio" name="compta_mode" value="RECETTES-DEPENSES"'.($compta_mode != 'CREANCES-DETTES' ? ' checked' : '').'> '.$langs->trans('OptionModeTrue').'</td>';
 print '<td colspan="2">'.nl2br($langs->trans('OptionModeTrueDesc'));
 // Write info on way to count VAT
-if ($conf->global->MAIN_MODULE_COMPTABILITE)
+if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
 {
 	//	print "<br>\n";
 	//	print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php
index d6859188a254bd7064659e5d4cbad58c3e051c3f..ddbbb7ece69f7dac6d03dc1e9321856ed7ff217f 100644
--- a/htdocs/admin/confexped.php
+++ b/htdocs/admin/confexped.php
@@ -84,14 +84,14 @@ $head[$h][1] = $langs->trans("Setup");
 $hselected=$h;
 $h++;
 
-if ($conf->global->MAIN_SUBMODULE_EXPEDITION)
+if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
 {
 	$head[$h][0] = DOL_URL_ROOT."/admin/expedition.php";
 	$head[$h][1] = $langs->trans("Sending");
 	$h++;
 }
 
-if ($conf->global->MAIN_SUBMODULE_LIVRAISON)
+if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
 {
 	$head[$h][0] = DOL_URL_ROOT."/admin/livraison.php";
 	$head[$h][1] = $langs->trans("Receivings");
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index 43814ccb377574ba58cdd7cb9c4f1e0926fba16a..d83a089c20c7840933d3150b4bccd17fb22aa170 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -206,7 +206,7 @@ $head[$h][1] = $langs->trans("Sending");
 $hselected=$h;
 $h++;
 
-if ($conf->global->MAIN_SUBMODULE_LIVRAISON)
+if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
 {
 	$head[$h][0] = DOL_URL_ROOT."/admin/livraison.php";
 	$head[$h][1] = $langs->trans("Receivings");
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index 3dbcbda81336180ff07dc70d366cf441af666bfc..402bc7501cb774d94c46cd1eab2b907d81db540f 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -628,7 +628,7 @@ $var=!$var;
 print '<tr '.$bc[$var].'>';
 print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
 print "<td>";
-if ($conf->banque->enabled)
+if (! empty($conf->banque->enabled))
 {
     $sql = "SELECT rowid, label";
     $sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php
index ba4b76a7e2a6e72e162990f3531be12c3333cb28..09b11f2c5cd0ebb2a7ec2b488953f97ffd106a47 100644
--- a/htdocs/admin/ldap.php
+++ b/htdocs/admin/ldap.php
@@ -124,7 +124,7 @@ if ($conf->global->LDAP_SYNCHRO_ACTIVE && ! $conf->global->LDAP_USER_DN)
 print '</td></tr>';
 
 // Synchro contact active
-if ($conf->societe->enabled)
+if (! empty($conf->societe->enabled))
 {
 	$var=!$var;
 	print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPDnContactActive").'</td><td>';
@@ -136,7 +136,7 @@ if ($conf->societe->enabled)
 }
 
 // Synchro adherentt active
-if ($conf->adherent->enabled)
+if (! empty($conf->adherent->enabled))
 {
 	$var=!$var;
 	print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPDnMemberActive").'</td><td>';
@@ -189,7 +189,7 @@ print '</td><td>'.$langs->trans("LDAPServerExample").'</td></tr>';
 // Port
 $var=!$var;
 print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPServerPort").'</td><td>';
-if ($conf->global->LDAP_SERVER_PORT)
+if (! empty($conf->global->LDAP_SERVER_PORT))
 {
   print '<input size="25" type="text" name="port" value="'.$conf->global->LDAP_SERVER_PORT.'">';
 }
@@ -227,7 +227,7 @@ print '</td><td>'.$langs->trans("LDAPAdminDnExample").'</td></tr>';
 // Pass
 $var=!$var;
 print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPPassword").'</td><td>';
-if ($conf->global->LDAP_ADMIN_PASS)
+if (! empty($conf->global->LDAP_ADMIN_PASS))
 {
 	print '<input size="25" type="password" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';// je le met en visible pour test
 }
@@ -252,7 +252,7 @@ print '</div>';
  */
 if (function_exists("ldap_connect"))
 {
-	if ($conf->global->LDAP_SERVER_HOST)
+	if (! empty($conf->global->LDAP_SERVER_HOST))
 	{
 		print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=test">'.$langs->trans("LDAPTestConnect").'</a><br><br>';
 	}
diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php
index 83dcb2c50c461ab5626444de0beebe415ebe8b2f..61a1b2fa3a71d9ac973d96b8175649c077e325ce 100644
--- a/htdocs/admin/ldap_members.php
+++ b/htdocs/admin/ldap_members.php
@@ -373,7 +373,7 @@ print info_admin($langs->trans("LDAPDescValues"));
 /*
  * Test de la connexion
  */
-if ($conf->global->LDAP_MEMBER_ACTIVE)
+if (! empty($conf->global->LDAP_MEMBER_ACTIVE))
 {
 	$butlabel=$langs->trans("LDAPTestSynchroMember");
 	$testlabel='testmember';
diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php
index 9a23e3f968d2fbfd3875e82d3df22d49117cb4ad..8a9c47595684eff3152a6b5ea3fd5d97628b561a 100644
--- a/htdocs/admin/livraison.php
+++ b/htdocs/admin/livraison.php
@@ -189,7 +189,7 @@ $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php";
 $head[$h][1] = $langs->trans("Setup");
 $h++;
 
-if ($conf->global->MAIN_SUBMODULE_EXPEDITION)
+if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
 {
 	$head[$h][0] = DOL_URL_ROOT."/admin/expedition.php";
 	$head[$h][1] = $langs->trans("Sending");
diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index b2341019ead3e0c128c3aa3db3bbeb67a374a5e6..6d869ba7a78bb2cb7865d3461c71926910a1a6fa 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -627,7 +627,7 @@ else
 
 	print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=test&amp;mode=init">'.$langs->trans("DoTestSend").'</a>';
 
-	if ($conf->fckeditor->enabled)
+	if (! empty($conf->fckeditor->enabled))
 	{
 		print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testhtml&amp;mode=init">'.$langs->trans("DoTestSendHTML").'</a>';
 	}
diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php
index bee489b5454d1d8f373d6db357b66d02ab0f26bc..453acee46fe11c779ebb7a21d90944049eb02840 100644
--- a/htdocs/admin/prelevement.php
+++ b/htdocs/admin/prelevement.php
@@ -160,7 +160,7 @@ print '<br>';
  * Notifications
  */
 
-if ($conf->global->MAIN_MODULE_NOTIFICATION)
+if (! empty($conf->global->MAIN_MODULE_NOTIFICATION))
 {
     $langs->load("mails");
     print_titre($langs->trans("Notifications"));
diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php
index 5d1c218f6a3fcf9a0dfff966a8bcf564714c5ddd..4413ab2c51b0f370529333ca02f4abeafbb5027f 100644
--- a/htdocs/admin/security.php
+++ b/htdocs/admin/security.php
@@ -301,7 +301,7 @@ $var=!$var;
 print "<tr ".$bc[$var].">";
 print '<td colspan="3">'.$langs->trans("DoNotStoreClearPassword").'</td>';
 print '<td align="center" width="60">';
-if ($conf->global->DATABASE_PWD_ENCRYPTED)
+if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
 {
 	print img_picto($langs->trans("Active"),'tick');
 }
@@ -312,7 +312,7 @@ if (! $conf->global->DATABASE_PWD_ENCRYPTED)
 	print '<a href="security.php?action=activate_encrypt">'.$langs->trans("Activate").'</a>';
 	print "</td>";
 }
-if($conf->global->DATABASE_PWD_ENCRYPTED)
+if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
 {
 	print '<td align="center" width="100">';
 	if ($allow_disable_encryption)
diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php
index deb55ee311c31cfd39e36c19eadd41d1374046f2..cc604597d17f37f446cbecef6e5bb7fe74649741 100644
--- a/htdocs/admin/stock.php
+++ b/htdocs/admin/stock.php
@@ -133,7 +133,7 @@ print "  <td align=\"right\" width=\"160\">&nbsp;</td>\n";
 print '</tr>'."\n";
 $var=true;
 
-if ($conf->facture->enabled)
+if (! empty($conf->facture->enabled))
 {
 	$var=!$var;
 	print "<tr ".$bc[$var].">";
@@ -147,7 +147,7 @@ if ($conf->facture->enabled)
 	print "</form>\n</td>\n</tr>\n";
 }
 
-if ($conf->commande->enabled)
+if (! empty($conf->commande->enabled))
 {
 	$var=!$var;
 	print "<tr ".$bc[$var].">";
@@ -161,7 +161,7 @@ if ($conf->commande->enabled)
 	print "</form>\n</td>\n</tr>\n";
 }
 
-if ($conf->expedition->enabled)
+if (! empty($conf->expedition->enabled))
 {
 	$var=!$var;
 	print "<tr ".$bc[$var].">";
@@ -183,7 +183,7 @@ print "  <td align=\"right\" width=\"160\">&nbsp;</td>\n";
 print '</tr>'."\n";
 $var=true;
 
-if ($conf->fournisseur->enabled)
+if (! empty($conf->fournisseur->enabled))
 {
 	$var=!$var;
 	print "<tr ".$bc[$var].">";
@@ -197,7 +197,7 @@ if ($conf->fournisseur->enabled)
 	print "</form>\n</td>\n</tr>\n";
 }
 
-if ($conf->fournisseur->enabled)
+if (! empty($conf->fournisseur->enabled))
 {
 	$var=!$var;
 	print "<tr ".$bc[$var].">";
@@ -210,7 +210,7 @@ if ($conf->fournisseur->enabled)
 	print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
 	print "</form>\n</td>\n</tr>\n";
 }
-if ($conf->fournisseur->enabled)
+if (! empty($conf->fournisseur->enabled))
 {
 	$var=!$var;
 	print "<tr ".$bc[$var].">";
diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php
index b835b4a5953a21956f080d6df5453d172557096b..46eebf3f2993958c3d91b237f231c054ff81d0bd 100644
--- a/htdocs/admin/tools/purge.php
+++ b/htdocs/admin/tools/purge.php
@@ -36,7 +36,7 @@ $choice=GETPOST('choice');
 
 // Define filelog to discard it from purge
 $filelog='';
-if ($conf->syslog->enabled)
+if (! empty($conf->syslog->enabled))
 {
 	$filelog=SYSLOG_FILE;
 	$filelog=preg_replace('/DOL_DATA_ROOT/i',DOL_DATA_ROOT,$filelog);
@@ -131,7 +131,7 @@ print '<table class="border" width="100%">';
 
 print '<tr class="border"><td style="padding: 4px">';
 
-if ($conf->syslog->enabled)
+if (! empty($conf->syslog->enabled))
 {
 	print '<input type="radio" name="choice" value="logfile"';
 	print ($choice && $choice=='logfile') ? ' checked="checked"' : '';
diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php
index ddc72aa795a4a78713dc9cc8053d7b2fb9556c56..af642f4bc3d4bcca98d8313ae5d1ac912a6a4520 100644
--- a/htdocs/cashdesk/admin/cashdesk.php
+++ b/htdocs/cashdesk/admin/cashdesk.php
@@ -105,7 +105,7 @@ print '<tr '.$bc[$var].'><td width=\"50%\">'.$langs->trans("CashDeskThirdPartyFo
 print '<td colspan="2">';
 print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',1,1);
 print '</td></tr>';
-if ($conf->banque->enabled)
+if (! empty($conf->banque->enabled))
 {
 	$var=!$var;
 	print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskBankAccountForSell").'</td>';
@@ -126,7 +126,7 @@ if ($conf->banque->enabled)
 	print '</td></tr>';
 }
 
-if ($conf->stock->enabled)
+if (! empty($conf->stock->enabled))
 {
 	$var=!$var;
 	print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskIdWareHouse").'</td>';
@@ -135,7 +135,7 @@ if ($conf->stock->enabled)
 	print '</td></tr>';
 }
 
-if ($conf->service->enabled)
+if (! empty($conf->service->enabled))
 {
     $var=! $var;
     print '<tr '.$bc[$var].'><td>';
diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php
index fb072f27d332189ee136929b20eb321bdf39aadf..af0b033d81f9f316fd75459702742cf541f1204d 100644
--- a/htdocs/cashdesk/class/Facturation.class.php
+++ b/htdocs/cashdesk/class/Facturation.class.php
@@ -144,7 +144,7 @@ class Facturation
         $newcartarray[$i]['price']=$product->price;
         $newcartarray[$i]['price_ttc']=$product->price_ttc;
 
-        if ($conf->global->PRODUIT_MULTIPRICES)
+        if (! empty($conf->global->PRODUIT_MULTIPRICES))
         {
             if (isset($product->multiprices[$societe->price_level]))
             {
diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php
index 3d1f28768bfb33beb37f0a0f6d26c0df414e9501..89a358808e4aa2062e0587f610b83b09eeedd1cb 100644
--- a/htdocs/cashdesk/facturation.php
+++ b/htdocs/cashdesk/facturation.php
@@ -37,7 +37,7 @@ if ( $_GET['filtre'] ) {
 	$sql.= " AND p.tosell = 1";
 	if(!$conf->global->CASHDESK_SERVICES) $sql.= " AND p.fk_product_type = 0";
 	$sql.= " AND (p.ref LIKE '%".$_GET['filtre']."%' OR p.label LIKE '%".$_GET['filtre']."%' ";
-	if ($conf->barcode->enabled) $sql.= " OR p.barcode LIKE '%".$_GET['filtre']."%')";
+	if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '%".$_GET['filtre']."%')";
 	else $sql.= ")";
 
 	$sql.= " ORDER BY label";
diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php
index 86be5906cc405222969b0ff0a78e6348fdfc37b4..92ed6fc144b80ee8c82416b0ead8fc3254397a73 100644
--- a/htdocs/cashdesk/facturation_verif.php
+++ b/htdocs/cashdesk/facturation_verif.php
@@ -62,7 +62,7 @@ switch ( $_GET['action'] )
 					}
 
 					/** add Ditto for MultiPrix*/
-					if ($conf->global->PRODUIT_MULTIPRICES)
+					if (! empty($conf->global->PRODUIT_MULTIPRICES))
 					{
 						$thirdpartyid = $_SESSION['CASHDESK_ID_THIRDPARTY'];
 						$productid = $ret['rowid'];
diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php
index 4fe0a225e3f4464a9f71ceb67dd8e6a3b68bb11e..3dac2d0f57dcb82bde2531b2dba8ef0c809fa567 100644
--- a/htdocs/cashdesk/index.php
+++ b/htdocs/cashdesk/index.php
@@ -98,7 +98,7 @@ print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):$conf-
 print '</td>';
 print "</tr>\n";
 
-if ($conf->stock->enabled)
+if (! empty($conf->stock->enabled))
 {
 	$langs->load("stocks");
 	print "<tr>";
diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php
index fcd8eda6873bf8fe13cba78756515ebeb41ea3b4..bb1df0af089e17b6779cce097c9ac58a0410c95c 100644
--- a/htdocs/cashdesk/validation_verif.php
+++ b/htdocs/cashdesk/validation_verif.php
@@ -161,7 +161,7 @@ switch ($action)
 			$product->fetch($tab_liste[$i]['fk_article']);
 			$ret=array('label'=>$product->label,'tva_tx'=>$product->tva_tx,'price'=>$product->price);
 
-	        if ($conf->global->PRODUIT_MULTIPRICES)
+	        if (! empty($conf->global->PRODUIT_MULTIPRICES))
 	        {
 	            if (isset($product->multiprices[$societe->price_level]))
 	            {
diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php
index a50a3a5389670301c4cd112f66286cc41c2f1596..a69ded5360defd7d301c5f1883914d1a52213585 100644
--- a/htdocs/categories/categorie.php
+++ b/htdocs/categories/categorie.php
@@ -182,7 +182,7 @@ if ($socid)
 	require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 
 	$langs->load("companies");
-	if ($conf->notification->enabled) $langs->load("mails");
+	if (! empty($conf->notification->enabled)) $langs->load("mails");
 
 	$soc = new Societe($db);
 	$result = $soc->fetch($socid);
@@ -363,7 +363,7 @@ else if ($id || $ref)
 
         $rowspan=5;
         if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1;
-        if ($conf->societe->enabled) $rowspan++;
+        if (! empty($conf->societe->enabled)) $rowspan++;
 
 		print '<table class="border" width="100%">';
 
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index 34adae9b9d0b310866aa3cdec1d206be52501d11..abf85d69cdecb71d3a16af2cba429f912649ab47 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -147,7 +147,7 @@ class Categorie
 
 		dol_syslog(get_class($this).'::create sql='.$sql);
 		$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (label, description,";
-		if ($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
+		if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER))
 		{
 			$sql.= "fk_soc,";
 		}
@@ -157,7 +157,7 @@ class Categorie
 		//$sql.= ", fk_parent_id";
 		$sql.= ")";
 		$sql.= " VALUES ('".$this->db->escape($this->label)."', '".$this->db->escape($this->description)."',";
-		if ($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
+		if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER))
 		{
 			$sql.= ($this->socid != -1 ? $this->socid : 'null').",";
 		}
@@ -269,7 +269,7 @@ class Categorie
 		{
 			$sql .= ", description = '".$this->db->escape($this->description)."'";
 		}
-		if ($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
+		if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER))
 		{
 			$sql .= ", fk_soc = ".($this->socid != -1 ? $this->socid : 'null');
 		}
diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index bde511d28ff5b48c628f41d1dbeeee581d5eabc0..7fa1a71c5f37d3182ca002bc7c091cfb497ea34b 100755
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
-if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 
 $langs->load("companies");
 $langs->load("commercial");
@@ -222,7 +222,7 @@ if ($objectid > 0)
         print '</td></tr>';
 
         // Project
-        if ($conf->projet->enabled)
+        if (! empty($conf->projet->enabled))
         {
             print '<tr><td valign="top">'.$langs->trans("Project").'</td><td colspan="3">';
             if ($act->fk_project)
diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php
index 837a995c966ab16136b604c9a1a6db804ba11b57..6cdb7a7758065ab9dc3500d6475a3df1724af195 100644
--- a/htdocs/comm/action/fiche.php
+++ b/htdocs/comm/action/fiche.php
@@ -760,7 +760,7 @@ if ($id)
 		print '</td></tr>';
 
 		// Project
-		if ($conf->projet->enabled)
+		if (! empty($conf->projet->enabled))
 		{
 			// Projet associe
 			$langs->load("project");
@@ -927,7 +927,7 @@ if ($id)
 		print '</td></tr>';
 
 		// Project
-		if ($conf->projet->enabled)
+		if (! empty($conf->projet->enabled))
 		{
 			print '<tr><td valign="top">'.$langs->trans("Project").'</td><td colspan="3">';
 			if ($act->fk_project)
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index bf0f58e5843d4aade77170b5564ff5d3c7fe2270..abd61760e75d29d070c9d0b3d369f8cd6042148c 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
 require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
-if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
+if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
 
 if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3;
 
diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php
index 69adcb1bd9e9d2d925db92ba09ccedf17e69ee93..19272a22e3ddfc45482cd1b6d0d2450337ad232e 100644
--- a/htdocs/comm/addpropal.php
+++ b/htdocs/comm/addpropal.php
@@ -212,7 +212,7 @@ if ($action == 'create')
 	print "</td></tr>";
 
 	// Project
-	if ($conf->projet->enabled)
+	if (! empty($conf->projet->enabled))
 	{
 		$projectid = 0;
 		if ($origin == 'project') $projectid = ($originid?$originid:0);
@@ -294,7 +294,7 @@ if ($action == 'create')
 		}
 		print '</td></tr>';
 
-		if ($conf->global->PRODUCT_SHOW_WHEN_CREATE) print '<tr><td colspan="3">&nbsp;</td></tr>';
+		if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) print '<tr><td colspan="3">&nbsp;</td></tr>';
 
 		print '<tr><td valign="top"><input type="radio" name="createmode" value="empty" checked="checked"></td>';
 		print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyPropal").'</td></tr>';
diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php
index f5b3b5a611b1d44f693fc1aeda3a17e84cc51490..2b6e08bd406b9b08c6f54f3784de6878bf9ad6be 100644
--- a/htdocs/comm/fiche.php
+++ b/htdocs/comm/fiche.php
@@ -31,20 +31,20 @@ require '../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
-if ($conf->facture->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
-if ($conf->propal->enabled) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
-if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
-if ($conf->contrat->enabled) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
-if ($conf->adherent->enabled) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
-if ($conf->ficheinter->enabled) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
+if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
+if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
+if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
+if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
+if (! empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
 
 $langs->load("companies");
-if ($conf->contrat->enabled)  $langs->load("contracts");
-if ($conf->commande->enabled) $langs->load("orders");
-if ($conf->facture->enabled) $langs->load("bills");
-if ($conf->projet->enabled)  $langs->load("projects");
-if ($conf->ficheinter->enabled) $langs->load("interventions");
-if ($conf->notification->enabled) $langs->load("mails");
+if (! empty($conf->contrat->enabled))  $langs->load("contracts");
+if (! empty($conf->commande->enabled)) $langs->load("orders");
+if (! empty($conf->facture->enabled)) $langs->load("bills");
+if (! empty($conf->projet->enabled))  $langs->load("projects");
+if (! empty($conf->ficheinter->enabled)) $langs->load("interventions");
+if (! empty($conf->notification->enabled)) $langs->load("mails");
 
 // Security check
 $id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
@@ -345,7 +345,7 @@ if ($id > 0)
 	print '</tr>';
 
 	// Multiprice level
-	if ($conf->global->PRODUIT_MULTIPRICES)
+	if (! empty($conf->global->PRODUIT_MULTIPRICES))
 	{
 		print '<tr><td nowrap>';
 		print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
@@ -364,7 +364,7 @@ if ($id > 0)
 	include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
 
     // Module Adherent
-    if ($conf->adherent->enabled)
+    if (! empty($conf->adherent->enabled))
     {
         $langs->load("members");
         $langs->load("users");
@@ -750,13 +750,13 @@ if ($id > 0)
 	// Add invoice
 	if ($user->societe_id == 0)
 	{
-		if ($conf->deplacement->enabled)
+		if (! empty($conf->deplacement->enabled))
 		{
 			$langs->load("trips");
 			print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/fiche.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddTrip").'</a>';
 		}
 
-		if ($conf->facture->enabled)
+		if (! empty($conf->facture->enabled))
 		{
 			if ($user->rights->facture->creer)
 			{
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 7ba7a2412fb5f76ae4689cf72c6e36d870cbccbb..2bc4da5a11224168ba3952844b01cdd1544826fd 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
 require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
 require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
-if ($conf->contrat->enabled) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
-if ($conf->propal->enabled)  require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
+if (! empty($conf->propal->enabled))  require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
 
 if (! $user->rights->societe->lire) accessforbidden();
 
@@ -80,7 +80,7 @@ $now=dol_now();
 $form = new Form($db);
 $formfile = new FormFile($db);
 $companystatic=new Societe($db);
-if ($conf->propal->enabled) $propalstatic=new Propal($db);
+if (! empty($conf->propal->enabled)) $propalstatic=new Propal($db);
 
 llxHeader();
 
diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php
index f7da122ad492baa69ed62c064685764d2059c325..da457735f9a26a9e43e773e2455b3e1d228b7fcb 100755
--- a/htdocs/comm/list.php
+++ b/htdocs/comm/list.php
@@ -145,7 +145,7 @@ if ($result)
 
 	// Filter on categories
  	$moreforfilter='';
-	if ($conf->categorie->enabled)
+	if (! empty($conf->categorie->enabled))
 	{
 	 	$moreforfilter.=$langs->trans('Categories'). ': ';
 		$moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1);
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 84a6e6eb5ca3ce79de66f1ae0eb24ef490b6066e..10d126a62ddd15d2f221f4cb4e02d1df3aad57c5 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -1231,7 +1231,7 @@ else if ($action == 'validate')
 	}
 
 	$text=$langs->trans('ConfirmValidateProp',$numref);
-	if ($conf->notification->enabled)
+	if (! empty($conf->notification->enabled))
 	{
 		require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
 		$notify=new Notify($db);
diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php
index 5b4fc238342a44566d26fbf2d48849daf895c567..d09ea9802e322e8920df121f952ae19d4f1ab200 100644
--- a/htdocs/comm/propal/apercu.php
+++ b/htdocs/comm/propal/apercu.php
@@ -29,7 +29,7 @@ require '../../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
-if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 
 $langs->load('propal');
 $langs->load("bills");
diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php
index b341e8a9c11e71183c99c8a71b6b43cc0ad10799..fb6fa29902e09aeb91462c3e53fe4d9d4f66e0ef 100644
--- a/htdocs/comm/propal/index.php
+++ b/htdocs/comm/propal/index.php
@@ -151,7 +151,7 @@ else
 /*
  * Draft proposals
  */
-if ($conf->propal->enabled)
+if (! empty($conf->propal->enabled))
 {
 	$sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
 	$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
@@ -369,7 +369,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
  * Proposals to process
  */
 /*
-if ($conf->propal->enabled)
+if (! empty($conf->propal->enabled))
 {
 	$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid";
 	$sql.=" FROM ".MAIN_DB_PREFIX."propal as c";
@@ -441,7 +441,7 @@ if ($conf->propal->enabled)
 /*
  * Proposal that are in a shipping process
  */
-/*if ($conf->propal->enabled)
+/*if (! empty($conf->propal->enabled))
 {
 	$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
 	$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php
index 3a16307a7606d742a745008293f6922dff956259..0abde58fc8681cbbf69bac3c0d5a6562318415e2 100644
--- a/htdocs/comm/prospect/fiche.php
+++ b/htdocs/comm/prospect/fiche.php
@@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/comm/prospect/class/prospect.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
 require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
 require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
-if ($conf->adherent->enabled) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
-if ($conf->propal->enabled) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
+if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
 
 $langs->load('companies');
 $langs->load('projects');
@@ -152,7 +152,7 @@ if ($socid > 0)
 	print '</tr>';
 
 	// Multiprice level
-	if ($conf->global->PRODUIT_MULTIPRICES)
+	if (! empty($conf->global->PRODUIT_MULTIPRICES))
 	{
 		print '<tr><td nowrap>';
 		print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
@@ -181,7 +181,7 @@ if ($socid > 0)
 	include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
 
     // Module Adherent
-    if ($conf->adherent->enabled)
+    if (! empty($conf->adherent->enabled))
     {
         $langs->load("members");
         $langs->load("users");
diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php
index 3280c456e4f2bd672277286354f834a76f78ee6d..f72cae173d3fb07d04978250c3744fc310d5b6ae 100644
--- a/htdocs/comm/prospect/index.php
+++ b/htdocs/comm/prospect/index.php
@@ -50,7 +50,7 @@ print '<table border="0" width="100%" class="notopnoleftnoright">';
 
 print '<tr><td valign="top" width="30%" class="notopnoleft">';
 
-if ($conf->propal->enabled)
+if (! empty($conf->propal->enabled))
 {
 	$var=false;
 	print '<table class="noborder nohover" width="100%">';
@@ -164,7 +164,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
  */
 print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
 
-if ($conf->agenda->enabled) show_array_actions_to_do(10);
+if (! empty($conf->agenda->enabled)) show_array_actions_to_do(10);
 
 /*
  * Dernieres propales ouvertes
diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php
index d24ac0c2e4775f905315ad071f787a0b95d1dc9d..caac721333c036307008e8ab47ab5dc76f5162f1 100755
--- a/htdocs/comm/prospect/list.php
+++ b/htdocs/comm/prospect/list.php
@@ -261,7 +261,7 @@ if ($resql)
 
 	// Filter on categories
  	$moreforfilter='';
-	if ($conf->categorie->enabled)
+	if (! empty($conf->categorie->enabled))
 	{
 	 	$moreforfilter.=$langs->trans('Categories'). ': ';
 		$moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1);
diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php
index 3640cee627905bb4c4fdfca193684c1d0a83afca..02c6b2508e372b7c39eb969756165265c503d1df 100644
--- a/htdocs/comm/prospect/recap-prospect.php
+++ b/htdocs/comm/prospect/recap-prospect.php
@@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
 
 $langs->load("companies");
 $langs->load('other');
-if ($conf->facture->enabled) $langs->load("bills");
+if (! empty($conf->facture->enabled)) $langs->load("bills");
 
 // Security check
 $socid = $_GET["socid"];
diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php
index fe240ac2266f5fe2fcaf45d628583dcdd7373d4c..8b1d4c8aef116b8139c7e85358e9d303bdff952f 100644
--- a/htdocs/comm/recap-client.php
+++ b/htdocs/comm/recap-client.php
@@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
 
 $langs->load("companies");
-if ($conf->facture->enabled) $langs->load("bills");
+if (! empty($conf->facture->enabled)) $langs->load("bills");
 
 // Security check
 $socid = $_GET["socid"];
diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php
index 83822aa24078e3e1645e50a4ff6a9f0ebec30d1f..87d84d297d31e9801524ff78652bb7ef266abe51 100644
--- a/htdocs/commande/apercu.php
+++ b/htdocs/commande/apercu.php
@@ -29,8 +29,8 @@ require '../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
-if ($conf->propal->enabled) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
-if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 
 $langs->load('orders');
 $langs->load('propal');
diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php
index 0caf1c80d632b19f38ab92da5a04ca42460272c7..d190a550834755e3c55324d147f0bd52e31ee1f1 100644
--- a/htdocs/commande/contact.php
+++ b/htdocs/commande/contact.php
@@ -178,7 +178,7 @@ if ($id > 0 || ! empty($ref))
 		print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
 
 		// Delivery address
-		if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
+		if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT))
 		{
 			print '<tr><td>';
 			print '<table class="nobordernopadding" width="100%"><tr><td>';
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 2c665ec982c6066d069a1e0df12aab62429073aa..8d8a1354dd4ad03ef440a3d9a8e8871a2ac101ed 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1462,7 +1462,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
 
 		// Date de livraison
 		print "<tr><td>".$langs->trans("DeliveryDate").'</td><td colspan="2">';
-		if ($conf->global->DATE_LIVRAISON_WEEK_DELAY)
+		if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY))
 		{
 			$datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
 		}
@@ -1699,7 +1699,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
 				}
 
 				$text=$langs->trans('ConfirmValidateOrder',$numref);
-				if ($conf->notification->enabled)
+				if (! empty($conf->notification->enabled))
 				{
 					require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
 					$notify=new Notify($db);
@@ -1808,7 +1808,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
 			 *   Commande
 			*/
 			$nbrow=9;
-			if ($conf->projet->enabled) $nbrow++;
+			if (! empty($conf->projet->enabled)) $nbrow++;
 
 			//Local taxes
 			if ($mysoc->country_code=='ES')
@@ -2201,7 +2201,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
 
 					// Ship
 					$numshipping=0;
-					if ($conf->expedition->enabled)
+					if (! empty($conf->expedition->enabled))
 					{
 						$numshipping = $object->nb_expedition();
 
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 7b5e3391330d8756f6ebe5b131e7ae63f6ef3c25..af38165d48ab921c510a645f3f93a301bf6dad1c 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -165,7 +165,7 @@ else
 /*
  * Draft orders
  */
-if ($conf->commande->enabled)
+if (! empty($conf->commande->enabled))
 {
 	$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
 	$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
@@ -282,7 +282,7 @@ else dol_print_error($db);
 /*
  * Orders to process
  */
-if ($conf->commande->enabled)
+if (! empty($conf->commande->enabled))
 {
 	$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
 	$sql.=" FROM ".MAIN_DB_PREFIX."commande as c";
@@ -353,7 +353,7 @@ if ($conf->commande->enabled)
 /*
  * Orders thar are in a shipping process
  */
-if ($conf->commande->enabled)
+if (! empty($conf->commande->enabled))
 {
 	$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
 	$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php
index ec94022d853261a600c03dd7d42bb53de1f7b906..3cc4ded371b87af2600b3bb1899121bd82752e62 100755
--- a/htdocs/commande/orderstoinvoice.php
+++ b/htdocs/commande/orderstoinvoice.php
@@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
-if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
+if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
 
 $langs->load('orders');
 $langs->load('deliveries');
@@ -416,7 +416,7 @@ if ($action == 'create')
 	$html->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id');
 	print '</td></tr>';
 	// Project
-	if ($conf->projet->enabled)
+	if (! empty($conf->projet->enabled))
 	{
 		$langs->load('projects');
 		print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php
index 65abe9ccb5f3d9af5a292559a723a442c031cd6e..490b228f25aab23794efcfc746c2e001851d98aa 100644
--- a/htdocs/compta/bank/fiche.php
+++ b/htdocs/compta/bank/fiche.php
@@ -281,7 +281,7 @@ if ($action == 'create')
 	print '</td></tr>';
 
 	// Accountancy code
-    if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
+    if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
     {
         print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
         print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>';
@@ -563,7 +563,7 @@ else
         print '</td></tr>';
 
         // Accountancy code
-        if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
+        if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
         {
             print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
             print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 584afaa321f979331ac50b6cc3a278c1c63c37f9..18227bf825d50a6fd1a356829b8d60d92fdf3008 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -32,7 +32,7 @@ $langs->load("banks");
 $langs->load("compta");
 $langs->load("bills");
 $langs->load("categories");
-if ($conf->adherent->enabled) $langs->load("members");
+if (! empty($conf->adherent->enabled)) $langs->load("members");
 
 
 $id = (GETPOST('id','int') ? GETPOST('id','int') : GETPOST('account','int'));
diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php
index df453887ea15cda9881a97861400752507bf3117..754764fa32cf0af7d65c93a79871c45ad362ebca 100644
--- a/htdocs/compta/deplacement/fiche.php
+++ b/htdocs/compta/deplacement/fiche.php
@@ -27,7 +27,7 @@ require '../../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
-if ($conf->projet->enabled)
+if (! empty($conf->projet->enabled))
 {
     require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
     require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
@@ -489,7 +489,7 @@ else if ($id)
             print '</td></tr>';
 
             // Project
-            if ($conf->projet->enabled)
+            if (! empty($conf->projet->enabled))
             {
                 $langs->load('projects');
                 print '<tr>';
diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php
index fb6c8de4f5abbbd91c903272e165dae94531b201..e6ec1a422ae9e66e9b52471127d06964ac2e4755 100644
--- a/htdocs/compta/dons/fiche.php
+++ b/htdocs/compta/dons/fiche.php
@@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/dons/class/don.class.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
-if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
+if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
 
 $langs->load("companies");
 $langs->load("donations");
@@ -280,7 +280,7 @@ if ($action == 'create')
 	print '<input type="hidden" name="action" value="add">';
 
     $nbrows=11;
-    if ($conf->projet->enabled) $nbrows++;
+    if (! empty($conf->projet->enabled)) $nbrows++;
 
     // Date
 	print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
@@ -318,7 +318,7 @@ if ($action == 'create')
     $form->select_types_paiements('', 'modepaiement', 'CRDT', 0, 1);
     print "</td></tr>\n";
 
-	if ($conf->projet->enabled)
+	if (! empty($conf->projet->enabled))
     {
         // Si module projet actif
         print "<tr><td>".$langs->trans("Project")."</td><td>";
@@ -368,7 +368,7 @@ if (! empty($id) && $action == 'edit')
 	print '</tr>';
 
     $nbrows=12;
-    if ($conf->projet->enabled) $nbrows++;
+    if (! empty($conf->projet->enabled)) $nbrows++;
 
     // Date
 	print "<tr>".'<td width="25%" class="fieldrequired">'.$langs->trans("Date").'</td><td>';
@@ -458,7 +458,7 @@ if (! empty($id) && $action != 'edit')
 	$linkback = '<a href="'.DOL_URL_ROOT.'/compta/dons/liste.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
 
     $nbrows=12;
-    if ($conf->projet->enabled) $nbrows++;
+    if (! empty($conf->projet->enabled)) $nbrows++;
 
 	// Ref
 	print "<tr>".'<td>'.$langs->trans("Ref").'</td><td colspan="2">';
@@ -502,7 +502,7 @@ if (! empty($id) && $action != 'edit')
 	print "<tr>".'<td>'.$langs->trans("Status").'</td><td>'.$don->getLibStatut(4).'</td></tr>';
 
     // Project
-    if ($conf->projet->enabled)
+    if (! empty($conf->projet->enabled))
     {
         print "<tr>".'<td>'.$langs->trans("Project").'</td><td>'.$don->projet.'</td></tr>';
     }
diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/liste.php
index ced00f94c50d01ddaf3088df806b05f60b104e82..3a3a8d7a1805846fc24f81a3935067c160b13b77 100644
--- a/htdocs/compta/dons/liste.php
+++ b/htdocs/compta/dons/liste.php
@@ -53,7 +53,7 @@ if (!$user->rights->don->lire) accessforbidden();
  * View
  */
 
-if ($conf->projet->enabled) $projectstatic=new Project($db);
+if (! empty($conf->projet->enabled)) $projectstatic=new Project($db);
 
 llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:M&oacute;dulo_Donaciones');
 
@@ -160,7 +160,7 @@ if ($resql)
         print "<td>".$objp->societe."</td>\n";
 		print "<td>".$donationstatic->getFullName($langs)."</td>\n";
 		print '<td align="center">'.dol_print_date($db->jdate($objp->datedon),'day').'</td>';
-		if ($conf->projet->enabled)
+		if (! empty($conf->projet->enabled))
 		{
 			print "<td>";
 			if ($objp->pid)
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 4e928108813054926c7704e1c5dd68332e76c24c..dbb6b43703c72e253943cbe984477640cb7774c6 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1882,7 +1882,7 @@ if ($action == 'create')
     print '</td></tr>'."\n";
 
     // Proforma
-    if ($conf->global->FACTURE_USE_PROFORMAT)
+    if (! empty($conf->global->FACTURE_USE_PROFORMAT))
     {
         print '<tr height="18"><td width="16px" valign="middle">';
         print '<input type="radio" name="type" value="4"'.(GETPOST('type')==4?' checked="checked"':'').'>';
@@ -1973,7 +1973,7 @@ if ($action == 'create')
     print '</td></tr>';
 
     // Project
-    if ($conf->projet->enabled)
+    if (! empty($conf->projet->enabled))
     {
         $langs->load('projects');
         print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
@@ -2080,7 +2080,7 @@ if ($action == 'create')
             print '<td>'.$langs->trans('Qty').'</td>';
             print '<td>'.$langs->trans('ReductionShort').'</td>';
             print '<td> &nbsp; &nbsp; </td>';
-            if ($conf->service->enabled)
+            if (! empty($conf->service->enabled))
             {
                 print '<td>'.$langs->trans('ServiceLimitedDuration').'</td>';
             }
@@ -2090,7 +2090,7 @@ if ($action == 'create')
                 print '<tr>';
                 print '<td>';
                 // multiprix
-                if($conf->global->PRODUIT_MULTIPRICES)
+                if (! empty($conf->global->PRODUIT_MULTIPRICES))
                 $form->select_produits('','idprod'.$i,'',$conf->product->limit_size,$soc->price_level);
                 else
                 $form->select_produits('','idprod'.$i,'',$conf->product->limit_size);
@@ -2099,7 +2099,7 @@ if ($action == 'create')
                 print '<td nowrap="nowrap"><input type="text" size="1" name="remise_percent'.$i.'" value="'.$soc->remise_client.'">%</td>';
                 print '<td>&nbsp;</td>';
                 // Si le module service est actif, on propose des dates de debut et fin a la ligne
-                if ($conf->service->enabled)
+                if (! empty($conf->service->enabled))
                 {
                     print '<td nowrap="nowrap">';
                     print '<table class="nobordernopadding"><tr class="nocellnopadd">';
@@ -2243,7 +2243,7 @@ else if ($id > 0 || ! empty($ref))
             }
 
             $text=$langs->trans('ConfirmValidateBill',$numref);
-            if ($conf->notification->enabled)
+            if (! empty($conf->notification->enabled))
             {
                 require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
                 $notify=new Notify($db);
@@ -2624,8 +2624,8 @@ else if ($id > 0 || ! empty($ref))
          */
 
         $nbrows=8; $nbcols=2;
-        if ($conf->projet->enabled) $nbrows++;
-        if ($conf->banque->enabled) $nbcols++;
+        if (! empty($conf->projet->enabled)) $nbrows++;
+        if (! empty($conf->banque->enabled)) $nbcols++;
 
         //Local taxes
         if ($mysoc->pays_code=='ES')
@@ -2642,7 +2642,7 @@ else if ($id > 0 || ! empty($ref))
         print '<tr class="liste_titre">';
         print '<td>'.($object->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).'</td>';
         print '<td>'.$langs->trans('Type').'</td>';
-        if ($conf->banque->enabled) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
+        if (! empty($conf->banque->enabled)) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
         print '<td align="right">'.$langs->trans('Amount').'</td>';
         print '<td width="18">&nbsp;</td>';
         print '</tr>';
@@ -2679,7 +2679,7 @@ else if ($id > 0 || ! empty($ref))
                         print dol_print_date($db->jdate($objp->dp),'day').'</a></td>';
                         $label=($langs->trans("PaymentType".$objp->payment_code)!=("PaymentType".$objp->payment_code))?$langs->trans("PaymentType".$objp->payment_code):$objp->payment_label;
                         print '<td>'.$label.' '.$objp->num_paiement.'</td>';
-                        if ($conf->banque->enabled)
+                        if (! empty($conf->banque->enabled))
                         {
                             $bankaccountstatic->id=$objp->baid;
                             $bankaccountstatic->ref=$objp->ref;
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index bac78a55c78961ff7230f72efa4f2182da336c9a..1ad6c0480ba1f45eccb51b4cfe56976a772ef699 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -30,7 +30,7 @@ require '../../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
-if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 
 $langs->load("bills");
 
@@ -288,7 +288,7 @@ if ($id > 0 || ! empty($ref))
         print '</td>';
 
         $nbrows=5;
-        if ($conf->projet->enabled) $nbrows++;
+        if (! empty($conf->projet->enabled)) $nbrows++;
         print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">';
 
         /*
@@ -366,7 +366,7 @@ if ($id > 0 || ! empty($ref))
         print '<tr><td>'.$langs->trans('Status').'</td><td align="left" colspan="3">'.($object->getLibStatut(4,$totalpaye)).'</td></tr>';
 
         // Projet
-        if ($conf->projet->enabled)
+        if (! empty($conf->projet->enabled))
         {
             $langs->load("projects");
             print '<tr>';
diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php
index f81252e39e65cb61a0587017bca73e4fb7b866b9..7b60344fc06a099fa59fd20152b426876d352ead 100644
--- a/htdocs/compta/facture/impayees.php
+++ b/htdocs/compta/facture/impayees.php
@@ -88,7 +88,7 @@ if ($action == "builddoc" && $user->rights->facture->lire)
         }
         $pdf->SetFont(pdf_getPDFFont($outputlangs));
 
-        if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+        if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 		// Add all others
 		foreach($files as $file)
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index a0ffe2b90358c2d1c80248348e6f1dfe59eef843..3fea5bcd1c1d2009841020a1d917b96375b4cd6b 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -27,9 +27,9 @@ require '../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
 require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
-if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
-if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
-if ($conf->tax->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
+if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
+if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
+if (! empty($conf->tax->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
 
 // L'espace compta/treso doit toujours etre actif car c'est un espace partage
 // par de nombreux modules (banque, facture, commande a facturer, etc...) independamment
@@ -40,7 +40,7 @@ if ($conf->tax->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/
 
 $langs->load("compta");
 $langs->load("bills");
-if ($conf->commande->enabled) $langs->load("orders");
+if (! empty($conf->commande->enabled)) $langs->load("orders");
 
 // Security check
 $socid='';
@@ -349,7 +349,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
 
 		print '<table class="noborder" width="100%">';
 		print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BoxTitleLastCustomerBills",$max).'</td>';
-		if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
+		if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
 		print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
 		print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
 		print '<td width="16">&nbsp;</td>';
@@ -388,7 +388,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
 				$thirdpartystatic->client=1;
 				print $thirdpartystatic->getNomUrl(1,'customer',44);
 				print '</td>';
-				if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total).'</td>';
+				if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total).'</td>';
 				print '<td align="right">'.price($obj->total_ttc).'</td>';
 				print '<td align="right">'.dol_print_date($db->jdate($obj->tms),'day').'</td>';
 				print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'</td>';
@@ -404,7 +404,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
 		else
 		{
 			$colspan=5;
-			if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) $colspan++;
+			if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
 			print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
 		}
 		print '</table><br>';
@@ -446,7 +446,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
 
 		print '<table class="noborder" width="100%">';
 		print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BoxTitleLastSupplierBills",$max).'</td>';
-		if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
+		if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
 		print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
 		print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
 		print '<td width="16">&nbsp;</td>';
@@ -469,7 +469,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
 				$thirdpartystatic->fournisseur=1;
 				print $thirdpartystatic->getNomUrl(1,'supplier',44);
 				print '</td>';
-				if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total_ht).'</td>';
+				if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
 				print '<td align="right">'.price($obj->total_ttc).'</td>';
 				print '<td align="right">'.dol_print_date($db->jdate($obj->tms),'day').'</td>';
 				print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3).'</td>';
@@ -484,7 +484,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
 		else
 		{
 			$colspan=5;
-			if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) $colspan++;
+			if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
 			print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
 		}
 		print '</table><br>';
@@ -742,7 +742,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
 			print '<table class="noborder" width="100%">';
 			print "<tr class=\"liste_titre\">";
 			print '<td colspan="2">'.$langs->trans("OrdersToBill").' <a href="'.DOL_URL_ROOT.'/commande/liste.php?status=3&afacturer=1">('.$num.')</a></td>';
-			if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
+			if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
 			print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
 			print '<td align="right">'.$langs->trans("ToBill").'</td>';
 			print '<td align="center" width="16">&nbsp;</td>';
@@ -781,7 +781,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
                 $societestatic->client=1;
                 print $societestatic->getNomUrl(1,'customer',44);
 				print '</a></td>';
-				if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total_ht).'</td>';
+				if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
 				print '<td align="right">'.price($obj->total_ttc).'</td>';
 				print '<td align="right">'.price($obj->total_ttc-$obj->tot_fttc).'</td>';
 				print '<td>'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,3).'</td>';
@@ -795,7 +795,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
 			}
 
 			print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' &nbsp; <font style="font-weight: normal">('.$langs->trans("RemainderToBill").': '.price($tot_tobill).')</font> </td>';
-			if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($tot_ht).'</td>';
+			if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($tot_ht).'</td>';
 			print '<td align="right">'.price($tot_ttc).'</td>';
 			print '<td align="right">'.price($tot_tobill).'</td>';
 			print '<td>&nbsp;</td>';
@@ -840,7 +840,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
 
 		print '<table class="noborder" width="100%">';
 		print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsCustomersUnpaid",$num).' <a href="'.DOL_URL_ROOT.'/compta/facture/impayees.php">('.$num.')</a></td>';
-		if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
+		if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
 		print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
 		print '<td align="right">'.$langs->trans("Received").'</td>';
 		print '<td width="16">&nbsp;</td>';
@@ -880,7 +880,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
                 $societestatic->client=1;
 				print $societestatic->getNomUrl(1,'customer',44);
 				print '</a></td>';
-				if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total).'</td>';
+				if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total).'</td>';
 				print '<td align="right">'.price($obj->total_ttc).'</td>';
 				print '<td align="right">'.price($obj->am).'</td>';
 				print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'</td>';
@@ -894,7 +894,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
 			}
 
 			print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' &nbsp; <font style="font-weight: normal">('.$langs->trans("RemainderToTake").': '.price($total_ttc-$totalam).')</font> </td>';
-			if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($total).'</td>';
+			if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($total).'</td>';
 			print '<td align="right">'.price($total_ttc).'</td>';
 			print '<td align="right">'.price($totalam).'</td>';
 			print '<td>&nbsp;</td>';
@@ -903,7 +903,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
 		else
 		{
 			$colspan=5;
-			if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) $colspan++;
+			if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
 			print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
 		}
 		print '</table><br>';
@@ -944,7 +944,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
 
 		print '<table class="noborder" width="100%">';
 		print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsSuppliersUnpaid",$num).' <a href="'.DOL_URL_ROOT.'/fourn/facture/impayees.php">('.$num.')</a></td>';
-		if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
+		if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
 		print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
 		print '<td align="right">'.$langs->trans("Paid").'</td>';
 		print '<td width="16">&nbsp;</td>';
@@ -967,7 +967,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
                 $societestatic->nom=$obj->nom;
                 $societestatic->client=0;
 				print '<td>'.$societestatic->getNomUrl(1, 'supplier', 44).'</td>';
-				if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total_ht).'</td>';
+				if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
 				print '<td align="right">'.price($obj->total_ttc).'</td>';
 				print '<td align="right">'.price($obj->am).'</td>';
 				print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3).'</td>';
@@ -980,7 +980,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
 			}
 
 			print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' &nbsp; <font style="font-weight: normal">('.$langs->trans("RemainderToPay").': '.price($total_ttc-$totalam).')</font> </td>';
-			if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($total).'</td>';
+			if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($total).'</td>';
 			print '<td align="right">'.price($total_ttc).'</td>';
 			print '<td align="right">'.price($totalam).'</td>';
 			print '<td>&nbsp;</td>';
@@ -989,7 +989,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
 		else
 		{
 			$colspan=5;
-			if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) $colspan++;
+			if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
 			print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
 		}
 		print '</table><br>';
diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php
index 3ad10ec2d081a568ce618fd3f74982f57d00acec..8dded9ae73bcc8194004791f7e57cd54581c0431 100644
--- a/htdocs/compta/localtax/class/localtax.class.php
+++ b/htdocs/compta/localtax/class/localtax.class.php
@@ -496,7 +496,7 @@ class Localtax extends CommonObject
             if ($this->id > 0)
             {
                 $ok=1;
-				if ($conf->banque->enabled)
+				if (! empty($conf->banque->enabled))
                 {
                     // Insertion dans llx_bank
                     require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php
index e62dc08adc9c61426df69ad42ced15211fb8c1d2..ed0b7e1175200ef416017efd57e3e399e00019db 100644
--- a/htdocs/compta/localtax/clients.php
+++ b/htdocs/compta/localtax/clients.php
@@ -107,7 +107,7 @@ if ($modetax==1)	// Calculate on invoice for goods and services
     $nom=$langs->transcountry("LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
     $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
     $description=$langs->trans("RulesVATDue");
-    if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
+    if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
     $description.=$fsearch;
     $description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
 	$builddate=time();
@@ -124,7 +124,7 @@ if ($modetax==0) 	// Invoice for goods, payment for services
     $nom=$langs->transcountry("LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
     $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
     $description=$langs->trans("RulesVATIn");
-    if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
+    if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
     $description.=$fsearch;
     $description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
     $builddate=time();
diff --git a/htdocs/compta/localtax/fiche.php b/htdocs/compta/localtax/fiche.php
index cccee441ac5a158d04745c327d9e9b13cb5d4574..ce8ce775cf37e9aeb1ef2a193fd03827d112bda4 100644
--- a/htdocs/compta/localtax/fiche.php
+++ b/htdocs/compta/localtax/fiche.php
@@ -168,7 +168,7 @@ if ($_GET["action"] == 'create')
 	// Amount
 	print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.$_POST["amount"].'"></td></tr>';
 
-    if ($conf->banque->enabled)
+    if (! empty($conf->banque->enabled))
     {
 		print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
         $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1);  // Affiche liste des comptes courant
@@ -227,7 +227,7 @@ if ($id)
 
 	print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="3">'.price($vatpayment->amount).'</td></tr>';
 
-	if ($conf->banque->enabled)
+	if (! empty($conf->banque->enabled))
 	{
 		if ($vatpayment->fk_account > 0)
 		{
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index 974b266354c6a53fb2f4ec26a363a6391f1f186e..fbf44961722ef25fe1bb4b160144b56b95e9ff2e 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -97,7 +97,7 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
         $error++;
     }
 
-    if ($conf->banque->enabled)
+    if (! empty($conf->banque->enabled))
     {
         // Si module bank actif, un compte est obligatoire lors de la saisie
         // d'un paiement
@@ -385,7 +385,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
 
         // Bank account
         print '<tr>';
-        if ($conf->banque->enabled)
+        if (! empty($conf->banque->enabled))
         {
             if ($facture->type != 2) print '<td><span class="fieldrequired">'.$langs->trans('AccountToCredit').'</span></td>';
             if ($facture->type == 2) print '<td><span class="fieldrequired">'.$langs->trans('AccountToDebit').'</span></td>';
@@ -589,10 +589,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
         {
             //			print '<tr><td colspan="3" align="center">';
             print '<center><br><input type="checkbox" checked="checked" name="closepaidinvoices"> '.$langs->trans("ClosePaidInvoicesAutomatically");
-            /*if ($conf->prelevement->enabled)
+            /*if (! empty($conf->prelevement->enabled))
             {
                 $langs->load("withdrawals");
-                if ($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS) print '<br>'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed");
+                if (! empty($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS)) print '<br>'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed");
             }*/
             print '<br><input type="submit" class="button" value="'.$langs->trans('Save').'"><br><br></center>';
             //			print '</td></tr>';
diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php
index 74d891a7764f1853cc2299eb2dec989780062337..3d23f896c0e32f4246bbf677a2b83c1ad5d77748 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -192,7 +192,7 @@ class Paiement extends CommonObject
                                 // This payment might be this one or a previous one
                                 if ($paym['type']=='PRE')
                                 {
-                                    if ($conf->prelevement->enabled)
+                                    if (! empty($conf->prelevement->enabled))
                                     {
                                         // TODO Check if this payment has a withdraw request
                                         // if not, $mustwait++;      // This will disable automatic close on invoice to allow to process
@@ -377,7 +377,7 @@ class Paiement extends CommonObject
         $bank_line_id=0;
         $this->fk_account=$accountid;
 
-        if ($conf->banque->enabled)
+        if (! empty($conf->banque->enabled))
         {
             require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
 
diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php
index acd041cc5c3268c2742e618aa2e7278e31a54b71..96b13604708ce3f67b11330a9e3be413254c45e2 100644
--- a/htdocs/compta/paiement/fiche.php
+++ b/htdocs/compta/paiement/fiche.php
@@ -29,7 +29,7 @@ require '../../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
 require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php';
-if ($conf->banque->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
 
 $langs->load('bills');
 $langs->load('banks');
@@ -238,7 +238,7 @@ print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->fac
 print '</td></tr>';
 
 // Bank account
-if ($conf->banque->enabled)
+if (! empty($conf->banque->enabled))
 {
     if ($object->bank_account)
     {
@@ -355,7 +355,7 @@ print '</div>';
 
 print '<div class="tabsAction">';
 
-if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
+if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
 {
 	if ($user->societe_id == 0 && $object->statut == 0 && $_GET['action'] == '')
 	{
diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php
index 714d8a20d59379cf969d0ff7c9547edb127250bc..e1d460e00518aa03b21a00fd3f23f7fa6de73644 100644
--- a/htdocs/compta/paiement/liste.php
+++ b/htdocs/compta/paiement/liste.php
@@ -143,7 +143,7 @@ if ($resql)
     print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$paramlist,"",$sortfield,$sortorder);
     print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"p.amount","",$paramlist,'align="right"',$sortfield,$sortorder);
     //print_liste_field_titre($langs->trans("Invoices"),"","","",$paramlist,'align="left"',$sortfield,$sortorder);
-    if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
+    if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
     {
         print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$paramlist,'align="right"',$sortfield,$sortorder);
     }
@@ -168,7 +168,7 @@ if ($resql)
     print '<input class="fat" type="text" size="4" name="search_amount" value="'.$_REQUEST["search_amount"].'">';
     print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
     print '</td>';
-    if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
+    if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
     {
         print '<td align="right">';
         print '</td>';
@@ -213,7 +213,7 @@ if ($resql)
         print '</td>';
         print '<td align="right">'.price($objp->amount).'</td>';
 
-        if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
+        if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
         {
             print '<td align="right">';
             if ($objp->statut == 0) print '<a href="fiche.php?id='.$objp->rowid.'&amp;action=valide">';
diff --git a/htdocs/compta/payment_sc/fiche.php b/htdocs/compta/payment_sc/fiche.php
index de865468d604f8178a5f44e413c35940e3f1c953..222c78a7f1db5e94c26ddd8f19868e6c87be42c6 100644
--- a/htdocs/compta/payment_sc/fiche.php
+++ b/htdocs/compta/payment_sc/fiche.php
@@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'
 require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
-if ($conf->banque->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
 
 $langs->load('bills');
 $langs->load('banks');
@@ -189,7 +189,7 @@ print '<tr><td valign="top">'.$langs->trans('Amount').'</td><td colspan="3">'.pr
 print '<tr><td valign="top">'.$langs->trans('Note').'</td><td colspan="3">'.nl2br($paiement->note).'</td></tr>';
 
 // Bank account
-if ($conf->banque->enabled)
+if (! empty($conf->banque->enabled))
 {
     if ($paiement->bank_account)
     {
@@ -293,7 +293,7 @@ print '</div>';
 print '<div class="tabsAction">';
 
 /*
-if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
+if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
 {
 	if ($user->societe_id == 0 && $paiement->statut == 0 && $_GET['action'] == '')
 	{
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 0081af46ecf1904cb53bce78cad9c68202634913..11c575f701d65c0d566a05d3c8af94e7f853cf9c 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -1185,7 +1185,7 @@ class BonPrelevement extends CommonObject
         if ($mysoc->country_code=='ES')
         {
             // TODO replace by a hook (external modules)
-        	if ($conf->esaeb->enabled)
+        	if (! empty($conf->esaeb->enabled))
             {
                 //Head
                 $esaeb19 = new AEB19DocWritter;
diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php
index c458f55813d44428ba03bae19a3145c964bda65d..8a2e3228e3726e53687c28f53c17c59d5ac1c055 100644
--- a/htdocs/compta/recap-compta.php
+++ b/htdocs/compta/recap-compta.php
@@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
 
 $langs->load("companies");
-if ($conf->facture->enabled) $langs->load("bills");
+if (! empty($conf->facture->enabled)) $langs->load("bills");
 
 // Security check
 $socid = $_GET["socid"];
diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
index 7bff88b37a4c505a8333909d17c7a36d3e69ebd1..cfbf7a91568bcdb8ba9134ae0f7ae15cfc2d606c 100644
--- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
+++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
@@ -472,7 +472,7 @@ class PaymentSocialContribution extends CommonObject
 
         $error=0;
 
-        if ($conf->banque->enabled)
+        if (! empty($conf->banque->enabled))
         {
             require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
 
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index 23d01de6631e3267a26e6e655dff439beff3869e..d7d14938a6fc963901879c6b437011da14802a6a 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -525,7 +525,7 @@ class Tva extends CommonObject
             if ($this->id > 0)
             {
                 $ok=1;
-				if ($conf->banque->enabled)
+				if (! empty($conf->banque->enabled))
                 {
                     // Insertion dans llx_bank
                     require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php
index 71dbdb6c9478d0ae5fa8d39e5558b281d181d3ce..68bfe41d9689328a1b9290e1c2cf67d297f38094 100644
--- a/htdocs/compta/tva/clients.php
+++ b/htdocs/compta/tva/clients.php
@@ -117,7 +117,7 @@ if ($modetax==1)	// Calculate on invoice for goods and services
     $description.='<br>';
     $description.=$langs->trans("RulesVATDueProducts");
     //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
-    //if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
+    //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
     if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='<br>'.$langs->trans("DepositsAreNotIncluded");
 	else  $description.='<br>'.$langs->trans("DepositsAreIncluded");
 	$description.=$fsearch;
@@ -147,7 +147,7 @@ if ($modetax==0) 	// Invoice for goods, payment for services
     if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.=' '.$langs->trans("DepositsAreNotIncluded");
 	else  $description.=' '.$langs->trans("DepositsAreIncluded");
     //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
-    //if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
+    //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
     $description.=$fsearch;
     $description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
     $builddate=time();
diff --git a/htdocs/compta/tva/fiche.php b/htdocs/compta/tva/fiche.php
index a5e1693c8f27682b0f5cba3ba1ebb65026326a8a..765b0d77fb899f21a0f128d54c51896f365cad1e 100644
--- a/htdocs/compta/tva/fiche.php
+++ b/htdocs/compta/tva/fiche.php
@@ -172,7 +172,7 @@ if ($_GET["action"] == 'create')
 	// Amount
 	print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.$_POST["amount"].'"></td></tr>';
 
-    if ($conf->banque->enabled)
+    if (! empty($conf->banque->enabled))
     {
 		print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
         $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1);  // Affiche liste des comptes courant
@@ -236,7 +236,7 @@ if ($id)
 
 	print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="3">'.price($vatpayment->amount).'</td></tr>';
 
-	if ($conf->banque->enabled)
+	if (! empty($conf->banque->enabled))
 	{
 		if ($vatpayment->fk_account > 0)
 		{
diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php
index 1bcd7cabb47b0e3de027e6de4e987f3490729c1b..e323117091d95ec834969b05e0a5009c2d553194 100644
--- a/htdocs/compta/tva/quadri_detail.php
+++ b/htdocs/compta/tva/quadri_detail.php
@@ -137,7 +137,7 @@ if ($modetax==1)	// Calculate on invoice for goods and services
     $description.='<br>';
     $description.=$langs->trans("RulesVATDueProducts");
     //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
-    //if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
+    //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
     if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='<br>'.$langs->trans("DepositsAreNotIncluded");
 	else  $description.='<br>'.$langs->trans("DepositsAreIncluded");
     $description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
@@ -174,7 +174,7 @@ if ($modetax==0) 	// Invoice for goods, payment for services
     if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.=' '.$langs->trans("DepositsAreNotIncluded");
 	else  $description.=' '.$langs->trans("DepositsAreIncluded");
     //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
-    //if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
+    //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
     $description.=$fsearch;
     $description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
 	$builddate=time();
diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php
index c839f7a24e18dc03f0e35300f3954314585ed923..bcfaa39be962e63132f40acdc742f56c97afa43e 100644
--- a/htdocs/contact/canvas/actions_contactcard_common.class.php
+++ b/htdocs/contact/canvas/actions_contactcard_common.class.php
@@ -310,7 +310,7 @@ abstract class ActionsContactCardCommon
         if ($action == 'view' || $action == 'edit' || $action == 'delete')
         {
         	// Emailing
-        	if ($conf->mailing->enabled)
+        	if (! empty($conf->mailing->enabled))
 			{
 				$langs->load("mails");
 				$this->tpl['nb_emailing'] = $this->object->getNbOfEMailings();
@@ -322,25 +322,25 @@ abstract class ActionsContactCardCommon
 
         	$this->object->load_ref_elements();
 
-        	if ($conf->commande->enabled)
+        	if (! empty($conf->commande->enabled))
         	{
         		$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForOrders");
         		$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_commande?$this->object->ref_commande:$langs->trans("NoContactForAnyOrder");
         		$i++;
         	}
-        	if ($conf->propal->enabled)
+        	if (! empty($conf->propal->enabled))
         	{
         		$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForProposals");
         		$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_propal?$this->object->ref_propal:$langs->trans("NoContactForAnyProposal");
         		$i++;
         	}
-        	if ($conf->contrat->enabled)
+        	if (! empty($conf->contrat->enabled))
         	{
         		$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForContracts");
         		$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_contrat?$this->object->ref_contrat:$langs->trans("NoContactForAnyContract");
         		$i++;
         	}
-        	if ($conf->facture->enabled)
+        	if (! empty($conf->facture->enabled))
         	{
         		$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForInvoices");
         		$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_facturation?$this->object->ref_facturation:$langs->trans("NoContactForAnyInvoice");
diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php
index 03a356a8a7286c5c1f0e8e6937acfb00e1ced0bb..07d2ee9e5c21626bb000a0e4842e5ce1a4e45890 100644
--- a/htdocs/contact/fiche.php
+++ b/htdocs/contact/fiche.php
@@ -658,28 +658,28 @@ else
 
             $object->load_ref_elements();
 
-            if ($conf->commande->enabled)
+            if (! empty($conf->commande->enabled))
             {
                 print '<tr><td>'.$langs->trans("ContactForOrders").'</td><td colspan="3">';
                 print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder");
                 print '</td></tr>';
             }
 
-            if ($conf->propal->enabled)
+            if (! empty($conf->propal->enabled))
             {
                 print '<tr><td>'.$langs->trans("ContactForProposals").'</td><td colspan="3">';
                 print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal");
                 print '</td></tr>';
             }
 
-            if ($conf->contrat->enabled)
+            if (! empty($conf->contrat->enabled))
             {
                 print '<tr><td>'.$langs->trans("ContactForContracts").'</td><td colspan="3">';
                 print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract");
                 print '</td></tr>';
             }
 
-            if ($conf->facture->enabled)
+            if (! empty($conf->facture->enabled))
             {
                 print '<tr><td>'.$langs->trans("ContactForInvoices").'</td><td colspan="3">';
                 print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice");
@@ -744,7 +744,7 @@ else
             //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External')))
             );
             $text=$langs->trans("ConfirmCreateContact").'<br>';
-            if ($conf->societe->enabled)
+            if (! empty($conf->societe->enabled))
             {
                 if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser");
                 else $text.=$langs->trans("UserWillBeInternalUser");
@@ -823,7 +823,7 @@ else
 
         // Email
         print '<tr><td>'.$langs->trans("EMail").'</td><td>'.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'</td>';
-        if ($conf->mailing->enabled)
+        if (! empty($conf->mailing->enabled))
         {
             $langs->load("mails");
             print '<td nowrap>'.$langs->trans("NbOfEMailingsReceived").'</td>';
@@ -857,28 +857,28 @@ else
 
         $object->load_ref_elements();
 
-        if ($conf->commande->enabled)
+        if (! empty($conf->commande->enabled))
         {
             print '<tr><td>'.$langs->trans("ContactForOrders").'</td><td colspan="3">';
             print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder");
             print '</td></tr>';
         }
 
-        if ($conf->propal->enabled)
+        if (! empty($conf->propal->enabled))
         {
             print '<tr><td>'.$langs->trans("ContactForProposals").'</td><td colspan="3">';
             print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal");
             print '</td></tr>';
         }
 
-        if ($conf->contrat->enabled)
+        if (! empty($conf->contrat->enabled))
         {
             print '<tr><td>'.$langs->trans("ContactForContracts").'</td><td colspan="3">';
             print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract");
             print '</td></tr>';
         }
 
-        if ($conf->facture->enabled)
+        if (! empty($conf->facture->enabled))
         {
             print '<tr><td>'.$langs->trans("ContactForInvoices").'</td><td colspan="3">';
             print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice");
diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php
index 4c9ba902cd018edaab469ec69aa2d5c55bef2dda..e49c8b3e5a33f66535f632673dc7afc83a282d28 100644
--- a/htdocs/contrat/fiche.php
+++ b/htdocs/contrat/fiche.php
@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
 if (! empty($conf->produit->enabled) || ! empty($conf->service->enabled))  require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
 if (! empty($conf->propal->enabled))  require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
-if ($conf->projet->enabled) {
+if (! empty($conf->projet->enabled)) {
 	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 	require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
 }
@@ -618,7 +618,7 @@ if ($action == 'create')
     $form->select_date($datecontrat,'',0,0,'',"contrat");
     print "</td></tr>";
 
-    if ($conf->projet->enabled)
+    if (! empty($conf->projet->enabled))
     {
         print '<tr><td>'.$langs->trans("Project").'</td><td>';
         select_projects($soc->id,GETPOST("projectid"),"projectid");
@@ -767,7 +767,7 @@ else
         print '<td colspan="3">'.dol_print_date($object->date_contrat,"dayhour")."</td></tr>\n";
 
         // Projet
-        if ($conf->projet->enabled)
+        if (! empty($conf->projet->enabled))
         {
             $langs->load("projects");
             print '<tr><td>';
@@ -1276,7 +1276,7 @@ else
             print "<tr ".$bc[$var].">";
             print '<td colspan="3">';
             // multiprix
-            if($conf->global->PRODUIT_MULTIPRICES)
+            if (! empty($conf->global->PRODUIT_MULTIPRICES))
             	$form->select_produits('','idprod',1,$conf->product->limit_size,$object->thirdparty->price_level);
             else
 				$form->select_produits('','idprod',1,$conf->product->limit_size);
diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php
index c9dfed825d6f021fab01747bab11fc7523e23ac4..eae960970a956de9c1f1ef5ac3a474ab517d725e 100644
--- a/htdocs/core/ajax/ziptown.php
+++ b/htdocs/core/ajax/ziptown.php
@@ -60,7 +60,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
 	$zipcode = $_GET['zipcode']?$_GET['zipcode']:'';
 	$town = $_GET['town']?$_GET['town']:'';
 
-	if ($conf->global->MAIN_USE_ZIPTOWN_DICTIONNARY)   // Use zip-town table
+	if (! empty($conf->global->MAIN_USE_ZIPTOWN_DICTIONNARY))   // Use zip-town table
 	{
     	$sql = "SELECT z.rowid, z.zip, z.town, z.fk_county, z.fk_pays as fk_country";
     	$sql.= ", p.rowid as fk_country, p.code as country_code, p.libelle as country";
diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php
index f0645659062a559c9fd6e129fb597ee3d662e885..627ffad350f7d2c52e5da211c7a96abd3a4607fb 100644
--- a/htdocs/core/boxes/box_produits.php
+++ b/htdocs/core/boxes/box_produits.php
@@ -93,7 +93,7 @@ class box_produits extends ModeleBoxes
 					$datem=$db->jdate($objp->tms);
 
 					// Multilangs
-					if ($conf->global->MAIN_MULTILANGS) // si l'option est active
+					if (! empty($conf->global->MAIN_MULTILANGS)) // si l'option est active
 					{
 						$sqld = "SELECT label";
 						$sqld.= " FROM ".MAIN_DB_PREFIX."product_lang";
diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php
index d4a701ca5ef5780ed9b4abbbdc0cdccc8fd5d067..ff082c23b2319f130411a2d1cb3b4fbfec5eccc1 100644
--- a/htdocs/core/boxes/box_services_contracts.php
+++ b/htdocs/core/boxes/box_services_contracts.php
@@ -105,7 +105,7 @@ class box_services_contracts extends ModeleBoxes
 					$datem=$db->jdate($objp->datem);
 
 					// Multilangs
-					if ($conf->global->MAIN_MULTILANGS) // si l'option est active
+					if (! empty($conf->global->MAIN_MULTILANGS)) // si l'option est active
 					{
 						$sqld = "SELECT label";
 						$sqld.= " FROM ".MAIN_DB_PREFIX."product_lang";
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index 2da3527aa6ff2555601c2083e5ce849ed898801e..ae7efcac3b9e518d1e07352a4e503bcbcf3d4cd2 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -1050,7 +1050,7 @@ class CMailFile
 				}
 				if ($format == 0 || $format == 3)
 				{
-					if ($conf->global->MAIN_MAIL_NO_FULL_EMAIL) $newemail='<'.$email.'>';
+					if (! empty($conf->global->MAIN_MAIL_NO_FULL_EMAIL)) $newemail='<'.$email.'>';
 					elseif (! $name) $newemail='<'.$email.'>';
 					else $newemail=($format==3?'"':'').($encode?$this->encodetorfc2822($name):$name).($format==3?'"':'').' <'.$email.'>';
 				}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index bf577e76229dbd51438e39f84e73c55ca73f61c4..29e58b35135dcd927ff0c12f604c3af781c9a3d5 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2959,9 +2959,9 @@ abstract class CommonObject
     print '<td width="20%" align="right">'.$langs->trans('SellingPrice').'</td>';
     print '<td width="20%" align="right">'.$langs->trans('BuyingPrice').'</td>';
     print '<td width="20%" align="right">'.$langs->trans('Margin').'</td>';
-    if($conf->global->DISPLAY_MARGIN_RATES)
+    if (! empty($conf->global->DISPLAY_MARGIN_RATES))
       print '<td align="right">'.$langs->trans('MarginRate').'</td>';
-    if($conf->global->DISPLAY_MARK_RATES)
+    if (! empty($conf->global->DISPLAY_MARK_RATES))
       print '<td align="right">'.$langs->trans('MarkRate').'</td>';
       print '</tr>';
     //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) {
@@ -2970,9 +2970,9 @@ abstract class CommonObject
       print '<td align="right">'.price($marginInfo['pv_products']).'</td>';
       print '<td align="right">'.price($marginInfo['pa_products']).'</td>';
       print '<td align="right">'.price($marginInfo['margin_on_products']).'</td>';
-      if($conf->global->DISPLAY_MARGIN_RATES)
+      if (! empty($conf->global->DISPLAY_MARGIN_RATES))
         print '<td align="right">'.(($marginInfo['margin_rate_products'] == '')?'n/a':price($marginInfo['margin_rate_products']).'%').'</td>';
-      if($conf->global->DISPLAY_MARK_RATES)
+      if (! empty($conf->global->DISPLAY_MARK_RATES))
         print '<td align="right">'.(($marginInfo['mark_rate_products'] == '')?'n/a':price($marginInfo['mark_rate_products']).'%').'</td>';
       print '</tr>';
       print '<tr class="pair">';
@@ -2980,9 +2980,9 @@ abstract class CommonObject
       print '<td align="right">'.price($marginInfo['pv_services']).'</td>';
       print '<td align="right">'.price($marginInfo['pa_services']).'</td>';
       print '<td align="right">'.price($marginInfo['margin_on_services']).'</td>';
-      if($conf->global->DISPLAY_MARGIN_RATES)
+      if (! empty($conf->global->DISPLAY_MARGIN_RATES))
         print '<td align="right">'.(($marginInfo['margin_rate_services'] == '')?'n/a':price($marginInfo['margin_rate_services']).'%').'</td>';
-      if($conf->global->DISPLAY_MARK_RATES)
+      if (! empty($conf->global->DISPLAY_MARK_RATES))
         print '<td align="right">'.(($marginInfo['mark_rate_services'] == '')?'n/a':price($marginInfo['mark_rate_services']).'%').'</td>';
       print '</tr>';
     //}
@@ -2991,9 +2991,9 @@ abstract class CommonObject
     print '<td align="right">'.price($marginInfo['pv_total']).'</td>';
     print '<td align="right">'.price($marginInfo['pa_total']).'</td>';
     print '<td align="right">'.price($marginInfo['total_margin']).'</td>';
-    if($conf->global->DISPLAY_MARGIN_RATES)
+    if (! empty($conf->global->DISPLAY_MARGIN_RATES))
       print '<td align="right">'.(($marginInfo['total_margin_rate'] == '')?'n/a':price($marginInfo['total_margin_rate']).'%').'</td>';
-    if($conf->global->DISPLAY_MARK_RATES)
+    if (! empty($conf->global->DISPLAY_MARK_RATES))
       print '<td align="right">'.(($marginInfo['total_mark_rate'] == '')?'n/a':price($marginInfo['total_mark_rate']).'%').'</td>';
     print '</tr>';
     print '</table>';
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index b7f3bb0e6b436bc5cd3035357bb4ff8f210bc288..07f51ebd72c1224756b6d00b2ef18c4641143462 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -65,7 +65,7 @@ class FormFile
     {
         global $conf,$langs;
 
-        if ($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)
+        if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD))
         {
             return $this->_formAjaxFileUpload($object);
         }
diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php
index 35da1b90beb4e51024857b7fb6ff6036cc038b1b..9e06d62ff74c723d1bb149af103ce5f14f895cb1 100644
--- a/htdocs/core/class/ldap.class.php
+++ b/htdocs/core/class/ldap.class.php
@@ -107,8 +107,8 @@ class Ldap
 		global $conf;
 
 		//Server
-		if ($conf->global->LDAP_SERVER_HOST)       $this->server[] = $conf->global->LDAP_SERVER_HOST;
-		if ($conf->global->LDAP_SERVER_HOST_SLAVE) $this->server[] = $conf->global->LDAP_SERVER_HOST_SLAVE;
+		if (! empty($conf->global->LDAP_SERVER_HOST))       $this->server[] = $conf->global->LDAP_SERVER_HOST;
+		if (! empty($conf->global->LDAP_SERVER_HOST_SLAVE)) $this->server[] = $conf->global->LDAP_SERVER_HOST_SLAVE;
 		$this->serverPort          = $conf->global->LDAP_SERVER_PORT;
 		$this->ldapProtocolVersion = $conf->global->LDAP_SERVER_PROTOCOLVERSION;
 		$this->dn                  = $conf->global->LDAP_SERVER_DN;
diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index 30989a272e7a4b0952741a657696e4761a7a0f1e..1e8003d22fb66836a54ffdfe7ab81b642a8146bc 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -97,7 +97,7 @@ function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirt
 				print '</td></tr>';
 			}
 
-			if ($conf->projet->enabled)
+			if (! empty($conf->projet->enabled))
 			{
 				print '<tr>';
 				print '<td nowrap="nowrap">';
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 00ff7db6ddd522605e04fef46029b9b794b50168..0e00f836eee7cea6c07a316ab4807c4947dad009 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -510,7 +510,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
 
     $contactstatic = new Contact($db);
 
-    if ($conf->clicktodial->enabled)
+    if (! empty($conf->clicktodial->enabled))
     {
         $user->fetch_clicktodial(); // lecture des infos de clicktodial
     }
@@ -729,7 +729,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
     $now=dol_now();
     $out='';
 
-    if ($conf->agenda->enabled)
+    if (! empty($conf->agenda->enabled))
     {
         require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
         $actionstatic=new ActionComm($db);
@@ -891,7 +891,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
     $numaction = 0 ;
     $now=dol_now();
 
-    if ($conf->agenda->enabled)
+    if (! empty($conf->agenda->enabled))
     {
         // Recherche histo sur actioncomm
         $sql = "SELECT a.id, a.label,";
diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php
index 07e7550994bacc96abc318e928771f613dfd76e8..8d3990942c144925f8781f397463022360727ff5 100644
--- a/htdocs/core/lib/invoice.lib.php
+++ b/htdocs/core/lib/invoice.lib.php
@@ -57,7 +57,7 @@ function facture_prepare_head($object)
 	}
 
 	//if ($fac->mode_reglement_code == 'PRE')
-	if ($conf->prelevement->enabled)
+	if (! empty($conf->prelevement->enabled))
 	{
 		$head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id;
 		$head[$h][1] = $langs->trans('StandingOrders');
diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php
index a5200a320d9693687bc6b5f4face62fee8861f50..981ae2f25efd5ec9dc966d8105b1f48f6f2bc16c 100644
--- a/htdocs/core/lib/ldap.lib.php
+++ b/htdocs/core/lib/ldap.lib.php
@@ -41,7 +41,7 @@ function ldap_prepare_head()
 	$head[$h][2] = 'ldap';
 	$h++;
 
-	if ($conf->global->LDAP_SYNCHRO_ACTIVE)
+	if (! empty($conf->global->LDAP_SYNCHRO_ACTIVE))
 	{
 		$head[$h][0] = DOL_URL_ROOT."/admin/ldap_users.php";
 		$head[$h][1] = $langs->trans("LDAPUsersSynchro");
@@ -49,7 +49,7 @@ function ldap_prepare_head()
 		$h++;
 	}
 
-	if ($conf->global->LDAP_SYNCHRO_ACTIVE)
+	if (! empty($conf->global->LDAP_SYNCHRO_ACTIVE))
 	{
 		$head[$h][0] = DOL_URL_ROOT."/admin/ldap_groups.php";
 		$head[$h][1] = $langs->trans("LDAPGroupsSynchro");
diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php
index 2bd4fd8779bf1bd538d1f45d284532e5bf2ac054..f344ef8681d1cb9e9f08b56ba6a605f018820e8f 100644
--- a/htdocs/core/lib/order.lib.php
+++ b/htdocs/core/lib/order.lib.php
@@ -34,7 +34,7 @@
 function commande_prepare_head($object)
 {
 	global $langs, $conf, $user;
-	if ($conf->expedition->enabled) $langs->load("sendings");
+	if (! empty($conf->expedition->enabled)) $langs->load("sendings");
 	$langs->load("orders");
 
 	$h = 0;
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 33e562c464fe68f101b6160b91e729fe7d4c83d9..7cbcdb4854d5d14baab447fae7bab15ee814b967 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -668,7 +668,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
 	{
 		$pdf->SetXY($dims['lm'],-$posy);
 		$width=20000; $align='L';	// By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
-		if ($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT) { $width=200; $align='C'; }
+		if (! empty($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT)) { $width=200; $align='C'; }
 		$pdf->MultiCell($width, 3, $line, 0, $align, 0);
 		$posy-=($nbofline*3);	// 6 of ligne + 3 of MultiCell
 	}
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index c78fb19af09ed72d9f32b2339a3d3caf0e1fa089..06e421db700832f3f843cddac4e8f6c77a25b253 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -72,7 +72,7 @@ function product_prepare_head($object, $user)
 	}
 
 	// Multilangs
-	if($conf->global->MAIN_MULTILANGS)
+	if (! empty($conf->global->MAIN_MULTILANGS))
 	{
 		$head[$h][0] = DOL_URL_ROOT."/product/traduction.php?id=".$object->id;
 		$head[$h][1] = $langs->trans("Translation");
@@ -81,7 +81,7 @@ function product_prepare_head($object, $user)
 	}
 
 	// Sub products
-	if($conf->global->PRODUIT_SOUSPRODUITS)
+	if (! empty($conf->global->PRODUIT_SOUSPRODUITS))
 	{
 		$head[$h][0] = DOL_URL_ROOT."/product/composition/fiche.php?id=".$object->id;
 		$head[$h][1] = $langs->trans('AssociatedProducts');
diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php
index 3d1b69279f67c8ce1683616f419bb8f053c9e44f..5f402fad68c121da12e2041a212ea0e9afdabcd2 100644
--- a/htdocs/core/lib/security2.lib.php
+++ b/htdocs/core/lib/security2.lib.php
@@ -432,7 +432,7 @@ function getRandomPassword($generic=false)
 
 	$generated_password='';
 	if ($generic) $generated_password=dol_hash(mt_rand());
-	else if ($conf->global->USER_PASSWORD_GENERATED)
+	else if (! empty($conf->global->USER_PASSWORD_GENERATED))
 	{
 		$nomclass="modGeneratePass".ucfirst($conf->global->USER_PASSWORD_GENERATED);
 		$nomfichier=$nomclass.".class.php";
diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php
index caf9d7ef43de6023ad23237a6a62a6d77f9ba9ab..7fb81297cb3ab4bd59a328b449eed88dc869b4db 100644
--- a/htdocs/core/lib/stock.lib.php
+++ b/htdocs/core/lib/stock.lib.php
@@ -52,7 +52,7 @@ function stock_prepare_head($object)
 	*/
 
 	/* Disabled because will never be implemented. Table always empty.
-	if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER)
+	if (! empty($conf->global->STOCK_USE_WAREHOUSE_BY_USER))
 	{
 		// Should not be enabled by defaut because does not work yet correctly because
 		// personnal stocks are not tagged into table llx_entrepot
diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php
index 7bd6e542a42cd6ad71db6c77322ea9d48e38f374..eab91d27d4be2cd8a4b2f330294f0bb6487de67c 100644
--- a/htdocs/core/lib/tax.lib.php
+++ b/htdocs/core/lib/tax.lib.php
@@ -106,7 +106,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
     if ($modetax == 1)
     {
         // If vat paid on due invoices (non draft)
-        if ($conf->global->MAIN_MODULE_ACCOUNTING)
+        if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
         {
             // TODO a ce jour on se sait pas la compter car le montant tva d'un payment
             // n'est pas stocke dans la table des payments.
@@ -115,7 +115,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
             // detail part tva et part ht).
             $sql = 'TODO';
         }
-        if ($conf->global->MAIN_MODULE_COMPTABILITE)
+        if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
         {
             $sql = "SELECT s.rowid as socid, s.nom as nom, s.siren as tva_intra, s.tva_assuj as assuj,";
             $sql.= " sum(fd.total_ht) as amount, sum(fd.".$total_tva.") as tva,";
@@ -145,7 +145,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
     }
     else
     {
-        if ($conf->global->MAIN_MODULE_ACCOUNTING)
+        if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
         {
             // If vat paid on payments
             // TODO a ce jour on se sait pas la compter car le montant tva d'un payment
@@ -155,7 +155,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
             // detail part tva et part ht).
             $sql = 'TODO';
         }
-        if ($conf->global->MAIN_MODULE_COMPTABILITE)
+        if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
         {
             // Tva sur factures payes (should be on payment)
 /*          $sql = "SELECT s.rowid as socid, s.nom as nom, s.tva_intra as tva_intra, s.tva_assuj as assuj,";
@@ -262,7 +262,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
     $sql='';
     if ($modetax == 1)  // Option vat on delivery for goods (payment) and debit invoice for services
     {
-        if ($conf->global->MAIN_MODULE_ACCOUNTING)
+        if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
         {
             // TODO a ce jour on se sait pas la compter car le montant tva d'un payment
             // n'est pas stocke dans la table des payments.
@@ -271,7 +271,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
             // detail part tva et part ht).
             $sql='TODO';
         }
-        if ($conf->global->MAIN_MODULE_COMPTABILITE)
+        if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
         {
             // Count on delivery date (use invoice date as delivery is unknown)
             $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
@@ -307,7 +307,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
     }
     else    // Option vat on delivery for goods (payments) and payments for services
     {
-        if ($conf->global->MAIN_MODULE_ACCOUNTING)
+        if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
         {
             // TODO a ce jour on se sait pas la compter car le montant tva d'un payment
             // n'est pas stocke dans la table des payments.
@@ -316,7 +316,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
             // detail part tva et part ht).
             $sql='TODO';
         }
-        if ($conf->global->MAIN_MODULE_COMPTABILITE)
+        if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
         {
             // Count on delivery date (use invoice date as delivery is unknown)
             $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
@@ -419,7 +419,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
     $sql='';
     if ($modetax == 1)  // Option vat on delivery for goods (payment) and debit invoice for services
     {
-        if ($conf->global->MAIN_MODULE_ACCOUNTING)
+        if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
         {
             // Count on invoice date
             // TODO a ce jour on se sait pas la compter car le montant tva d'un payment
@@ -429,7 +429,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
             // detail part tva et part ht).
             $sql='TODO';
         }
-        if ($conf->global->MAIN_MODULE_COMPTABILITE)
+        if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
         {
             // Count on invoice date
             $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
@@ -465,7 +465,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
     }
     else    // Option vat on delivery for goods (payments) and payments for services
     {
-        if ($conf->global->MAIN_MODULE_ACCOUNTING)
+        if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
         {
             // Count on payments date
             // TODO a ce jour on se sait pas la compter car le montant tva d'un payment
@@ -475,7 +475,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
             // detail part tva et part ht).
             $sql='TODO';
         }
-        if ($conf->global->MAIN_MODULE_COMPTABILITE)
+        if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
         {
             // Count on payments date
             $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 512c358b3c368394ba9d02f29394bb5c8deec0ea..ae95eafd3e6215ff8b7e3ca714b373dd29495be4 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -124,9 +124,9 @@ function print_eldy_menu($db,$atarget,$type_user)
 			$classname = 'class="tmenu"';
 		}
 		$chaine="";
-		if ($conf->product->enabled) { $chaine.=$langs->trans("Products"); }
+		if (! empty($conf->product->enabled)) { $chaine.=$langs->trans("Products"); }
 		if ($conf->product->enabled && $conf->service->enabled) { $chaine.="/"; }
-		if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); }
+		if (! empty($conf->service->enabled)) { $chaine.=$langs->trans("Services"); }
 
 		$idsel='products';
 		if ($user->rights->produit->lire || $user->rights->service->lire)
@@ -738,7 +738,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
         if ($mainmenu == 'companies')
         {
             // Societes
-            if ($conf->societe->enabled)
+            if (! empty($conf->societe->enabled))
             {
                 $langs->load("companies");
                 $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->rights->societe->lire, '', $mainmenu, 'thirdparties');
@@ -767,7 +767,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
             }
 
             // Clients
-            if ($conf->societe->enabled)
+            if (! empty($conf->societe->enabled))
             {
                 $langs->load("commercial");
                 $newmenu->add("/comm/list.php?leftmenu=customers", $langs->trans("ListCustomersShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'customers');
@@ -796,12 +796,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
             $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire);
             if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire);
             $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
-            if ($conf->fournisseur->enabled) $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
+            if (! empty($conf->fournisseur->enabled)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
             $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
             //$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->rights->societe->contact->lire);
 
             // Categories
-            if ($conf->categorie->enabled)
+            if (! empty($conf->categorie->enabled))
             {
                 $langs->load("categories");
                 // Categories prospects/customers
@@ -811,7 +811,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
                     $newmenu->add("/categories/fiche.php?action=create&amp;type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
                 }
                 // Categories suppliers
-                if ($conf->fournisseur->enabled)
+                if (! empty($conf->fournisseur->enabled))
                 {
                     $newmenu->add("/categories/index.php?leftmenu=cat&amp;type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
                     if (empty($user->societe_id))
@@ -1047,7 +1047,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
 
                 /*
                  if ($leftmenu=="ca") $newmenu->add("/compta/stats/cumul.php?leftmenu=ca","Cumule",2,$user->rights->compta->resultat->lire);
-                 if ($conf->propal->enabled) {
+                 if (! empty($conf->propal->enabled)) {
                  if ($leftmenu=="ca") $newmenu->add("/compta/stats/prev.php?leftmenu=ca","Previsionnel",2,$user->rights->compta->resultat->lire);
                  if ($leftmenu=="ca") $newmenu->add("/compta/stats/comp.php?leftmenu=ca","Transforme",2,$user->rights->compta->resultat->lire);
                  }
@@ -1129,11 +1129,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
                     $newmenu->add("/product/fiche.php?leftmenu=product&amp;action=create&amp;type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer);
                     $newmenu->add("/product/liste.php?leftmenu=product&amp;type=0", $langs->trans("List"), 1, $user->rights->produit->lire);
                 }
-                if ($conf->propal->enabled)
+                if (! empty($conf->propal->enabled))
                 {
                     $newmenu->add("/product/popuprop.php?leftmenu=stats&amp;type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire);
                 }
-                if ($conf->stock->enabled)
+                if (! empty($conf->stock->enabled))
                 {
                     $newmenu->add("/product/reassort.php?type=0", $langs->trans("Stocks"), 1, $user->rights->produit->lire && $user->rights->stock->lire);
                 }
@@ -1148,7 +1148,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
                     $newmenu->add("/product/fiche.php?leftmenu=service&amp;action=create&amp;type=1", $langs->trans("NewService"), 1, $user->rights->service->creer);
                 }
                 $newmenu->add("/product/liste.php?leftmenu=service&amp;type=1", $langs->trans("List"), 1, $user->rights->service->lire);
-                if ($conf->propal->enabled)
+                if (! empty($conf->propal->enabled))
                 {
                     $newmenu->add("/product/popuprop.php?leftmenu=stats&amp;type=1", $langs->trans("Statistics"), 1, $user->rights->service->lire && $user->rights->propale->lire);
                 }
diff --git a/htdocs/core/modules/cheque/pdf/modules_chequereceipts.php b/htdocs/core/modules/cheque/pdf/modules_chequereceipts.php
index f031ea2d4aa85ab65d137129a12c86b6b0d3a42a..66115ca5068c1fe44cf343f0c2578fc20a399bbf 100644
--- a/htdocs/core/modules/cheque/pdf/modules_chequereceipts.php
+++ b/htdocs/core/modules/cheque/pdf/modules_chequereceipts.php
@@ -83,7 +83,7 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
 	// Positionne modele sur le nom du modele a utiliser
 	if (! dol_strlen($modele))
 	{
-		if ($conf->global->FACTURE_ADDON_PDF)
+		if (! empty($conf->global->FACTURE_ADDON_PDF))
 		{
 			$modele = $conf->global->FACTURE_ADDON_PDF;
 		}
diff --git a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php
index c54a539f2973375898cd92b30c83d264eed9ad32..c56f20f87739f74ae7298adaf42296da9de88caa 100644
--- a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php
+++ b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php
@@ -135,7 +135,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
 		$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 		$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 		$pdf->SetKeyWords($outputlangs->transnoentities("CheckReceipt")." ".$number);
-		if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+		if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 		$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
index e46a7bfc2b667882f339003d7018b7cae766e516..90e1ab86aebfc3d94078d115b62570b7d8bcf0e4 100644
--- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
+++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
@@ -315,7 +315,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
                 if (! empty($usecontact))
                 {
                     // On peut utiliser le nom de la societe du contact
-                    if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socobject = $object->contact;
+                    if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
                     else $socobject = $object->client;
                 }
                 else
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index f6b29b52b0a901e74f8b0785a2dee1b4d100b431..5d693e675a84b54ad9f648043c13573aade85964 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -203,7 +203,7 @@ class pdf_einstein extends ModelePDFCommandes
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -531,7 +531,7 @@ if ($pageposafter > $pageposbefore) {
         if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ')
         {
         	// Si mode reglement non force ou si force a CHQ
-	        if ($conf->global->FACTURE_CHQ_NUMBER)
+	        if (! empty($conf->global->FACTURE_CHQ_NUMBER))
 	        {
 	            if ($conf->global->FACTURE_CHQ_NUMBER > 0)
 	            {
diff --git a/htdocs/core/modules/dons/modules_don.php b/htdocs/core/modules/dons/modules_don.php
index c86a75652a552cd441f03a38254e017488c154cf..922685bf6493d000e31e8edeea9bf5b1b490c318 100644
--- a/htdocs/core/modules/dons/modules_don.php
+++ b/htdocs/core/modules/dons/modules_don.php
@@ -167,7 +167,7 @@ function don_create($db, $id, $message, $modele, $outputlangs)
     // Set template to use
     if (! dol_strlen($modele))
     {
-        if ($conf->global->DON_ADDON_MODEL)
+        if (! empty($conf->global->DON_ADDON_MODEL))
         {
             $modele = $conf->global->DON_ADDON_MODEL;
         }
diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
index 906a1a74e379e80aac99622eb48de1513268f9a0..d569c7805127030621d7ce1c616079ffcb8fde52 100644
--- a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
@@ -169,7 +169,7 @@ class pdf_expedition_merou extends ModelePdfExpedition
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Sending"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -571,7 +571,7 @@ class pdf_expedition_merou extends ModelePdfExpedition
 		if (! empty($usecontact))
 		{
 			// On peut utiliser le nom de la societe du contact
-			if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
+			if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
 			else $socname = $object->client->nom;
 			$carac_client_name=$outputlangs->convToOutputCharset($socname);
 		}
diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
index f30b676cfc05ebadfd88b6cd660c9c90509edc31..ce7e5db6dfbdfef0afac6203346530caef6d20b2 100644
--- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
@@ -156,7 +156,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Sending"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -436,7 +436,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
 		}
 
 		// Show barcode
-		if ($conf->barcode->enabled)
+		if (! empty($conf->barcode->enabled))
 		{
 			$posx=105;
 		}
@@ -445,7 +445,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
 			$posx=$this->marge_gauche+3;
 		}
 		//$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30);
-		if ($conf->barcode->enabled)
+		if (! empty($conf->barcode->enabled))
 		{
 			// TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref
 			//$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3);
@@ -453,7 +453,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
 		}
 
 		$pdf->SetDrawColor(128,128,128);
-		if ($conf->barcode->enabled)
+		if (! empty($conf->barcode->enabled))
 		{
 			// TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref
 			//$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3);
@@ -579,7 +579,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
 			if (! empty($usecontact))
 			{
 				// On peut utiliser le nom de la societe du contact
-				if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
+				if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
 				else $socname = $object->client->nom;
 				$carac_client_name=$outputlangs->convToOutputCharset($socname);
 			}
diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
index d796fee8441c2537cd3f50536f512a024d43b0bf..78e28d24fec2ed31e08ba54cc91525faab8d8782 100644
--- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
+++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
@@ -326,7 +326,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
                 if (! empty($usecontact))
                 {
                     // On peut utiliser le nom de la societe du contact
-                    if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socobject = $object->contact;
+                    if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
                     else $socobject = $object->client;
                 }
                 else
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index 2804e78fb6a54ab879a22b5853c4f0a913e7c21a..b723206ef5c7f955fb9b5fa16654cc788a69cfee 100755
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -204,7 +204,7 @@ class pdf_crabe extends ModelePDFFactures
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Invoice"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -643,7 +643,7 @@ if ($pageposafter > $pageposbefore) {
 			if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ')
 			{
 				// Si mode reglement non force ou si force a CHQ
-				if ($conf->global->FACTURE_CHQ_NUMBER)
+				if (! empty($conf->global->FACTURE_CHQ_NUMBER))
 				{
 					if ($conf->global->FACTURE_CHQ_NUMBER > 0)
 					{
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 653ec0d4344a28cfac22633d5cec126871bf31ab..d12c18b8ee27ac8a3378669774115705f3694e75 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -161,7 +161,7 @@ class pdf_soleil extends ModelePDFFicheinter
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("InterventionCard"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -559,7 +559,7 @@ class pdf_soleil extends ModelePDFFicheinter
 			if (! empty($usecontact))
 			{
 				// On peut utiliser le nom de la societe du contact
-				if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
+				if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
 				else $socname = $object->client->nom;
 				$carac_client_name=$outputlangs->convToOutputCharset($socname);
 			}
diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php
index 0cda5ac63b7e096fa8363a7483a02fb5af9ac244..452e94f9ad01146e314e69760eabe20b8084bce2 100644
--- a/htdocs/core/modules/fichinter/modules_fichinter.php
+++ b/htdocs/core/modules/fichinter/modules_fichinter.php
@@ -166,7 +166,7 @@ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $
 	// Positionne modele sur le nom du modele de fichinter a utiliser
 	if (! dol_strlen($modele))
 	{
-		if ($conf->global->FICHEINTER_ADDON_PDF)
+		if (! empty($conf->global->FICHEINTER_ADDON_PDF))
 		{
 			$modele = $conf->global->FICHEINTER_ADDON_PDF;
 		}
diff --git a/htdocs/core/modules/livraison/modules_livraison.php b/htdocs/core/modules/livraison/modules_livraison.php
index 663c71987559e780c5efd29534b258abf6c130dc..3e6d48bd29d1c8d2abbd6b853d42b348afef8b72 100644
--- a/htdocs/core/modules/livraison/modules_livraison.php
+++ b/htdocs/core/modules/livraison/modules_livraison.php
@@ -167,7 +167,7 @@ function delivery_order_pdf_create($db, $object, $modele, $outputlangs='')
 	// Positionne modele sur le nom du modele de bon de livraison a utiliser
 	if (! dol_strlen($modele))
 	{
-		if ($conf->global->LIVRAISON_ADDON_PDF)
+		if (! empty($conf->global->LIVRAISON_ADDON_PDF))
 		{
 			$modele = $conf->global->LIVRAISON_ADDON_PDF;
 		}
diff --git a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php
index 78a16adf15f22bc2b07f2de53ebf17f937eb9eeb..6b9aa3a027928f2b6001ed94fc5600820aa75d50 100644
--- a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php
+++ b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php
@@ -158,7 +158,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -351,7 +351,7 @@ if ($pageposafter > $pageposbefore) {
 
 		$pdf->SetXY($this->marge_gauche,$posy);
 
-		if ($conf->global->MAIN_INFO_SOCIETE_NOM)
+		if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM))
 		{
 			$pdf->SetTextColor(0,0,200);
 			$pdf->SetFont('','B', $default_font_size + 2);
@@ -383,7 +383,7 @@ if ($pageposafter > $pageposbefore) {
 		if (! empty($usecontact))
 		{
 			// On peut utiliser le nom de la societe du contact
-			if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
+			if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
 			else $socname = $object->client->nom;
 			$carac_client_name=$outputlangs->convToOutputCharset($socname);
 		}
diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
index eebe473fd1e5d741f07f3c6dfc2e7ff3d872c210..51f5bf88b695a889057d11c81f0f73bd27b8cd61 100644
--- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
+++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
@@ -181,7 +181,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -642,7 +642,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
 			if (! empty($usecontact))
 			{
 				// On peut utiliser le nom de la societe du contact
-				if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
+				if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
 				else $socname = $object->client->nom;
 				$carac_client_name=$outputlangs->convToOutputCharset($socname);
 			}
diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php
index e80973afd67aa671f55d0e870e6b435de5565f4e..cf01009e6c2dea59c52d57b67d9c1c7e2efcb770 100644
--- a/htdocs/core/modules/member/doc/pdf_standard.class.php
+++ b/htdocs/core/modules/member/doc/pdf_standard.class.php
@@ -461,7 +461,7 @@ class pdf_standard
 		$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 		$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 		$pdf->SetKeyWords($outputlangs->transnoentities('MembersCards')." ".$outputlangs->transnoentities("Foundation")." ".$outputlangs->convToOutputCharset($mysoc->name));
-		if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+		if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 		$pdf->SetMargins(0,0);
 		$pdf->SetAutoPageBreak(false);
diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
index 575d0172402cfff5341d0ea6a820db8b267fbe25..2b6ab211153d17fa4fdccbef93835611708cf304 100644
--- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
+++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
@@ -447,7 +447,7 @@ class pdf_standardlabel
         $pdf->SetCreator("Dolibarr ".DOL_VERSION);
         $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
         $pdf->SetKeyWords($outputlangs->transnoentities('MembersLabels')." ".$outputlangs->transnoentities("Foundation")." ".$outputlangs->convToOutputCharset($mysoc->name));
-        if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+        if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
         $pdf->SetMargins(0,0);
         $pdf->SetAutoPageBreak(false);
diff --git a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
index 72d5c19b697f7258dae1f51b74c03dea9a96bf96..dea29ca8bdb23b428937566ec1d50b474cbe02d3 100644
--- a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
+++ b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
@@ -154,7 +154,7 @@ class pdf_baleine extends ModelePDFProjects
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Project"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
index 86ff65a677a9fd68bee5fcc99d1730dfca42b2c0..5f15d9b86dc513a4fdcf75e27d6033332eb9a4ce 100644
--- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
+++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
@@ -314,7 +314,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
                 if (! empty($usecontact))
                 {
                     // On peut utiliser le nom de la societe du contact
-                    if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socobject = $object->contact;
+                    if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
                     else $socobject = $object->client;
                 }
                 else
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index 6213ed5fd3a4f08f688000512da288bc2021a430..f35957f44e515dd7d9a09020d002a4de46fb9b38 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -203,7 +203,7 @@ class pdf_azur extends ModelePDFPropales
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("CommercialProposal"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -563,7 +563,7 @@ class pdf_azur extends ModelePDFPropales
 			if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ')
 			{
 				// Si mode reglement non force ou si force a CHQ
-				if ($conf->global->FACTURE_CHQ_NUMBER)
+				if (! empty($conf->global->FACTURE_CHQ_NUMBER))
 				{
 					if ($conf->global->FACTURE_CHQ_NUMBER > 0)
 					{
diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php
index b238ee3cfe63ce9b1f0fd34ba8a72ce325419bc9..d18c14b6b6dde73dc2cde95ad5be56a5d056b93f 100644
--- a/htdocs/core/modules/rapport/pdf_paiement.class.php
+++ b/htdocs/core/modules/rapport/pdf_paiement.class.php
@@ -180,7 +180,7 @@ class pdf_paiement
 		$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 		$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 		//$pdf->SetKeyWords();
-		if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+		if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 		$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 		$pdf->SetAutoPageBreak(1,0);
diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php
index fc96075f430d0c77c4aff25a0c5d32bb70ad616c..63b470a28a15af297641fe05c124ea646fb66671 100644
--- a/htdocs/core/modules/societe/modules_societe.class.php
+++ b/htdocs/core/modules/societe/modules_societe.class.php
@@ -381,7 +381,7 @@ function thirdparty_doc_create($db, $object, $message, $modele, $outputlangs)
     // Positionne modele sur le nom du modele a utiliser
     if (! dol_strlen($modele))
     {
-        if ($conf->global->COMPANY_ADDON_PDF)
+        if (! empty($conf->global->COMPANY_ADDON_PDF))
         {
             $modele = $conf->global->COMPANY_ADDON_PDF;
         }
diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
index 652082cc57a1584a16909d2463c468e6fca40721..76a7d0f7fe94a9d282c400d73cd1cf1b239c6c78 100755
--- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
@@ -202,7 +202,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -913,7 +913,7 @@ if ($pageposafter > $pageposbefore) {
 			if (! empty($usecontact))
 			{
 				// On peut utiliser le nom de la societe du contact
-				if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
+				if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
 				else $socname = $mysoc->nom;
 				$carac_client_name=$outputlangs->convToOutputCharset($socname);
 			}
diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
index 9e8e5bdd064c2d9eccb611d1dd118df954bd8356..3067a82ae4572d4e8d9a6afeaca7df7f0880ab6f 100644
--- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
@@ -214,7 +214,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
 				$pdf->SetCreator("Dolibarr ".DOL_VERSION);
 				$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
 				$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order"));
-				if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
+				if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
 
 				$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);   // Left, Top, Right
 
@@ -540,7 +540,7 @@ if ($pageposafter > $pageposbefore) {
         if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ')
         {
             // Si mode reglement non force ou si force a CHQ
-            if ($conf->global->FACTURE_CHQ_NUMBER)
+            if (! empty($conf->global->FACTURE_CHQ_NUMBER))
             {
                 if ($conf->global->FACTURE_CHQ_NUMBER > 0)
                 {
@@ -1016,7 +1016,7 @@ if ($pageposafter > $pageposbefore) {
 			if (! empty($usecontact))
 			{
 				// On peut utiliser le nom de la societe du contact
-				if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
+				if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
 				else $socname = $object->client->name;
 				$carac_client_name=$outputlangs->convToOutputCharset($socname);
 			}
diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php
index 013d6adb8c3c2f20823501a0d3c0d6b628de43b5..6dd54d977a880dc44d0498f79cea409dc35c6755 100644
--- a/htdocs/core/tpl/freeproductline_create.tpl.php
+++ b/htdocs/core/tpl/freeproductline_create.tpl.php
@@ -39,9 +39,9 @@ if (! empty($conf->margin->enabled)) {
 ?>
 	<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
 <?php
-  if($conf->global->DISPLAY_MARGIN_RATES)
+  if (! empty($conf->global->DISPLAY_MARGIN_RATES))
     $colspan++;
-  if($conf->global->DISPLAY_MARK_RATES)
+  if (! empty($conf->global->DISPLAY_MARK_RATES))
     $colspan++;
 }
 ?>
@@ -89,9 +89,9 @@ if (! empty($conf->margin->enabled)) {
 ?>
 	<td align="right"><input type="text" size="5" name="buying_price" value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>"></td>
 <?php
-  if($conf->global->DISPLAY_MARGIN_RATES)
+  if (! empty($conf->global->DISPLAY_MARGIN_RATES))
     $colspan++;
-  if($conf->global->DISPLAY_MARK_RATES)
+  if (! empty($conf->global->DISPLAY_MARK_RATES))
     $colspan++;
 }
 ?>
@@ -105,9 +105,9 @@ if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
 else
 	$colspan = 9;
 if (! empty($conf->margin->enabled)) {
-  if($conf->global->DISPLAY_MARGIN_RATES)
+  if (! empty($conf->global->DISPLAY_MARGIN_RATES))
     $colspan++;
-  if($conf->global->DISPLAY_MARK_RATES)
+  if (! empty($conf->global->DISPLAY_MARK_RATES))
     $colspan++;
 }
 ?>
diff --git a/htdocs/core/tpl/objectline_add.tpl.php b/htdocs/core/tpl/objectline_add.tpl.php
index 4fa3a8274df7c42a15b8e46f693869c76f6ff08e..b9ec775b592681c39d6a451305ed45fc966db989 100644
--- a/htdocs/core/tpl/objectline_add.tpl.php
+++ b/htdocs/core/tpl/objectline_add.tpl.php
@@ -168,9 +168,9 @@ if (! empty($conf->margin->enabled)) {
 		<input type="text" size="5" id="buying_price" name="buying_price" value="<?php echo (GETPOST('buying_price')?GETPOST('buying_price'):''); ?>">
 	</td>
 <?php
-  if($conf->global->DISPLAY_MARGIN_RATES)
+  if (! empty($conf->global->DISPLAY_MARGIN_RATES))
   	$colspan++;
-  if($conf->global->DISPLAY_MARK_RATES)
+  if (! empty($conf->global->DISPLAY_MARK_RATES))
   	$colspan++;
 }
 ?>
@@ -184,9 +184,9 @@ if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
 else
 	$colspan = 11;
 if (! empty($conf->margin->enabled)) {
-	if ($conf->global->DISPLAY_MARGIN_RATES)
+	if (! empty($conf->global->DISPLAY_MARGIN_RATES))
 		$colspan++;
-	if($conf->global->DISPLAY_MARK_RATES)
+	if (! empty($conf->global->DISPLAY_MARK_RATES))
 		$colspan++;
 }
 ?>
diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index 3b0251ea91dc19a7754b6dd20176aa592a00e2ba..cc90227dcba2d7d93c9eacfd717ef9118740a6cd 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -115,11 +115,11 @@
   if (! empty($conf->margin->enabled)) {
   ?>
   	<td align="right" nowrap="nowrap"><?php echo price($line->pa_ht); ?></td>
-  	<?php if($conf->global->DISPLAY_MARGIN_RATES) {?>
+  	<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?>
   	  <td align="right" nowrap="nowrap"><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx).'%'); ?></td>
   	<?php
     }
-    if($conf->global->DISPLAY_MARK_RATES) {?>
+    if (! empty($conf->global->DISPLAY_MARK_RATES)) {?>
   	  <td align="right" nowrap="nowrap"><?php echo price($line->marque_tx).'%'; ?></td>
   <?php } } ?>
 
diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php
index f0c11c07f87fcf216e586e5fe6b4b7d143cd601a..5eafe1d4b27b6543d0fff1893ffa50d4c47fc8f9 100644
--- a/htdocs/core/tpl/predefinedproductline_create.tpl.php
+++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php
@@ -32,7 +32,7 @@
 	<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>>
 	<?php
 	echo $langs->trans("AddNewLine").' - ';
-	if ($conf->service->enabled)
+	if (! empty($conf->service->enabled))
 	echo $langs->trans('RecordedProductsAndServices');
 	else
 	echo $langs->trans('RecordedProducts');
@@ -46,9 +46,9 @@ if (! empty($conf->margin->enabled)) {
 ?>
 	<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
 <?php
-  if($conf->global->DISPLAY_MARGIN_RATES)
+  if (! empty($conf->global->DISPLAY_MARGIN_RATES))
     $colspan++;
-  if($conf->global->DISPLAY_MARK_RATES)
+  if (! empty($conf->global->DISPLAY_MARK_RATES))
     $colspan++;
 }
 ?>
@@ -100,9 +100,9 @@ if (! empty($conf->margin->enabled)) {
   <input type="text" size="5" id="buying_price" name="buying_price" value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
   </td>
 <?php
-  if($conf->global->DISPLAY_MARGIN_RATES)
+  if (! empty($conf->global->DISPLAY_MARGIN_RATES))
     $colspan++;
-  if($conf->global->DISPLAY_MARK_RATES)
+  if (! empty($conf->global->DISPLAY_MARK_RATES))
     $colspan++;
 }
 ?>
@@ -115,9 +115,9 @@ if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
 else
 	$colspan = 9;
 if (! empty($conf->margin->enabled)) {
-	if($conf->global->DISPLAY_MARGIN_RATES)
+	if (! empty($conf->global->DISPLAY_MARGIN_RATES))
 		$colspan++;
-	if($conf->global->DISPLAY_MARK_RATES)
+	if (! empty($conf->global->DISPLAY_MARK_RATES))
 		$colspan++;
 }
 ?>
diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php
index 2f674860440fa215d0509468e505a967ce005312..b9e18d3533e03656ce8a74840255cdf71be205bd 100755
--- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php
+++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php
@@ -457,7 +457,7 @@ class InterfaceLdapsynchro
         	if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE)
         	{
 				// If status field is setup to be synchronized
-				if ($conf->global->LDAP_FIELD_MEMBER_STATUS)
+				if (! empty($conf->global->LDAP_FIELD_MEMBER_STATUS))
 				{
 					$ldap=new Ldap();
 	        		$ldap->connect_bind();
@@ -564,7 +564,7 @@ class InterfaceLdapsynchro
         	if ($conf->ldap->enabled && $conf->global->LDAP_MEMBER_ACTIVE)
         	{
 				// If status field is setup to be synchronized
-				if ($conf->global->LDAP_FIELD_MEMBER_STATUS)
+				if (! empty($conf->global->LDAP_FIELD_MEMBER_STATUS))
 				{
 					$ldap=new Ldap();
 	        		$ldap->connect_bind();
diff --git a/htdocs/document.php b/htdocs/document.php
index 22240663b19c47b7c5dce7d4d1d910b1e5624a7b..030efe333dcb476f581d681a4cb5c62ba0d7bb7d 100644
--- a/htdocs/document.php
+++ b/htdocs/document.php
@@ -271,8 +271,8 @@ if ($modulepart)
 		{
 			$accessallowed=1;
 		}
-		if ($conf->product->enabled) $original_file=$conf->product->multidir_output[$entity].'/'.$original_file;
-		elseif ($conf->service->enabled) $original_file=$conf->service->multidir_output[$entity].'/'.$original_file;
+		if (! empty($conf->product->enabled)) $original_file=$conf->product->multidir_output[$entity].'/'.$original_file;
+		elseif (! empty($conf->service->enabled)) $original_file=$conf->service->multidir_output[$entity].'/'.$original_file;
 	}
 
 	// Wrapping pour les contrats
diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php
index c15fc75023cb54a20d77d0c7877454639a49223a..42f1535dfde5671c1d0f3e40949fcb0ad2adff5b 100644
--- a/htdocs/ecm/index.php
+++ b/htdocs/ecm/index.php
@@ -381,14 +381,14 @@ llxHeader($moreheadcss.$moreheadjs,$langs->trans("ECMArea"),'','','','',$morejs,
 $rowspan=0;
 $sectionauto=array();
 if ($conf->product->enabled || $conf->service->enabled)     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>($conf->product->enabled || $conf->service->enabled), 'label'=>$langs->trans("ProductsAndServices"),     'desc'=>$langs->trans("ECMDocsByProducts")); }
-if ($conf->societe->enabled)     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
-if ($conf->propal->enabled)      { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal',  'test'=>$conf->propal->enabled,  'label'=>$langs->trans("Prop"),    'desc'=>$langs->trans("ECMDocsByProposals")); }
-if ($conf->contrat->enabled)     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"),    'desc'=>$langs->trans("ECMDocsByContracts")); }
-if ($conf->commande->enabled)    { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order',   'test'=>$conf->commande->enabled,'label'=>$langs->trans("CustomersOrders"),       'desc'=>$langs->trans("ECMDocsByOrders")); }
-if ($conf->facture->enabled)     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"),     'desc'=>$langs->trans("ECMDocsByInvoices")); }
-if ($conf->fournisseur->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order_supplier',   'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersOrders"),     'desc'=>$langs->trans("ECMDocsByOrders")); }
-if ($conf->fournisseur->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"),   'desc'=>$langs->trans("ECMDocsByInvoices")); }
-if ($conf->tax->enabled)         { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"),     'desc'=>$langs->trans("ECMDocsBySocialContributions")); }
+if (! empty($conf->societe->enabled))     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
+if (! empty($conf->propal->enabled))      { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal',  'test'=>$conf->propal->enabled,  'label'=>$langs->trans("Prop"),    'desc'=>$langs->trans("ECMDocsByProposals")); }
+if (! empty($conf->contrat->enabled))     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"),    'desc'=>$langs->trans("ECMDocsByContracts")); }
+if (! empty($conf->commande->enabled))    { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order',   'test'=>$conf->commande->enabled,'label'=>$langs->trans("CustomersOrders"),       'desc'=>$langs->trans("ECMDocsByOrders")); }
+if (! empty($conf->facture->enabled))     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"),     'desc'=>$langs->trans("ECMDocsByInvoices")); }
+if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order_supplier',   'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersOrders"),     'desc'=>$langs->trans("ECMDocsByOrders")); }
+if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"),   'desc'=>$langs->trans("ECMDocsByInvoices")); }
+if (! empty($conf->tax->enabled))         { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"),     'desc'=>$langs->trans("ECMDocsBySocialContributions")); }
 
 print_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"));
 
diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php
index 8870d50c639c6f66a1b0b9520a423d7afa66a65c..b3081991290cebbf7ca217d5a0a425a2ff0bc703 100644
--- a/htdocs/ecm/search.php
+++ b/htdocs/ecm/search.php
@@ -104,13 +104,13 @@ $userstatic = new User($db);
 $rowspan=0;
 $sectionauto=array();
 if ($conf->product->enabled || $conf->service->enabled)     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>$conf->product->enabled, 'label'=>$langs->trans("ProductsAndServices"),     'desc'=>$langs->trans("ECMDocsByProducts")); }
-if ($conf->societe->enabled)     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
-if ($conf->propal->enabled)      { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal',  'test'=>$conf->propal->enabled,  'label'=>$langs->trans("Prop"),    'desc'=>$langs->trans("ECMDocsByProposals")); }
-if ($conf->contrat->enabled)     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"),    'desc'=>$langs->trans("ECMDocsByContracts")); }
-if ($conf->commande->enabled)    { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order',   'test'=>$conf->commande->enabled,'label'=>$langs->trans("CustomersOrders"),       'desc'=>$langs->trans("ECMDocsByOrders")); }
-if ($conf->fournisseur->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"),     'desc'=>$langs->trans("ECMDocsByOrders")); }
-if ($conf->facture->enabled)     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"),     'desc'=>$langs->trans("ECMDocsByInvoices")); }
-if ($conf->fournisseur->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersOrders"),     'desc'=>$langs->trans("ECMDocsByOrders")); }
+if (! empty($conf->societe->enabled))     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
+if (! empty($conf->propal->enabled))      { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal',  'test'=>$conf->propal->enabled,  'label'=>$langs->trans("Prop"),    'desc'=>$langs->trans("ECMDocsByProposals")); }
+if (! empty($conf->contrat->enabled))     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"),    'desc'=>$langs->trans("ECMDocsByContracts")); }
+if (! empty($conf->commande->enabled))    { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order',   'test'=>$conf->commande->enabled,'label'=>$langs->trans("CustomersOrders"),       'desc'=>$langs->trans("ECMDocsByOrders")); }
+if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"),     'desc'=>$langs->trans("ECMDocsByOrders")); }
+if (! empty($conf->facture->enabled))     { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"),     'desc'=>$langs->trans("ECMDocsByInvoices")); }
+if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersOrders"),     'desc'=>$langs->trans("ECMDocsByOrders")); }
 
 
 //***********************
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index be5978f5a3303d6da3f341986ca4148308c5d859..06109252a2589b68a491aa82929a23469d527f04 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -26,8 +26,8 @@
  */
 
 require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
-if ($conf->propal->enabled) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
-if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
+if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
 
 
 /**
diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php
index a4977cf9861c0c433d75a20390ac3fb63d3f9d33..340e3d6dfd70f11a9644e214529d9eade627dfc5 100644
--- a/htdocs/expedition/contact.php
+++ b/htdocs/expedition/contact.php
@@ -213,7 +213,7 @@ if ($id > 0 || ! empty($ref))
 	print '</tr>';
 	
 	// Delivery address
-	if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
+	if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT))
 	{
 		print '<tr><td>';
 		print '<table class="nobordernopadding" width="100%"><tr><td>';
diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 08d397603ebbcd2fefddcbeff51c321e468ba002..0e09e08a2402a61fb31d1037e52333cf4ec18e09 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -33,9 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php';
 if ($conf->product->enabled || $conf->service->enabled)  require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
-if ($conf->propal->enabled)   require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
-if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
-if ($conf->stock->enabled)    require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
+if (! empty($conf->propal->enabled))   require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
+if (! empty($conf->stock->enabled))    require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
 
 $langs->load("sendings");
 $langs->load("companies");
@@ -581,7 +581,7 @@ if ($action == 'create')
             $author = new User($db);
             $author->fetch($object->user_author_id);
 
-            if ($conf->stock->enabled) $entrepot = new Entrepot($db);
+            if (! empty($conf->stock->enabled)) $entrepot = new Entrepot($db);
 
             /*
              *   Document source
@@ -694,7 +694,7 @@ if ($action == 'create')
                 print '<td align="center">'.$langs->trans("QtyOrdered").'</td>';
                 print '<td align="center">'.$langs->trans("QtyShipped").'</td>';
                 print '<td align="left">'.$langs->trans("QtyToShip").'</td>';
-                if ($conf->stock->enabled)
+                if (! empty($conf->stock->enabled))
                 {
                     print '<td align="left">'.$langs->trans("Warehouse").' / '.$langs->trans("Stock").'</td>';
                 }
@@ -741,7 +741,7 @@ if ($action == 'create')
                     print_date_range($db->jdate($line->date_start),$db->jdate($line->date_end));
 
                     // Add description in form
-                    if ($conf->global->PRODUIT_DESC_IN_FORM)
+                    if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
                     {
                         print ($line->desc && $line->desc!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->desc):'';
                     }
@@ -800,7 +800,7 @@ if ($action == 'create')
                 print '</td>';
 
                 // Stock
-                if ($conf->stock->enabled)
+                if (! empty($conf->stock->enabled))
                 {
                     print '<td align="left">';
                     if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
@@ -1166,7 +1166,7 @@ else
             print '<td align="center">'.$langs->trans("CalculatedVolume").'</td>';
             //print '<td align="center">'.$langs->trans("Size").'</td>';
 
-            if ($conf->stock->enabled)
+            if (! empty($conf->stock->enabled))
             {
                 print '<td align="left">'.$langs->trans("WarehouseSource").'</td>';
             }
@@ -1266,7 +1266,7 @@ else
                 //print '<td align="center">'.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").'</td>';
 
                 // Entrepot source
-                if ($conf->stock->enabled)
+                if (! empty($conf->stock->enabled))
                 {
                     print '<td align="left">';
                     if ($lines[$i]->entrepot_id > 0)
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 1e0fa24744bf55c6847d26985e7e5da5f0c646b7..cfe6d41abba3656fbff2800023995a95c87513c4 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -172,7 +172,7 @@ if ($id > 0 || ! empty($ref))
 
 		// Onglet commande
 		$nbrow=7;
-		if ($conf->projet->enabled) $nbrow++;
+		if (! empty($conf->projet->enabled)) $nbrow++;
 
 		print '<table class="border" width="100%">';
 
@@ -314,7 +314,7 @@ if ($id > 0 || ! empty($ref))
 		print '</td></tr>';
 
 		// Project
-		if ($conf->projet->enabled)
+		if (! empty($conf->projet->enabled))
 		{
 			$langs->load('projects');
 			print '<tr><td height="10">';
@@ -389,7 +389,7 @@ if ($id > 0 || ! empty($ref))
 			print '<td align="center">'.$langs->trans("QtyOrdered").'</td>';
 			print '<td align="center">'.$langs->trans("QtyShipped").'</td>';
 			print '<td align="center">'.$langs->trans("KeepToShip").'</td>';
-			if ($conf->stock->enabled)
+			if (! empty($conf->stock->enabled))
 			{
 				print '<td align="center">'.$langs->trans("Stock").'</td>';
 			}
@@ -455,7 +455,7 @@ if ($id > 0 || ! empty($ref))
 					print_date_range($db->jdate($objp->date_start),$db->jdate($objp->date_end));
 
 					// Add description in form
-					if ($conf->global->PRODUIT_DESC_IN_FORM)
+					if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
 					{
 						print ($objp->description && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
 					}
@@ -624,7 +624,7 @@ if ($id > 0 || ! empty($ref))
 
 				print '<tr>';
 
-				if ($conf->stock->enabled)
+				if (! empty($conf->stock->enabled))
 				{
 					print '<td>'.$langs->trans("WarehouseSource").'</td>';
 					print '<td>';
diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php
index 2501f4cd88f1fcbd4193de493e425fa01b5a5f48..1e0a61b429fad90cca45ce00140b5567f65f372b 100644
--- a/htdocs/fichinter/apercu.php
+++ b/htdocs/fichinter/apercu.php
@@ -28,7 +28,7 @@ require '../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
-if ($conf->projet->enabled)	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (! empty($conf->projet->enabled))	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 
 $langs->load('interventions');
 
diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php
index b8bed3409d71df060e1af23ffa93764e418c7e69..5de9d2203c65df07dced6d8a326940a1005fffc4 100644
--- a/htdocs/fichinter/fiche.php
+++ b/htdocs/fichinter/fiche.php
@@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
-if ($conf->projet->enabled)
+if (! empty($conf->projet->enabled))
 {
     require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
     require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
@@ -771,7 +771,7 @@ if ($action == 'create')
         print '</td></tr>';
 
         // Project
-        if ($conf->projet->enabled)
+        if (! empty($conf->projet->enabled))
         {
             $langs->load("project");
 
@@ -917,7 +917,7 @@ else if ($id > 0 || ! empty($ref))
     print '</tr>';
 
     // Project
-    if ($conf->projet->enabled)
+    if (! empty($conf->projet->enabled))
     {
         $langs->load('projects');
         print '<tr>';
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 18dd0fcd2168f5f9f3f09b6f5a92a47225bf4c63..8c21eb7db2825e47b8e86048480e52c5ddc214f2 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_order/modules_commandefou
 require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
-if ($conf->projet->enabled)	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (! empty($conf->projet->enabled))	require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 
 $langs->load('orders');
 $langs->load('sendings');
@@ -182,7 +182,7 @@ if ($id > 0 || ! empty($ref))
 
 
 		$disabled=1;
-		if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) $disabled=0;
+		if (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) $disabled=0;
 
 		/*
 		 * Lignes de commandes
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index ecf15a063840d3c1f787827de78bd52ac22568fa..e1480bd66360822632b416d1f2f677ea3ae757bc 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -997,7 +997,7 @@ if ($id > 0 || ! empty($ref))
             else $newref = $object->ref;
 
             $text=$langs->trans('ConfirmValidateOrder',$newref);
-            if ($conf->notification->enabled)
+            if (! empty($conf->notification->enabled))
             {
                 require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
                 $notify=new	Notify($db);
@@ -1069,7 +1069,7 @@ if ($id > 0 || ! empty($ref))
          *	Commande
          */
         $nbrow=8;
-        if ($conf->projet->enabled)	$nbrow++;
+        if (! empty($conf->projet->enabled))	$nbrow++;
 
         //Local taxes
         if ($mysoc->country_code=='ES')
@@ -1337,7 +1337,7 @@ if ($id > 0 || ! empty($ref))
                     print_date_range($date_start,$date_end);
 
                     // Add description in form
-                    if ($conf->global->PRODUIT_DESC_IN_FORM) print ($line->description && $line->description!=$product_static->libelle)?'<br>'.dol_htmlentitiesbr($line->description):'';
+                    if (! empty($conf->global->PRODUIT_DESC_IN_FORM)) print ($line->description && $line->description!=$product_static->libelle)?'<br>'.dol_htmlentitiesbr($line->description):'';
                 }
 
                 // Description - Editor wysiwyg
@@ -1509,7 +1509,7 @@ if ($id > 0 || ! empty($ref))
                 print '<tr class="liste_titre">';
                 print '<td colspan="3">';
                 print $langs->trans("AddNewLine").' - ';
-                if ($conf->service->enabled)
+                if (! empty($conf->service->enabled))
                 {
                     print $langs->trans('RecordedProductsAndServices');
                 }
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index 34e2cf027953a1cceecf2821e33312c428bee2a6..52509de0d458407ac6d254ba090efc9ae4af38db 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
 require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
-if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 
 
 $langs->load('bills');
@@ -1033,7 +1033,7 @@ if ($action == 'create')
     print '</td></tr>'."\n";
 
     // Proforma
-    if ($conf->global->FACTURE_USE_PROFORMAT)
+    if (! empty($conf->global->FACTURE_USE_PROFORMAT))
     {
     print '<tr height="18"><td width="16px" valign="middle">';
     print '<input type="radio" name="type" value="4"'.($_POST['type']==4?' checked="checked"':'').'>';
@@ -1351,8 +1351,8 @@ else
          * List of payments
          */
         $nbrows=7; $nbcols=2;
-        if ($conf->projet->enabled) $nbrows++;
-        if ($conf->banque->enabled) $nbcols++;
+        if (! empty($conf->projet->enabled)) $nbrows++;
+        if (! empty($conf->banque->enabled)) $nbcols++;
 
         // Local taxes
         if ($mysoc->country_code=='ES')
@@ -1384,7 +1384,7 @@ else
             print '<tr class="liste_titre">';
             print '<td>'.$langs->trans('Payments').'</td>';
             print '<td>'.$langs->trans('Type').'</td>';
-            if ($conf->banque->enabled) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
+            if (! empty($conf->banque->enabled)) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
             print '<td align="right">'.$langs->trans('Amount').'</td>';
             print '<td width="18">&nbsp;</td>';
             print '</tr>';
@@ -1399,7 +1399,7 @@ else
                     print '<tr '.$bc[$var].'>';
                     print '<td nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('ShowPayment'),'payment').' '.dol_print_date($db->jdate($objp->dp),'day')."</a></td>\n";
                     print '<td>'.$objp->paiement_type.' '.$objp->num_paiement.'</td>';
-                    if ($conf->banque->enabled)
+                    if (! empty($conf->banque->enabled))
                     {
                         $bankaccountstatic->id=$objp->baid;
                         $bankaccountstatic->ref=$objp->ref;
@@ -1485,7 +1485,7 @@ else
         print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right">'.price($object->total_ttc).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->currency).'</td></tr>';
 
         // Project
-        if ($conf->projet->enabled)
+        if (! empty($conf->projet->enabled))
         {
             $langs->load('projects');
             print '<tr>';
@@ -1668,7 +1668,7 @@ else
                     print_date_range($date_start,$date_end);
 
                     // Add description in form
-                    if ($conf->global->PRODUIT_DESC_IN_FORM) print ($object->lines[$i]->description && $object->lines[$i]->description!=$product_static->libelle)?'<br>'.dol_htmlentitiesbr($object->lines[$i]->description):'';
+                    if (! empty($conf->global->PRODUIT_DESC_IN_FORM)) print ($object->lines[$i]->description && $object->lines[$i]->description!=$product_static->libelle)?'<br>'.dol_htmlentitiesbr($object->lines[$i]->description):'';
                 }
 
                 // Description - Editor wysiwyg
@@ -1784,7 +1784,7 @@ else
                 print '<tr class="liste_titre">';
                 print '<td colspan="4">';
                 print $langs->trans("AddNewLine").' - ';
-                if ($conf->service->enabled)
+                if (! empty($conf->service->enabled))
                 {
                     print $langs->trans('RecordedProductsAndServices');
                 }
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index ea3a11927ab3244205a43505608f947ca5ff2c98..8e45d6458732088f7e2c3ff4e2af5e81b3997627 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -90,7 +90,7 @@ if ($action == 'add_paiement')
         $error++;
     }
 
-    if ($conf->banque->enabled)
+    if (! empty($conf->banque->enabled))
     {
         // Si module bank actif, un compte est obligatoire lors de la saisie
         // d'un paiement
@@ -239,7 +239,7 @@ if ($action == 'create' || $action == 'add_paiement')
             print '<td rowspan="3" valign="top">';
             print '<textarea name="comment" wrap="soft" cols="60" rows="'._ROWS_3.'">'.(empty($_POST['comment'])?'':$_POST['comment']).'</textarea></td></tr>';
             print '<tr><td>'.$langs->trans('Numero').'</td><td><input name="num_paiement" type="text" value="'.(empty($_POST['num_paiement'])?'':$_POST['num_paiement']).'"></td></tr>';
-            if ($conf->banque->enabled)
+            if (! empty($conf->banque->enabled))
             {
                 print '<tr><td class="fieldrequired">'.$langs->trans('Account').'</td><td>';
                 $form->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',2);
diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php
index 488f260237ac49ed506a77c39485c290ca24ca68..d085c478710dbd8b69805451ef49413f8a772c11 100644
--- a/htdocs/fourn/fiche.php
+++ b/htdocs/fourn/fiche.php
@@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
 require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
 require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
-if ($conf->adherent->enabled) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
+if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
 
 $langs->load('suppliers');
 $langs->load('products');
@@ -184,7 +184,7 @@ if ($object->fetch($id))
     print '</td></tr>';
 
     // Module Adherent
-    if ($conf->adherent->enabled)
+    if (! empty($conf->adherent->enabled))
     {
         $langs->load("members");
         $langs->load("users");
diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php
index b3935d7c6e60f1540d19cfdd2c7db9e358024a86..a6db039d2c92a87df86480f84b2e8831d11cdf09 100644
--- a/htdocs/fourn/index.php
+++ b/htdocs/fourn/index.php
@@ -99,7 +99,7 @@ else
 
 
 // Draft orders
-if ($conf->fournisseur->enabled)
+if (! empty($conf->fournisseur->enabled))
 {
 	$langs->load("orders");
 
diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php
index 956dbf82b7eb7ff18ce3d068cdc8c4b1ca70ef6e..5c99d0d0bc6919567ce4829695378b20f7d4a653 100644
--- a/htdocs/fourn/liste.php
+++ b/htdocs/fourn/liste.php
@@ -119,7 +119,7 @@ if ($resql)
 
 	// Filter on categories
 	$moreforfilter='';
-	if ($conf->categorie->enabled)
+	if (! empty($conf->categorie->enabled))
 	{
 		$moreforfilter.=$langs->trans('Categories'). ': ';
 		$moreforfilter.=$htmlother->select_categories(1,$search_categ,'search_categ',1);
diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php
index e8b601fe43c9553772b3eee6544d3bd26ce4a2c8..d5b40c491cbfb35a4626fb476d1cf84eeac3f1a4 100644
--- a/htdocs/fourn/paiement/fiche.php
+++ b/htdocs/fourn/paiement/fiche.php
@@ -197,7 +197,7 @@ if ($result > 0)
 	// Amount
 	print '<tr><td valign="top" colspan="2">'.$langs->trans('Amount').'</td><td colspan="3">'.price($object->montant).'&nbsp;'.$langs->trans('Currency'.$conf->currency).'</td></tr>';
 
-	if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
+	if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
 	{
 		print '<tr><td valign="top" colspan="2">'.$langs->trans('Status').'</td><td colspan="3">'.$object->getLibStatut(4).'</td></tr>';
 	}
@@ -208,7 +208,7 @@ if ($result > 0)
     print '</td></tr>';
 
     // Bank account
-	if ($conf->banque->enabled)
+	if (! empty($conf->banque->enabled))
 	{
 		if ($object->bank_account)
 		{
@@ -308,7 +308,7 @@ if ($result > 0)
 	 */
 
 	print '<div class="tabsAction">';
-	if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
+	if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
 	{
 		if ($user->societe_id == 0 && $object->statut == 0 && $action == '')
 		{
diff --git a/htdocs/fourn/product/categorie.php b/htdocs/fourn/product/categorie.php
index 653093695d34e1246db9c5db27de22aceeb269c8..2b230edf3c1b11305a293e9706f5f53808ecce9a 100644
--- a/htdocs/fourn/product/categorie.php
+++ b/htdocs/fourn/product/categorie.php
@@ -77,14 +77,14 @@ if ($_GET["id"])
       $h++;
 
 
-      if ($conf->stock->enabled)
+      if (! empty($conf->stock->enabled))
 	{
 	  $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
 	  $head[$h][1] = $langs->trans("Stock");
 	  $h++;
 	}
 
-      if ($conf->fournisseur->enabled)
+      if (! empty($conf->fournisseur->enabled))
 	{
 	  $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id;
 	  $head[$h][1] = $langs->trans("Suppliers");
@@ -100,7 +100,7 @@ if ($_GET["id"])
       $h++;
 
       //affichage onglet cat�gorie
-      if ($conf->categorie->enabled){
+      if (! empty($conf->categorie->enabled)){
 	$head[$h][0] = DOL_URL_ROOT."/fourn/product/categorie.php?id=".$product->id;
 	$head[$h][1] = $langs->trans('Categories');
 	$hselected = $h;
diff --git a/htdocs/fourn/product/index.php b/htdocs/fourn/product/index.php
index 05451b8b7518e128521bf322f9bd726dfe2dc70f..8a56d9e9fe3353fcee14f45fcefa4e1f56b34888 100644
--- a/htdocs/fourn/product/index.php
+++ b/htdocs/fourn/product/index.php
@@ -78,13 +78,13 @@ if ($resql)
 
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
-if ($conf->product->enabled)
+if (! empty($conf->product->enabled))
 {
     print "<tr $bc[0]>";
     print '<td><a href="liste.php?type=0">'.$langs->trans("Products").'</a></td><td>'.round($prodser[0]).'</td>';
     print "</tr>";
 }
-if ($conf->service->enabled)
+if (! empty($conf->service->enabled))
 {
     print "<tr $bc[1]>";
     print '<td><a href="liste.php?type=1">'.$langs->trans("Services").'</a></td><td>'.round($prodser[1]).'</td>';
diff --git a/htdocs/fourn/product/photos.php b/htdocs/fourn/product/photos.php
index 7dc2d69c44d3f1c234d263e997c623516d1dbfd7..acaf3227e3c2c6ab2a9e50ed9dcf6ace990f0b0e 100644
--- a/htdocs/fourn/product/photos.php
+++ b/htdocs/fourn/product/photos.php
@@ -70,7 +70,7 @@ if ($id)
 		$h++;
 
 
-		if ($conf->stock->enabled)
+		if (! empty($conf->stock->enabled))
 		{
 	  $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$object->id;
 	  $head[$h][1] = $langs->trans("Stock");
@@ -83,7 +83,7 @@ if ($id)
 		$h++;
 
 		//Affichage onglet Categories
-		if ($conf->categorie->enabled){
+		if (! empty($conf->categorie->enabled)){
 			$head[$h][0] = DOL_URL_ROOT."/fourn/product/categorie.php?id=".$object->id;
 			$head[$h][1] = $langs->trans('Categories');
 			$h++;
diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php
index e653f6f59d1edea6399f5b97b19b17c8818d086f..3a26cda4c67002b96620157eb82903c721e4bfc7 100644
--- a/htdocs/livraison/class/livraison.class.php
+++ b/htdocs/livraison/class/livraison.class.php
@@ -28,8 +28,8 @@
 require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
 require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
 require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
-if ($conf->propal->enabled)   require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
-if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
+if (! empty($conf->propal->enabled))   require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
 
 
 /**
@@ -334,7 +334,7 @@ class Livraison extends CommonObject
 
 		if ($user->rights->expedition->livraison->valider)
 		{
-			if ($conf->global->LIVRAISON_ADDON)
+			if (! empty($conf->global->LIVRAISON_ADDON))
 			{
 				// Definition du nom de module de numerotation de commande
 				$modName = $conf->global->LIVRAISON_ADDON;
diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php
index 5c36dbd04fd72749b822311b6bf63c39484f2fa9..d6e005ea5dd487fc437dba27804ef0154688b221 100644
--- a/htdocs/livraison/fiche.php
+++ b/htdocs/livraison/fiche.php
@@ -314,7 +314,7 @@ if ($action == 'create')
 			print '<td align="center">Quan. commandee</td>';
 			print '<td align="center">Quan. livree</td>';
 			print '<td align="center">Quan. a livrer</td>';
-			if ($conf->stock->enabled)
+			if (! empty($conf->stock->enabled))
 			{
 				print '<td width="12%" align="center">'.$langs->trans("Stock").'</td>';
 			}
@@ -386,7 +386,7 @@ if ($action == 'create')
 			$quantite_commandee = $line->qty;
 			$quantite_a_livrer = $quantite_commandee - $quantite_livree;
 
-			if ($conf->stock->enabled)
+			if (! empty($conf->stock->enabled))
 			{
 				$stock = $product->stock_warehouse[$_GET["entrepot_id"]]->real;
 				$stock+=0;  // Convertit en numerique
diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php
index af7821b5bd2ce28778251c60e8fdec14efa7e90e..f7965619ac394b7ccfb063c173c578d48afc15cb 100644
--- a/htdocs/paybox/admin/paybox.php
+++ b/htdocs/paybox/admin/paybox.php
@@ -194,23 +194,23 @@ print '<br><br>';
 print '<u>'.$langs->trans("FollowingUrlAreAvailableToMakePayments").':</u><br>';
 print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount",$servicename).':<br>';
 print '<b>'.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?amount=<i>9.99</i>&tag=<i>your_free_tag</i></b>'."<br>\n";
-if ($conf->commande->enabled)
+if (! empty($conf->commande->enabled))
 {
 	print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder",$servicename).':<br>';
 	print '<b>'.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=order&ref=<i>order_ref</i></b>'."<br>\n";
 }
-if ($conf->facture->enabled)
+if (! empty($conf->facture->enabled))
 {
 	print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice",$servicename).':<br>';
 	print '<b>'.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=invoice&ref=<i>invoice_ref</i></b>'."<br>\n";
 //	print $langs->trans("SetupPayBoxToHavePaymentCreatedAutomatically",$langs->transnoentitiesnoconv("FeatureNotYetAvailable"))."<br>\n";
 }
-if ($conf->contrat->enabled)
+if (! empty($conf->contrat->enabled))
 {
 	print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine",$servicename).':<br>';
 	print '<b>'.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=contractline&ref=<i>contractline_ref</i></b>'."<br>\n";
 }
-if ($conf->adherent->enabled)
+if (! empty($conf->adherent->enabled))
 {
 	print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription",$servicename).':<br>';
 	print '<b>'.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=membersubscription&ref=<i>member_ref</i></b>'."<br>\n";
diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php
index 925fda59120836923e284869c29c0602d89b0307..13247bc1637f724572578dce4b9986c9f2754a14 100755
--- a/htdocs/paybox/lib/paybox.lib.php
+++ b/htdocs/paybox/lib/paybox.lib.php
@@ -47,7 +47,7 @@ function llxHeaderPaybox($title, $head = "")
 	print '<meta name="description" content="Welcome on Dolibarr online payment form">'."\n";
 	print "<title>".$title."</title>\n";
 	if ($head) print $head."\n";
-	if ($conf->global->PAYBOX_CSS_URL) print '<link rel="stylesheet" type="text/css" href="'.$conf->global->PAYBOX_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n";
+	if (! empty($conf->global->PAYBOX_CSS_URL)) print '<link rel="stylesheet" type="text/css" href="'.$conf->global->PAYBOX_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n";
 	else
 	{
 		print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.$conf->css.'?lang='.$langs->defaultlang.'">'."\n";
@@ -91,11 +91,11 @@ function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG)
 
 	// Clean parameters
 	$PBX_IDENTIFIANT="2";	// Identifiant pour v2 test
-	if ($conf->global->PAYBOX_PBX_IDENTIFIANT) $PBX_IDENTIFIANT=$conf->global->PAYBOX_PBX_IDENTIFIANT;
+	if (! empty($conf->global->PAYBOX_PBX_IDENTIFIANT)) $PBX_IDENTIFIANT=$conf->global->PAYBOX_PBX_IDENTIFIANT;
 	$IBS_SITE="1999888";    // Site test
-	if ($conf->global->PAYBOX_IBS_SITE) $IBS_SITE=$conf->global->PAYBOX_IBS_SITE;
+	if (! empty($conf->global->PAYBOX_IBS_SITE)) $IBS_SITE=$conf->global->PAYBOX_IBS_SITE;
 	$IBS_RANG="99";         // Rang test
-	if ($conf->global->PAYBOX_IBS_RANG) $IBS_RANG=$conf->global->PAYBOX_IBS_RANG;
+	if (! empty($conf->global->PAYBOX_IBS_RANG)) $IBS_RANG=$conf->global->PAYBOX_IBS_RANG;
 	$IBS_DEVISE="840";		// Currency (Dollar US by default)
 	if ($CURRENCY == 'EUR') $IBS_DEVISE="978";
 	if ($CURRENCY == 'USD') $IBS_DEVISE="840";
diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php
index 5a2b28b722b0a222423e4656766fb7d3c16b8284..c94d49d4da0c659d7407d83858dbcb970296917d 100644
--- a/htdocs/paypal/admin/paypal.php
+++ b/htdocs/paypal/admin/paypal.php
@@ -283,7 +283,7 @@ $token='';
 print '<u>'.$langs->trans("FollowingUrlAreAvailableToMakePayments").':</u><br>';
 print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount",$servicename).':<br>';
 print '<strong>'.getPaypalPaymentUrl(1,'free')."</strong><br><br>\n";
-if ($conf->commande->enabled)
+if (! empty($conf->commande->enabled))
 {
 	print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder",$servicename).':<br>';
 	print '<strong>'.getPaypalPaymentUrl(1,'order')."</strong><br>\n";
@@ -305,7 +305,7 @@ if ($conf->commande->enabled)
 	}
 	print '<br>';
 }
-if ($conf->facture->enabled)
+if (! empty($conf->facture->enabled))
 {
 	print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice",$servicename).':<br>';
 	print '<strong>'.getPaypalPaymentUrl(1,'invoice')."</strong><br>\n";
@@ -327,7 +327,7 @@ if ($conf->facture->enabled)
 	}
 	print '<br>';
 }
-if ($conf->contrat->enabled)
+if (! empty($conf->contrat->enabled))
 {
 	print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine",$servicename).':<br>';
 	print '<strong>'.getPaypalPaymentUrl(1,'contractline')."</strong><br>\n";
@@ -349,7 +349,7 @@ if ($conf->contrat->enabled)
 	}
 	print '<br>';
 }
-if ($conf->adherent->enabled)
+if (! empty($conf->adherent->enabled))
 {
 	print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription",$servicename).':<br>';
 	print '<strong>'.getPaypalPaymentUrl(1,'membersubscription')."</strong><br>\n";
diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php
index dbaadbce9fb2340d3d62cdee6ec906c1b3b903a2..72843f6aeeb20b2ddc4e9bf766133539cf5686f0 100755
--- a/htdocs/paypal/lib/paypal.lib.php
+++ b/htdocs/paypal/lib/paypal.lib.php
@@ -46,7 +46,7 @@ function llxHeaderPaypal($title, $head = "")
 	print '<meta name="description" content="Welcome on Dolibarr online payment form">'."\n";
 	print "<title>".$title."</title>\n";
 	if ($head) print $head."\n";
-	if ($conf->global->PAYPAL_CSS_URL) print '<link rel="stylesheet" type="text/css" href="'.$conf->global->PAYPAL_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n";
+	if (! empty($conf->global->PAYPAL_CSS_URL)) print '<link rel="stylesheet" type="text/css" href="'.$conf->global->PAYPAL_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n";
 	else
 	{
 		print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.$conf->css.'?lang='.$langs->defaultlang.'">'."\n";
@@ -643,7 +643,7 @@ function hash_call($methodName,$nvpStr)
 
     // TODO problem with triggers
     $API_version="56";
-	if ($conf->global->PAYPAL_API_SANDBOX)
+	if (! empty($conf->global->PAYPAL_API_SANDBOX))
 	{
 	    $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp";
 	    $API_Url = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=";
@@ -656,13 +656,13 @@ function hash_call($methodName,$nvpStr)
 
 	// Clean parameters
 	$PAYPAL_API_USER="";
-	if ($conf->global->PAYPAL_API_USER) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER;
+	if (! empty($conf->global->PAYPAL_API_USER)) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER;
 	$PAYPAL_API_PASSWORD="";
-	if ($conf->global->PAYPAL_API_PASSWORD) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD;
+	if (! empty($conf->global->PAYPAL_API_PASSWORD)) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD;
 	$PAYPAL_API_SIGNATURE="";
-	if ($conf->global->PAYPAL_API_SIGNATURE) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE;
+	if (! empty($conf->global->PAYPAL_API_SIGNATURE)) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE;
 	$PAYPAL_API_SANDBOX="";
-	if ($conf->global->PAYPAL_API_SANDBOX) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX;
+	if (! empty($conf->global->PAYPAL_API_SANDBOX)) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX;
 	// TODO END problem with triggers
 
     dol_syslog("Paypal API endpoint ".$API_Endpoint);
diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php
index 07e0e2bbb3f24cad15cefd31f52a487ac6fa0bda..ad8aae0d05e05fd7ef22d948a4804e7ba9b84c88 100755
--- a/htdocs/paypal/lib/paypalfunctions.lib.php
+++ b/htdocs/paypal/lib/paypalfunctions.lib.php
@@ -48,7 +48,7 @@ $API_version="56";
  ' For the sandbox, the URL is       https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=
  ' For the live site, the URL is        https://www.paypal.com/webscr&cmd=_express-checkout&token=
  */
-if ($conf->global->PAYPAL_API_SANDBOX)
+if (! empty($conf->global->PAYPAL_API_SANDBOX))
 {
     $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp";
     $API_Url = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=";
@@ -61,13 +61,13 @@ else
 
 // Clean parameters
 $PAYPAL_API_USER="";
-if ($conf->global->PAYPAL_API_USER) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER;
+if (! empty($conf->global->PAYPAL_API_USER)) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER;
 $PAYPAL_API_PASSWORD="";
-if ($conf->global->PAYPAL_API_PASSWORD) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD;
+if (! empty($conf->global->PAYPAL_API_PASSWORD)) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD;
 $PAYPAL_API_SIGNATURE="";
-if ($conf->global->PAYPAL_API_SIGNATURE) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE;
+if (! empty($conf->global->PAYPAL_API_SIGNATURE)) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE;
 $PAYPAL_API_SANDBOX="";
-if ($conf->global->PAYPAL_API_SANDBOX) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX;
+if (! empty($conf->global->PAYPAL_API_SANDBOX)) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX;
 
 // Proxy
 $PROXY_HOST = $conf->global->MAIN_PROXY_HOST;
diff --git a/htdocs/product/canvas/product/tpl/card_create.tpl.php b/htdocs/product/canvas/product/tpl/card_create.tpl.php
index 65439ec797b2cb3a658dc849d1835d6239f46b5e..88738b97f513a7430e28765b993afaafcde31a16 100755
--- a/htdocs/product/canvas/product/tpl/card_create.tpl.php
+++ b/htdocs/product/canvas/product/tpl/card_create.tpl.php
@@ -57,7 +57,7 @@ $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSe
 <td><?php echo $form->selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td>
 </tr>
 
-<?php if ($conf->stock->enabled) { ?>
+<?php if (! empty($conf->stock->enabled)) { ?>
 <tr><td><?php echo $langs->trans("StockLimit"); ?></td><td>
 <input name="seuil_stock_alerte" size="4" value="<?php echo $object->seuil_stock_alerte; ?>">
 </td></tr>
diff --git a/htdocs/product/canvas/product/tpl/card_edit.tpl.php b/htdocs/product/canvas/product/tpl/card_edit.tpl.php
index 2fd2d3a5fc17514fbc3a34322c2b85c7123a810e..a60865e0867021fffd4c65fedf1d0a85eaa94931 100755
--- a/htdocs/product/canvas/product/tpl/card_edit.tpl.php
+++ b/htdocs/product/canvas/product/tpl/card_edit.tpl.php
@@ -57,7 +57,7 @@ dol_htmloutput_errors($object->error,$object->errors);
 <td><?php echo $form->selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td>
 </tr>
 
-<?php if ($conf->stock->enabled) { ?>
+<?php if (! empty($conf->stock->enabled)) { ?>
 <tr><td><?php echo $langs->trans("StockLimit"); ?></td><td>
 <input name="seuil_stock_alerte" size="4" value="<?php echo $object->seuil_stock_alerte; ?>">
 </td></tr>
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 5b9d06cb8cce3778f6c82c0e340f431205a2770e..54995bb2e3255c2ce9742d1ef6bb575170dee721 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -477,7 +477,7 @@ class Product extends CommonObject
 			$this->id = $id;
 
 			// Multilangs
-			if($conf->global->MAIN_MULTILANGS)
+			if (! empty($conf->global->MAIN_MULTILANGS))
 			{
 				if ( $this->setMultiLangs() < 0)
 				{
diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php
index 15d1cfc6b27aa49415115c2e0f799b0432e0a32e..407c28692258ed6b33697d81a2293470cef1b0c0 100644
--- a/htdocs/product/composition/fiche.php
+++ b/htdocs/product/composition/fiche.php
@@ -126,14 +126,14 @@ if ($action == 'search')
 	$current_lang = $langs->getDefaultLang();
 
 	$sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.price, p.fk_product_type as type';
-	if ($conf->global->MAIN_MULTILANGS) $sql.= ', pl.label as labelm, pl.description as descriptionm';
+	if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ', pl.label as labelm, pl.description as descriptionm';
 	$sql.= ' FROM '.MAIN_DB_PREFIX.'product as p';
 	$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON p.rowid = cp.fk_product';
-	if ($conf->global->MAIN_MULTILANGS) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND lang='".($current_lang)."'";
+	if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND lang='".($current_lang)."'";
 	$sql.= ' WHERE p.entity IN ('.getEntity("product", 1).')';
 	if ($key != "")
 	{
-		if ($conf->global->MAIN_MULTILANGS)
+		if (! empty($conf->global->MAIN_MULTILANGS))
 		{
 			$sql.= " AND (p.ref LIKE '%".$key."%'";
 			$sql.= " OR pl.label LIKE '%".$key."%')";
@@ -217,14 +217,14 @@ if ($id || $ref)
 					$productstatic->id=$value['id'];
 					$productstatic->type=$value['type'];
 					$productstatic->ref=$value['fullpath'];
-					if ($conf->stock->enabled) $productstatic->load_stock();
+					if (! empty($conf->stock->enabled)) $productstatic->load_stock();
 					//var_dump($value);
 					//print '<pre>'.$productstatic->ref.'</pre>';
 					//print $productstatic->getNomUrl(1).'<br>';
 					//print $value[0];	// This contains a tr line.
 					print '<tr>';
 					print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].') &nbsp &nbsp</td>';
-					if ($conf->stock->enabled) print '<td>'.$langs->trans("Stock").' : <b>'.$productstatic->stock_reel.'</b></td>';
+					if (! empty($conf->stock->enabled)) print '<td>'.$langs->trans("Stock").' : <b>'.$productstatic->stock_reel.'</b></td>';
 					print '</tr>';
 				}
 				print '</table>';
@@ -302,14 +302,14 @@ if ($id || $ref)
 				$productstatic->id=$value['id'];
 				$productstatic->type=$value['type'];
 				$productstatic->ref=$value['fullpath'];
-				if ($conf->stock->enabled) $productstatic->load_stock();
+				if (! empty($conf->stock->enabled)) $productstatic->load_stock();
 				//var_dump($value);
 				//print '<pre>'.$productstatic->ref.'</pre>';
 				//print $productstatic->getNomUrl(1).'<br>';
 				//print $value[0];	// This contains a tr line.
 				print '<tr>';
 				print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].') &nbsp &nbsp</td>';
-				if ($conf->stock->enabled) print '<td>'.$langs->trans("Stock").' : <b>'.$productstatic->stock_reel.'</b></td>';
+				if (! empty($conf->stock->enabled)) print '<td>'.$langs->trans("Stock").' : <b>'.$productstatic->stock_reel.'</b></td>';
 				print '</tr>';
 			}
 			print '</table>';
@@ -345,7 +345,7 @@ if ($id || $ref)
 		print '<br>';
 
 		$rowspan=1;
-		if ($conf->categorie->enabled) $rowspan++;
+		if (! empty($conf->categorie->enabled)) $rowspan++;
 
         print_fiche_titre($langs->trans("ProductToAddSearch"),'','');
 		print '<form action="'.DOL_URL_ROOT.'/product/composition/fiche.php?id='.$id.'" method="post">';
@@ -363,7 +363,7 @@ if ($id || $ref)
 		print '<td rowspan="'.$rowspan.'" valign="middle">';
 		print '<input type="submit" class="button" value="'.$langs->trans("Search").'">';
 		print '</td></tr>';
-		if ($conf->categorie->enabled)
+		if (! empty($conf->categorie->enabled))
 		{
 			print '<tr><td>'.$langs->trans("CategoryFilter").' &nbsp; </td>';
 			print '<td>'.$form->select_all_categories(0,$catMere).'</td></tr>';
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index 7ee96daf9801154ba286c63249475b214aa46b76..d04923bce548d34fa793ee676f178805af7a184e 100755
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -63,8 +63,8 @@ if ($id > 0 || ! empty($ref))
 {
     $result = $object->fetch($id, $ref);
 
-    if ($conf->product->enabled) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
-    elseif ($conf->service->enabled) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
+    if (! empty($conf->product->enabled)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
+    elseif (! empty($conf->service->enabled)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
 }
 $modulepart='produit';
 
diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php
index 5e7ee4a4207d9c45467ca99d5c2c4bac8559113b..d0cbdc2180f8b3cbc564cab01334071bab532b3c 100644
--- a/htdocs/product/fiche.php
+++ b/htdocs/product/fiche.php
@@ -842,7 +842,7 @@ else
 
         print '<br>';
 
-        if ($conf->global->PRODUIT_MULTIPRICES)
+        if (! empty($conf->global->PRODUIT_MULTIPRICES))
         {
             // We do no show price array on create when multiprices enabled.
             // We must set them on prices tab.
diff --git a/htdocs/product/index.php b/htdocs/product/index.php
index 1e873ef9d9aa81281906fa2e5a37420187f911c2..59333c029270ae5e622fc0c3c1ac7e0f9b4cafba 100644
--- a/htdocs/product/index.php
+++ b/htdocs/product/index.php
@@ -117,7 +117,7 @@ while ($objp = $db->fetch_object($result))
 
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
-if ($conf->product->enabled)
+if (! empty($conf->product->enabled))
 {
 	$statProducts = "<tr $bc[0]>";
 	$statProducts.= '<td><a href="liste.php?type=0&amp;tosell=0&amp;tobuy=0">'.$langs->trans("ProductsNotOnSell").'</a></td><td align="right">'.round($prodser[0][0]).'</td>';
@@ -126,7 +126,7 @@ if ($conf->product->enabled)
 	$statProducts.= '<td><a href="liste.php?type=0&amp;tosell=1">'.$langs->trans("ProductsOnSell").'</a></td><td align="right">'.round($prodser[0][1]).'</td>';
 	$statProducts.= "</tr>";
 }
-if ($conf->service->enabled)
+if (! empty($conf->service->enabled))
 {
 	$statServices = "<tr $bc[0]>";
 	$statServices.= '<td><a href="liste.php?type=1&amp;tosell=0&amp;tobuy=0">'.$langs->trans("ServicesNotOnSell").'</a></td><td align="right">'.round($prodser[1][0]).'</td>';
@@ -198,7 +198,7 @@ if ($result)
 			$objp = $db->fetch_object($result);
 
 			//Multilangs
-			if ($conf->global->MAIN_MULTILANGS)
+			if (! empty($conf->global->MAIN_MULTILANGS))
 			{
 				$sql = "SELECT label";
 				$sql.= " FROM ".MAIN_DB_PREFIX."product_lang";
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index 724b13a0467b6280e12eef698358dfb1d8368801..cd0ce9ba307f065a5512bdb5b09defba07c97a59 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -53,7 +53,7 @@ if ($action == 'update_price' && ! $_POST["cancel"] && ($user->rights->produit->
 	$result = $object->fetch($id);
 
 	// MultiPrix
-	if($conf->global->PRODUIT_MULTIPRICES)
+	if (! empty($conf->global->PRODUIT_MULTIPRICES))
 	{
 		$newprice='';
 		$newprice_min='';
@@ -462,7 +462,7 @@ if ($result)
 		print '<tr class="liste_titre">';
 		print '<td>'.$langs->trans("AppliedPricesFrom").'</td>';
 
-		if($conf->global->PRODUIT_MULTIPRICES)
+		if (! empty($conf->global->PRODUIT_MULTIPRICES))
 		{
 			print '<td>'.$langs->trans("MultiPriceLevelsName").'</td>';
 		}
@@ -488,7 +488,7 @@ if ($result)
 			print "<td>".dol_print_date($db->jdate($objp->dp),"dayhour")."</td>";
 
 			// Price level
-			if ($conf->global->PRODUIT_MULTIPRICES)
+			if (! empty($conf->global->PRODUIT_MULTIPRICES))
 			{
 				print '<td align="center">'.$objp->price_level."</td>";
 			}
diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php
index b748d03069b5bfa0bf1581e972c01f27ef15034e..f4807cfb8228dfece8c390043620f45495cb8923 100644
--- a/htdocs/product/stock/fiche.php
+++ b/htdocs/product/stock/fiche.php
@@ -390,7 +390,7 @@ else
 					$objp = $db->fetch_object($resql);
 
 					// Multilangs
-					if ($conf->global->MAIN_MULTILANGS) // si l'option est active
+					if (! empty($conf->global->MAIN_MULTILANGS)) // si l'option est active
 					{
 						$sql = "SELECT label";
 						$sql.= " FROM ".MAIN_DB_PREFIX."product_lang";
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 23e884c2e4a802d97513f105a6fde86ce1fac5b5..dc3491d1e18a6f0bb0c0903ebf29ce0da4e6a2d0 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -252,17 +252,17 @@ if ($id > 0 || $ref)
 		print '</tr>';
 
 		// Calculating a theorical value of stock if stock increment is done on real sending
-		if ($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
+		if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT))
 		{
 			$stock_commande_client=$stock_commande_fournisseur=0;
 
-			if ($conf->commande->enabled)
+			if (! empty($conf->commande->enabled))
 			{
 				$result=$product->load_stats_commande(0,'1,2');
 				if ($result < 0) dol_print_error($db,$product->error);
 				$stock_commande_client=$product->stats_commande['qty'];
 			}
-			if ($conf->fournisseur->enabled)
+			if (! empty($conf->fournisseur->enabled))
 			{
 				$result=$product->load_stats_commande_fournisseur(0,'3');
 				if ($result < 0) dol_print_error($db,$product->error);
@@ -290,7 +290,7 @@ if ($id > 0 || $ref)
 			$found=0;
 
 			// Nbre de commande clients en cours
-			if ($conf->commande->enabled)
+			if (! empty($conf->commande->enabled))
 			{
 				if ($found) print '<br>'; else $found=1;
 				print $langs->trans("CustomersOrdersRunning").': '.($stock_commande_client+$stock_sending_client);
@@ -302,7 +302,7 @@ if ($id > 0 || $ref)
 			}
 
 			// Nbre de commande fournisseurs en cours
-			if ($conf->fournisseur->enabled)
+			if (! empty($conf->fournisseur->enabled))
 			{
 				if ($found) print '<br>'; else $found=1;
 				print $langs->trans("SuppliersOrdersRunning").': '.$stock_commande_fournisseur;
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index ee236837a3ef1ccf84b9adfdf94f45708fb17b33..186386821331b43c8d960f860255bb76850b8ebc 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -27,24 +27,24 @@
 require '../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
-if ($conf->propal->enabled)      require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
-if ($conf->facture->enabled)     require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
-if ($conf->facture->enabled)     require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php';
-if ($conf->commande->enabled)    require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
-if ($conf->fournisseur->enabled) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
-if ($conf->fournisseur->enabled) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
-if ($conf->contrat->enabled)     require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
-if ($conf->ficheinter->enabled)  require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
-if ($conf->deplacement->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
-if ($conf->agenda->enabled)      require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
+if (! empty($conf->propal->enabled))      require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+if (! empty($conf->facture->enabled))     require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
+if (! empty($conf->facture->enabled))     require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php';
+if (! empty($conf->commande->enabled))    require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
+if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
+if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
+if (! empty($conf->contrat->enabled))     require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
+if (! empty($conf->ficheinter->enabled))  require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
+if (! empty($conf->deplacement->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
+if (! empty($conf->agenda->enabled))      require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
 
 $langs->load("projects");
 $langs->load("companies");
 $langs->load("suppliers");
-if ($conf->facture->enabled)  	$langs->load("bills");
-if ($conf->commande->enabled) 	$langs->load("orders");
-if ($conf->propal->enabled)   	$langs->load("propal");
-if ($conf->ficheinter->enabled)	$langs->load("interventions");
+if (! empty($conf->facture->enabled))  	$langs->load("bills");
+if (! empty($conf->commande->enabled)) 	$langs->load("orders");
+if (! empty($conf->propal->enabled))   	$langs->load("propal");
+if (! empty($conf->ficheinter->enabled))	$langs->load("interventions");
 
 $projectid=GETPOST('id');
 $ref=GETPOST('ref');
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index 5ad4c62bf9308b28c8cd3638cd846f6dd03daa66..f692e633e9332d183326ee7787bfd435c18abfef 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -289,7 +289,7 @@ if ($action == 'add')
             }
 
             if (! empty($backtopage)) $urlback=$backtopage;
-            else if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)
+            else if (! empty($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION))
             {
                 $urlback=$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION;
                 // TODO Make replacement of __AMOUNT__, etc...
diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php
index febd6130f67733bc62519e07e33e386ed3805a60..89c57e8713970c8ade6b2f14304995a8788bc965 100644
--- a/htdocs/public/paybox/newpayment.php
+++ b/htdocs/public/paybox/newpayment.php
@@ -500,7 +500,7 @@ if (GETPOST("source") == 'contractline' && $valid)
 		$result=$product->fetch($contractline->fk_product);
 
 		// We define price for product (TODO Put this in a method in product class)
-		if ($conf->global->PRODUIT_MULTIPRICES)
+		if (! empty($conf->global->PRODUIT_MULTIPRICES))
 		{
 			$pu_ht = $product->multiprices[$contract->thirdparty->price_level];
 			$pu_ttc = $product->multiprices_ttc[$contract->thirdparty->price_level];
diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php
index acea9f714d0d9cedfe7f6b08a7818b2bca7ecfbf..afd0cb40c1d27034ddbd8725fc62b7ad09b15034 100755
--- a/htdocs/public/paypal/newpayment.php
+++ b/htdocs/public/paypal/newpayment.php
@@ -639,7 +639,7 @@ if (GETPOST("source") == 'contractline' && $valid)
 		$result=$product->fetch($contractline->fk_product);
 
 		// We define price for product (TODO Put this in a method in product class)
-		if ($conf->global->PRODUIT_MULTIPRICES)
+		if (! empty($conf->global->PRODUIT_MULTIPRICES))
 		{
 			$pu_ht = $product->multiprices[$contract->thirdparty->price_level];
 			$pu_ttc = $product->multiprices_ttc[$contract->thirdparty->price_level];
diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php
index 5c24d29041dcf8dd8b9493e3fdbdc3cbe4e5d542..d6d31201e17533d0373d36175459de19034e4f80 100755
--- a/htdocs/public/paypal/paymentok.php
+++ b/htdocs/public/paypal/paymentok.php
@@ -54,13 +54,13 @@ $langs->load("paypal");
 
 // Clean parameters
 $PAYPAL_API_USER="";
-if ($conf->global->PAYPAL_API_USER) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER;
+if (! empty($conf->global->PAYPAL_API_USER)) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER;
 $PAYPAL_API_PASSWORD="";
-if ($conf->global->PAYPAL_API_PASSWORD) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD;
+if (! empty($conf->global->PAYPAL_API_PASSWORD)) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD;
 $PAYPAL_API_SIGNATURE="";
-if ($conf->global->PAYPAL_API_SIGNATURE) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE;
+if (! empty($conf->global->PAYPAL_API_SIGNATURE)) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE;
 $PAYPAL_API_SANDBOX="";
-if ($conf->global->PAYPAL_API_SANDBOX) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX;
+if (! empty($conf->global->PAYPAL_API_SANDBOX)) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX;
 $PAYPAL_API_OK="";
 if ($urlok) $PAYPAL_API_OK=$urlok;
 $PAYPAL_API_KO="";
diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php
index 6a72d73cb503eea79b65b7dbb2890c0ba458adfb..62c382460e7f3fbd28047202f3061d75f661d3b1 100644
--- a/htdocs/societe/agenda.php
+++ b/htdocs/societe/agenda.php
@@ -71,7 +71,7 @@ if ($socid)
 	$result = $soc->fetch($socid);
 	llxHeader("",$langs->trans("Agenda"),'');
 
-	if ($conf->notification->enabled) $langs->load("mails");
+	if (! empty($conf->notification->enabled)) $langs->load("mails");
 	$head = societe_prepare_head($soc);
 
 	dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"),0,'company');
@@ -154,7 +154,7 @@ if ($socid)
 
     print '<div class="tabsAction">';
 
-    if ($conf->agenda->enabled)
+    if (! empty($conf->agenda->enabled))
     {
         print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>';
     }
diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajaxcompanies.php
index b960eb0b087c4e2e2c4476dbff1808301bc2f3d2..874bda75d6f5f2d77cda6da8227e88237bf43a3d 100644
--- a/htdocs/societe/ajaxcompanies.php
+++ b/htdocs/societe/ajaxcompanies.php
@@ -78,7 +78,7 @@ if (GETPOST('newcompany') || GETPOST('socid','int') || GETPOST('id_fourn'))
     		$sql.=" OR code_client LIKE '%" . $db->escape($socid) . "%'";
     		$sql.=" OR code_fournisseur LIKE '%" . $db->escape($socid) . "%'";
         }
-		if ($conf->global->SOCIETE_ALLOW_SEARCH_ON_ROWID) $sql.=" OR rowid = '" . $db->escape($socid) . "'";
+		if (! empty($conf->global->SOCIETE_ALLOW_SEARCH_ON_ROWID)) $sql.=" OR rowid = '" . $db->escape($socid) . "'";
 		$sql.=")";
 	}
 	if (! empty($_GET["filter"])) $sql.= " AND ".$_GET["filter"]; // Add other filters
diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index 3faba3cf2d8fc2f7eec6f8ca1b80c456072c282a..e486e4c6fe9e25c57f4d87d4b92bd198b4ff66f5 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -456,7 +456,7 @@ abstract class ActionsCardCommon
             $s=$modCodeClient->getToolTip($langs,$this->object,0);
             $this->tpl['help_customercode'] = $form->textwithpicto('',$s,1);
 
-            if ($conf->fournisseur->enabled)
+            if (! empty($conf->fournisseur->enabled))
             {
             	$this->tpl['supplier_enabled'] = 1;
 
@@ -510,7 +510,7 @@ abstract class ActionsCardCommon
             else $this->tpl['select_state'] = $countrynotdefined;
 
             // Language
-            if ($conf->global->MAIN_MULTILANGS) $this->tpl['select_lang'] = $formadmin->select_language(($this->object->default_lang?$this->object->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1);
+            if (! empty($conf->global->MAIN_MULTILANGS)) $this->tpl['select_lang'] = $formadmin->select_language(($this->object->default_lang?$this->object->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1);
 
             // VAT
             $this->tpl['yn_assujtva'] = $form->selectyesno('assujtva_value',$this->tpl['tva_assuj'],1);	// Assujeti par defaut en creation
@@ -575,7 +575,7 @@ abstract class ActionsCardCommon
             $arr = $formcompany->typent_array(1);
             $this->tpl['typent'] = $arr[$this->object->typent_code];
 
-            if ($conf->global->MAIN_MULTILANGS)
+            if (! empty($conf->global->MAIN_MULTILANGS))
             {
                 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
                 //$s=picto_from_langcode($this->default_lang);
@@ -615,7 +615,7 @@ abstract class ActionsCardCommon
             else $this->tpl['sales_representatives'].= $langs->trans("NoSalesRepresentativeAffected");
 
             // Linked member
-            if ($conf->adherent->enabled)
+            if (! empty($conf->adherent->enabled))
             {
                 $langs->load("members");
                 $adh=new Adherent($this->db);
diff --git a/htdocs/societe/canvas/company/tpl/card_create.tpl.php b/htdocs/societe/canvas/company/tpl/card_create.tpl.php
index d519f125c0947037584c152b3a767eeefdba80da..1133da8a79d8ba7b547db7638e5bf4fffd65c094 100644
--- a/htdocs/societe/canvas/company/tpl/card_create.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_create.tpl.php
@@ -172,7 +172,7 @@ for ($i=1; $i<=4; $i++) {
 	<td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
 </tr>
 
-<?php if ($conf->global->MAIN_MULTILANGS) { ?>
+<?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
 <tr>
 	<td><?php echo $langs->trans("DefaultLang"); ?></td>
 	<td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
diff --git a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
index 4d89f95b8c869eabd9e4b348f2d685febbf7d0e5..76dbccd1019fa13365b74f0fbd22371cef80d9ca 100644
--- a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
@@ -194,7 +194,7 @@ for ($i=1; $i<=4; $i++) {
 	<td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
 </tr>
 
-<?php if ($conf->global->MAIN_MULTILANGS) { ?>
+<?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
 <tr>
 	<td><?php echo $langs->trans("DefaultLang"); ?></td>
 	<td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php
index 1eaf013af0dd60ba9b3173d8a475970aa95825e1..8d79db94ea76d80967a3319ba7e2170bb8edce27 100644
--- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php
@@ -164,7 +164,7 @@ for ($i=1; $i<=4; $i++) {
 	<td><?php echo $this->control->tpl['effectif']; ?></td>
 </tr>
 
-<?php if ($conf->global->MAIN_MULTILANGS) { ?>
+<?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
 <tr>
 	<td><?php echo $langs->trans("DefaultLang"); ?></td>
 	<td colspan="3"><?php echo $this->control->tpl['default_lang']; ?></td>
@@ -225,7 +225,7 @@ for ($i=1; $i<=4; $i++) {
 	<td colspan="3"><?php echo $this->control->tpl['sales_representatives'];	?></td>
 </tr>
 
-<?php if ($conf->adherent->enabled) { ?>
+<?php if (! empty($conf->adherent->enabled)) { ?>
 <tr>
 	<td width="25%" valign="top"><?php echo $langs->trans("LinkedToDolibarrMember"); ?></td>
 	<td colspan="3"><?php echo $this->control->tpl['linked_member']; ?></td>
diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
index ac4e4cceef0985d780b6ffa193264d48162fe583..b84ebc82f98a668b702aac77398e26d6d95f9ad0 100644
--- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
@@ -149,7 +149,7 @@
 	<td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
 </tr>
 
-<?php if ($conf->global->MAIN_MULTILANGS) { ?>
+<?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
 <tr>
 	<td><?php echo $langs->trans("DefaultLang"); ?></td>
 	<td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
index 296869bbae3d4796598831018ff1479838002f77..597fb95ccc8333a33fe3adbee4d16df72307699e 100644
--- a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
@@ -151,7 +151,7 @@ if ($this->control->tpl['fournisseur']) {
 	<td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
 </tr>
 
-<?php if ($conf->global->MAIN_MULTILANGS) { ?>
+<?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
 <tr>
 	<td><?php echo $langs->trans("DefaultLang"); ?></td>
 	<td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
index a47f3c7711f0c761d449c7a9ae46448b12f75dc2..1b680b809b036d1035f37064df8cd7175a70bdc3 100644
--- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
@@ -123,7 +123,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
 	<td colspan="3"><?php echo $this->control->tpl['typent']; ?></td>
 </tr>
 
-<?php if ($conf->global->MAIN_MULTILANGS) { ?>
+<?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
 <tr>
 	<td><?php echo $langs->trans("DefaultLang"); ?></td>
 	<td colspan="3"><?php echo $this->control->tpl['default_lang']; ?></td>
@@ -166,7 +166,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
 	<td colspan="3"><?php echo $this->control->tpl['sales_representatives'];	?></td>
 </tr>
 
-<?php if ($conf->adherent->enabled) { ?>
+<?php if (! empty($conf->adherent->enabled)) { ?>
 <tr>
 	<td width="25%" valign="top"><?php echo $langs->trans("LinkedToDolibarrMember"); ?></td>
 	<td colspan="3"><?php echo $this->control->tpl['linked_member']; ?></td>
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index f51390d90b49c4ede04a607ede2dfbb129ef484a..047a61f4e02a0bb5a7ae8b696e1e0ea219399dc1 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -1624,7 +1624,7 @@ class Societe extends CommonObject
     function get_codeclient($objsoc=0,$type=0)
     {
         global $conf;
-        if ($conf->global->SOCIETE_CODECLIENT_ADDON)
+        if (! empty($conf->global->SOCIETE_CODECLIENT_ADDON))
         {
             $dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
             foreach ($dirsociete as $dirroot)
@@ -1653,7 +1653,7 @@ class Societe extends CommonObject
     function get_codefournisseur($objsoc=0,$type=1)
     {
         global $conf;
-        if ($conf->global->SOCIETE_CODEFOURNISSEUR_ADDON)
+        if (! empty($conf->global->SOCIETE_CODEFOURNISSEUR_ADDON))
         {
             $dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
             foreach ($dirsociete as $dirroot)
@@ -1679,7 +1679,7 @@ class Societe extends CommonObject
     function codeclient_modifiable()
     {
         global $conf;
-        if ($conf->global->SOCIETE_CODECLIENT_ADDON)
+        if (! empty($conf->global->SOCIETE_CODECLIENT_ADDON))
         {
             $dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
             foreach ($dirsociete as $dirroot)
@@ -1713,7 +1713,7 @@ class Societe extends CommonObject
     function codefournisseur_modifiable()
     {
         global $conf;
-        if ($conf->global->SOCIETE_CODEFOURNISSEUR_ADDON)
+        if (! empty($conf->global->SOCIETE_CODEFOURNISSEUR_ADDON))
         {
             $dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
             foreach ($dirsociete as $dirroot)
@@ -1751,7 +1751,7 @@ class Societe extends CommonObject
     function check_codeclient()
     {
         global $conf;
-        if ($conf->global->SOCIETE_CODECLIENT_ADDON)
+        if (! empty($conf->global->SOCIETE_CODECLIENT_ADDON))
         {
             $dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
             foreach ($dirsociete as $dirroot)
@@ -1786,7 +1786,7 @@ class Societe extends CommonObject
     function check_codefournisseur()
     {
         global $conf;
-        if ($conf->global->SOCIETE_CODEFOURNISSEUR_ADDON)
+        if (! empty($conf->global->SOCIETE_CODEFOURNISSEUR_ADDON))
         {
             $dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
             foreach ($dirsociete as $dirroot)
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index edca64dfcf83f05db7a3cf3a2ac3cde972d93bd3..2e8f659a738c68d2df75ba0d55123cdddd5d238b 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -113,7 +113,7 @@ if ($object->id)
 	/*
 	 * Affichage onglets
 	 */
-	if ($conf->notification->enabled) $langs->load("mails");
+	if (! empty($conf->notification->enabled)) $langs->load("mails");
 	$head = societe_prepare_head($object);
 
 	$form=new Form($db);
diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php
index fcc8a4f6efe940e10d9bdb3a2372f33f27df221f..2d3fe14b97eb325f55f79b39cf3ed14f65af9c11 100644
--- a/htdocs/societe/index.php
+++ b/htdocs/societe/index.php
@@ -115,7 +115,7 @@ if (! empty($conf->use_javascript_ajax) && ((round($third['prospect'])?1:0)+(rou
     if ($conf->societe->enabled && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS))     $dataseries[]=array('label'=>$langs->trans("Prospects"),'data'=>round($third['prospect']));
     if ($conf->societe->enabled && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS))     $dataseries[]=array('label'=>$langs->trans("Customers"),'data'=>round($third['customer']));
     if ($conf->fournisseur->enabled && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) $dataseries[]=array('label'=>$langs->trans("Suppliers"),'data'=>round($third['supplier']));
-    if ($conf->societe->enabled)                                                              $dataseries[]=array('label'=>$langs->trans("Others"),'data'=>round($third['other']));
+    if (! empty($conf->societe->enabled))                                                              $dataseries[]=array('label'=>$langs->trans("Others"),'data'=>round($third['other']));
     $data=array('series'=>$dataseries);
     dol_print_graph('stats',300,180,$data,1,'pie',0);
     print '</td></tr>';
diff --git a/htdocs/societe/info.php b/htdocs/societe/info.php
index 28d626c37f2c53b42f4d9862a06bf4be3b6be0d8..5f8468fd1f617ddaa23d54caadfaccda37a74aa9 100644
--- a/htdocs/societe/info.php
+++ b/htdocs/societe/info.php
@@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
 
 $langs->load("companies");
 $langs->load("other");
-if ($conf->notification->enabled) $langs->load("mails");
+if (! empty($conf->notification->enabled)) $langs->load("mails");
 
 // Security check
 $socid = GETPOST('socid','int');
diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php
index 00e1a182dfedd3fa56e038b487a7c0ec7f621c5c..952d1c5e6ed7ff396f9de7de065a59406bbea08f 100644
--- a/htdocs/societe/note.php
+++ b/htdocs/societe/note.php
@@ -69,7 +69,7 @@ if ($socid > 0)
     /*
      * Affichage onglets
      */
-    if ($conf->notification->enabled) $langs->load("mails");
+    if (! empty($conf->notification->enabled)) $langs->load("mails");
 
     $head = societe_prepare_head($object);
 
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 0a5888eb77cd978032cc39c8253fdb411ad4e00b..f4a221fb0986664da615cf6e881376a5d0d16a6a 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -36,14 +36,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
 require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
-if ($conf->adherent->enabled) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
+if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
 
 $langs->load("companies");
 $langs->load("commercial");
 $langs->load("bills");
 $langs->load("banks");
 $langs->load("users");
-if ($conf->notification->enabled) $langs->load("mails");
+if (! empty($conf->notification->enabled)) $langs->load("mails");
 
 $mesg=''; $error=0; $errors=array();
 
@@ -1363,7 +1363,7 @@ else
             print '<tr><td>'.$langs->trans("Capital").'</td><td colspan="3"><input type="text" name="capital" size="10" value="'.$object->capital.'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
 
             // Default language
-            if ($conf->global->MAIN_MULTILANGS)
+            if (! empty($conf->global->MAIN_MULTILANGS))
             {
                 print '<tr><td>'.$langs->trans("DefaultLang").'</td><td colspan="3">'."\n";
                 print $formadmin->select_language($object->default_lang,'default_lang',0,0,1);
@@ -1677,7 +1677,7 @@ else
         print '</td></tr>';
 
         // Default language
-        if ($conf->global->MAIN_MULTILANGS)
+        if (! empty($conf->global->MAIN_MULTILANGS))
         {
             require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
             print '<tr><td>'.$langs->trans("DefaultLang").'</td><td colspan="3">';
@@ -1752,7 +1752,7 @@ else
         include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
 
         // Module Adherent
-        if ($conf->adherent->enabled)
+        if (! empty($conf->adherent->enabled))
         {
             $langs->load("members");
             print '<tr><td width="25%" valign="top">'.$langs->trans("LinkedToDolibarrMember").'</td>';
diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php
index 4913d6c7521a6d84701ea6a1584e4d716b571d39..9002814e0b3132d56b43b62b55a44ac5db180d16 100644
--- a/htdocs/societe/societe.php
+++ b/htdocs/societe/societe.php
@@ -302,7 +302,7 @@ if ($resql)
     // Filter on categories
     /* Not possible in this page because list is for ALL third parties type
 	$moreforfilter='';
-    if ($conf->categorie->enabled)
+    if (! empty($conf->categorie->enabled))
     {
         $moreforfilter.=$langs->trans('Categories'). ': ';
         $moreforfilter.=$htmlother->select_categories(2,$search_categ,'search_categ');
diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php
index 8cba8d76e4fb593a041fc5fa8caa882a025380af..8ac5fde2fe40899a9a50df625576efc77b75dc96 100644
--- a/htdocs/theme/auguria/style.css.php
+++ b/htdocs/theme/auguria/style.css.php
@@ -2226,7 +2226,7 @@ div.ecmjqft {
 
 .jnotify-container {
 	position: fixed !important;
-<?php if ($conf->global->MAIN_JQUERY_JNOTIFY_BOTTOM) { ?>
+<?php if (! empty($conf->global->MAIN_JQUERY_JNOTIFY_BOTTOM)) { ?>
 	top: auto !important;
 	bottom: 4px !important;
 <?php } ?>
diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php
index 475428486d290c92565d414f08a774f8a1a6c6bd..26f8993c3545cb112c7fddf9daf7b075fe0c060a 100644
--- a/htdocs/theme/bureau2crea/style.css.php
+++ b/htdocs/theme/bureau2crea/style.css.php
@@ -2448,7 +2448,7 @@ div.ecmjqft {
 
 .jnotify-container {
 	position: fixed !important;
-<?php if ($conf->global->MAIN_JQUERY_JNOTIFY_BOTTOM) { ?>
+<?php if (! empty($conf->global->MAIN_JQUERY_JNOTIFY_BOTTOM)) { ?>
 	top: auto !important;
 	bottom: 4px !important;
 <?php } ?>
diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php
index 1501cfe88996c96dc986c560313f888ff3a87ead..548808747161420f23881c5a41797187cb47accc 100644
--- a/htdocs/theme/cameleo/style.css.php
+++ b/htdocs/theme/cameleo/style.css.php
@@ -2281,7 +2281,7 @@ div.ecmjqft {
 
 .jnotify-container {
 	position: fixed !important;
-<?php if ($conf->global->MAIN_JQUERY_JNOTIFY_BOTTOM) { ?>
+<?php if (! empty($conf->global->MAIN_JQUERY_JNOTIFY_BOTTOM)) { ?>
 	top: auto !important;
 	bottom: 4px !important;
 <?php } ?>
diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php
index 487557b939dd3115a6e9d508ef6c52fb74845081..f49cdde8a780e0456753855a71694c0a8438ab47 100644
--- a/htdocs/user/class/usergroup.class.php
+++ b/htdocs/user/class/usergroup.class.php
@@ -690,7 +690,7 @@ class UserGroup extends CommonObject
 		if ($this->nom && $conf->global->LDAP_GROUP_FIELD_FULLNAME) $info[$conf->global->LDAP_GROUP_FIELD_FULLNAME] = $this->nom;
 		//if ($this->nom && $conf->global->LDAP_GROUP_FIELD_NAME) $info[$conf->global->LDAP_GROUP_FIELD_NAME] = $this->nom;
 		if ($this->note && $conf->global->LDAP_GROUP_FIELD_DESCRIPTION) $info[$conf->global->LDAP_GROUP_FIELD_DESCRIPTION] = $this->note;
-		if ($conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS)
+		if (! empty($conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS))
 		{
 			$valueofldapfield=array();
 			foreach($this->members as $key=>$val)    // This is array of users for group into dolibarr database.
diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index 4198f8c2a3fb2f12ae1d77e1ec9840e198be12d5..3191ae1057888a2cb1c3d1489a61896e96554b91 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -203,7 +203,7 @@ if ($action == 'add' && $canadduser)
         $edituser->note			= $_POST["note"];
         $edituser->ldap_sid		= $_POST["ldap_sid"];
         // If multicompany is off, admin users must all be on entity 0.
-        if ($conf->multicompany->enabled)
+        if (! empty($conf->multicompany->enabled))
         {
         	if (! empty($_POST["superadmin"]))
         	{
@@ -319,7 +319,7 @@ if ($action == 'update' && ! $_POST["cancel"])
             $edituser->webcal_login	= $_POST["webcal_login"];
             $edituser->phenix_login	= $_POST["phenix_login"];
             $edituser->phenix_pass	= $_POST["phenix_pass"];
-            if ($conf->multicompany->enabled)
+            if (! empty($conf->multicompany->enabled))
             {
             	if (! empty($_POST["superadmin"]))
             	{
diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php
index cf3776b6c10ae45d6948033a8e0f365589905fa3..d00ed40c56410b108e8a8750eeefa3ddff7e1d76 100644
--- a/htdocs/user/passwordforgotten.php
+++ b/htdocs/user/passwordforgotten.php
@@ -37,7 +37,7 @@ $langs->load("ldap");
 $langs->load("other");
 
 // Security check
-if ($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)
+if (! empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK))
 {
     header("Location: ".DOL_URL_ROOT.'/');
     exit;
@@ -194,7 +194,7 @@ else $focus_element = 'password';
 // Send password button enabled ?
 $disabled='disabled';
 if (preg_match('/dolibarr/i',$mode)) $disabled='';
-if ($conf->global->MAIN_SECURITY_ENABLE_SENDPASSWORD) $disabled='';	 // To force button enabled
+if (! empty($conf->global->MAIN_SECURITY_ENABLE_SENDPASSWORD)) $disabled='';	 // To force button enabled
 
 // Show logo (search in order: small company logo, large company logo, theme logo, common logo)
 $width=0;
diff --git a/htdocs/webservices/admin/webservices.php b/htdocs/webservices/admin/webservices.php
index bc47a4a8be89862cc65a839f1545b9128203db50..163b0fb024a686df95a334cb345127b8e1309ac4 100644
--- a/htdocs/webservices/admin/webservices.php
+++ b/htdocs/webservices/admin/webservices.php
@@ -106,17 +106,17 @@ if ($conf->product->enabled || $conf->service->enabled)
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php?wsdl';
 	print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
 }
-if ($conf->societe->enabled)
+if (! empty($conf->societe->enabled))
 {
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php?wsdl';
 	print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
 }
-if ($conf->facture->enabled)
+if (! empty($conf->facture->enabled))
 {
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php?wsdl';
 	print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
 }
-if ($conf->fournisseur->enabled)
+if (! empty($conf->fournisseur->enabled))
 {
     $url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php?wsdl';
     print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
@@ -133,17 +133,17 @@ if ($conf->product->enabled || $conf->service->enabled)
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php';
 	print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
 }
-if ($conf->societe->enabled)
+if (! empty($conf->societe->enabled))
 {
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php';
 	print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
 }
-if ($conf->facture->enabled)
+if (! empty($conf->facture->enabled))
 {
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php';
 	print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
 }
-if ($conf->fournisseur->enabled)
+if (! empty($conf->fournisseur->enabled))
 {
     $url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php';
     print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
diff --git a/htdocs/webservices/index.php b/htdocs/webservices/index.php
index a448425ac26963aa0705733c139d7969d9055ead..f584fd32ce4a6d33c4eeee4f9d28e531bf440443 100644
--- a/htdocs/webservices/index.php
+++ b/htdocs/webservices/index.php
@@ -53,17 +53,17 @@ if (empty($conf->global->MAIN_MODULE_WEBSERVICES))
 print '<u>'.$langs->trans("WSDLCanBeDownloadedHere").':</u><br>';
 $url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php?wsdl';
 print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
-if ($conf->societe->enabled)
+if (! empty($conf->societe->enabled))
 {
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php?wsdl';
 	print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
 }
-if ($conf->facture->enabled)
+if (! empty($conf->facture->enabled))
 {
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php?wsdl';
 	print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
 }
-if ($conf->fournisseur->enabled)
+if (! empty($conf->fournisseur->enabled))
 {
     $url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php?wsdl';
     print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
@@ -77,17 +77,17 @@ print '<br>';
 print '<u>'.$langs->trans("EndPointIs").':</u><br>';
 $url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php';
 print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
-if ($conf->societe->enabled)
+if (! empty($conf->societe->enabled))
 {
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php';
 	print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
 }
-if ($conf->facture->enabled)
+if (! empty($conf->facture->enabled))
 {
 	$url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php';
 	print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";
 }
-if ($conf->fournisseur->enabled)
+if (! empty($conf->fournisseur->enabled))
 {
     $url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php';
     print img_picto('','object_globe.png') . ' <a href="' . $url . '" target="_blank">' . $url . "</a><br>\n";