diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 8d0cd566a7f..4b9f5e672e8 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -178,7 +178,7 @@ print ''; print ''; print ''; print ''.$langs->trans("AddSubscriptionIntoAccount").''; -if ($conf->banque->enabled) +if (! empty($conf->banque->enabled)) { print ''; 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 05dba9a696c..b3169c721f2 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=''; @@ -214,7 +214,7 @@ else dol_fiche_end(); -if ($conf->global->ADHERENT_USE_MAILMAN) +if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { print '
'; print ''; diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 37ae2d63c25..9dfac613f2a 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 ''; $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 "\n"; } diff --git a/htdocs/adherents/admin/spip.php b/htdocs/adherents/admin/spip.php index c099d0a93a3..29ae8e9e894 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=''; diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index db8a055e32f..487c7636445 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 '
'; - if ($conf->agenda->enabled) + if (! empty($conf->agenda->enabled)) { print ''.$langs->trans("AddAction").''; } diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 61ef0da1314..77814af9620 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 ''; print ''; @@ -545,7 +545,7 @@ if ($rowid) print ''; // Third party Dolibarr - if ($conf->societe->enabled) + if (! empty($conf->societe->enabled)) { print ''; print ''; print ''; print ''; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { print ''; } @@ -693,7 +693,7 @@ if ($rowid) print '\n"; print '\n"; print ''; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { print ''; print ''; // Banque - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { if ($objp->fk_account) { @@ -207,7 +207,7 @@ if ($result) print "\n"; print "\n"; print "\n"; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { print ''; } diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 5647ae16839..e12ec01d3a9 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 '
'; @@ -675,7 +675,7 @@ if ($rowid) print ''.$langs->trans("DateSubscription").''.$langs->trans("DateEnd").''.$langs->trans("Amount").''.$langs->trans("Account").''.dol_print_date($db->jdate($objp->dateadh),'day')."'.dol_print_date($db->jdate($objp->datef),'day')."'.price($objp->cotisation).''; 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 ''; print ' '.$langs->trans("None").'
'; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { print ' '.$langs->trans("MoreActionBankDirect").'
'; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 3c0290b4eeb..ebdb9f824cc 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 b0a75427697..e7b898ffd1e 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 '
    
'.$langs->trans("LinkedToDolibarrThirdParty").''; 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 ''; print ''; @@ -1064,7 +1064,7 @@ if ($action == 'edit') } // Third party Dolibarr - if ($conf->societe->enabled) + if (! empty($conf->societe->enabled)) { print '
'.$langs->trans("LinkedToDolibarrThirdParty").''; 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").'
'; - 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 ''; @@ -1382,7 +1382,7 @@ if ($rowid && $action != 'edit') } // Third party Dolibarr - if ($conf->societe->enabled) + if (! empty($conf->societe->enabled)) { print '
'; print ''; // 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 ''; // 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 a97c729a908..5cc02159675 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -120,7 +120,7 @@ print ''; print ''; // Password not crypted -if ($conf->global->LDAP_MEMBER_FIELD_PASSWORD) +if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) { print ''; print ''; @@ -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 ''; print ''; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 93549d1c516..ca87562153a 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 91c376a32f6..2bd8736dfda 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 ""; @@ -308,7 +308,7 @@ if ($conf->societe->enabled) } // Module produits -if ($conf->product->enabled) +if (! empty($conf->product->enabled)) { $var=!$var; print ""; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 18d7aafe3f5..b1838928511 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -661,7 +661,7 @@ else $var=!$var; print ''; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 86d87117ac1..6f45e70bc98 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -113,7 +113,7 @@ print "\n"; print ''; print ''; print ""; print "'; // Synchro contact active -if ($conf->societe->enabled) +if (! empty($conf->societe->enabled)) { $var=!$var; print ''; // Port $var=!$var; print ''; // Pass $var=!$var; print '"; print ''; print '"; } -if($conf->global->DATABASE_PWD_ENCRYPTED) +if (! empty($conf->global->DATABASE_PWD_ENCRYPTED)) { print '\n"; print ''."\n"; $var=true; -if ($conf->facture->enabled) +if (! empty($conf->facture->enabled)) { $var=!$var; print ""; @@ -147,7 +147,7 @@ if ($conf->facture->enabled) print "\n\n\n"; } -if ($conf->commande->enabled) +if (! empty($conf->commande->enabled)) { $var=!$var; print ""; @@ -161,7 +161,7 @@ if ($conf->commande->enabled) print "\n\n\n"; } -if ($conf->expedition->enabled) +if (! empty($conf->expedition->enabled)) { $var=!$var; print ""; @@ -183,7 +183,7 @@ print " \n"; print ''."\n"; $var=true; -if ($conf->fournisseur->enabled) +if (! empty($conf->fournisseur->enabled)) { $var=!$var; print ""; @@ -197,7 +197,7 @@ if ($conf->fournisseur->enabled) print "\n\n\n"; } -if ($conf->fournisseur->enabled) +if (! empty($conf->fournisseur->enabled)) { $var=!$var; print ""; @@ -210,7 +210,7 @@ if ($conf->fournisseur->enabled) print ''; print "\n\n\n"; } -if ($conf->fournisseur->enabled) +if (! empty($conf->fournisseur->enabled)) { $var=!$var; print ""; diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index b835b4a5953..46eebf3f299 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 '
'; diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index 02c9539d262..e9fa20f7e98 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 '
'.$langs->trans("Label").''.$subscription->note.'
'.$langs->trans("Login").''.$adh->login.' 
'.$langs->trans("LDAPFieldPasswordNotCrypted").''.$adh->pass.'
'.$langs->trans("LDAPFieldPasswordCrypted").''.$adh->pass_crypted.'
'.$langs->trans("State").''; - 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 ' '; print '
'.$langs->trans('OptionModeTrue').''.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 "
\n"; // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite')); diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index d6859188a25..ddbbb7ece69 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 43814ccb377..d83a089c20c 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 3dbcbda8133..402bc7501cb 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -628,7 +628,7 @@ $var=!$var; print '
".$langs->trans("SuggestPaymentByRIBOnAccount").""; -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 ba4b76a7e2a..09b11f2c5cd 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 '
'.$langs->trans("LDAPDnContactActive").''; @@ -136,7 +136,7 @@ if ($conf->societe->enabled) } // Synchro adherentt active -if ($conf->adherent->enabled) +if (! empty($conf->adherent->enabled)) { $var=!$var; print '
'.$langs->trans("LDAPDnMemberActive").''; @@ -189,7 +189,7 @@ print ''.$langs->trans("LDAPServerExample").'
'.$langs->trans("LDAPServerPort").''; -if ($conf->global->LDAP_SERVER_PORT) +if (! empty($conf->global->LDAP_SERVER_PORT)) { print ''; } @@ -227,7 +227,7 @@ print ''.$langs->trans("LDAPAdminDnExample").'
'.$langs->trans("LDAPPassword").''; -if ($conf->global->LDAP_ADMIN_PASS) +if (! empty($conf->global->LDAP_ADMIN_PASS)) { print '';// je le met en visible pour test } @@ -252,7 +252,7 @@ print ''; */ if (function_exists("ldap_connect")) { - if ($conf->global->LDAP_SERVER_HOST) + if (! empty($conf->global->LDAP_SERVER_HOST)) { print ''.$langs->trans("LDAPTestConnect").'

'; } diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 83dcb2c50c4..61a1b2fa3a7 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 9a23e3f968d..8a9c4759568 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 b2341019ead..6d869ba7a78 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -627,7 +627,7 @@ else print ''.$langs->trans("DoTestSend").''; - if ($conf->fckeditor->enabled) + if (! empty($conf->fckeditor->enabled)) { print ''.$langs->trans("DoTestSendHTML").''; } diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index bee489b5454..453acee46fe 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -160,7 +160,7 @@ print '
'; * 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 5d1c218f6a3..4413ab2c51b 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -301,7 +301,7 @@ $var=!$var; print "
'.$langs->trans("DoNotStoreClearPassword").''; -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 ''.$langs->trans("Activate").''; print "'; if ($allow_disable_encryption) diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index deb55ee311c..cc604597d17 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -133,7 +133,7 @@ print "  
 
'; print ''; -if ($conf->banque->enabled) +if (! empty($conf->banque->enabled)) { $var=!$var; print ''; @@ -126,7 +126,7 @@ if ($conf->banque->enabled) print ''; } -if ($conf->stock->enabled) +if (! empty($conf->stock->enabled)) { $var=!$var; print ''; @@ -135,7 +135,7 @@ if ($conf->stock->enabled) print ''; } -if ($conf->service->enabled) +if (! empty($conf->service->enabled)) { $var=! $var; print ''; print "\n"; -if ($conf->stock->enabled) +if (! empty($conf->stock->enabled)) { $langs->load("stocks"); print ""; diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index fcd8eda6873..bb1df0af089 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 a50a3a53896..a69ded5360d 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 '
'; -if ($conf->syslog->enabled) +if (! empty($conf->syslog->enabled)) { print ''.$langs->trans("CashDeskThirdPartyFo print ''; print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',1,1); print '
'.$langs->trans("CashDeskBankAccountForSell").'
'.$langs->trans("CashDeskIdWareHouse").'
'; diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index fb072f27d33..af0b033d81f 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 3d1f28768bf..89a358808e4 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 86be5906cc4..92ed6fc144b 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 4fe0a225e3f..3dac2d0f57d 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 '
'; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 34adae9b9d0..abf85d69cde 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 bde511d28ff..7fa1a71c5f3 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 ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { print ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { // Projet associe $langs->load("project"); @@ -927,7 +927,7 @@ if ($id) print ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { print '"; // 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 ''; - if ($conf->global->PRODUCT_SHOW_WHEN_CREATE) print ''; + if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) print ''; print ''; print ''; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index f5b3b5a611b..2b6e08bd406 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 ''; // Multiprice level - if ($conf->global->PRODUIT_MULTIPRICES) + if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print '
'.$langs->trans("Project").''; if ($act->fk_project) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 837a995c966..6cdb7a77580 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -760,7 +760,7 @@ if ($id) print '
'.$langs->trans("Project").''; if ($act->fk_project) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index bf0f58e5843..abd61760e75 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 69adcb1bd9e..19272a22e3d 100644 --- a/htdocs/comm/addpropal.php +++ b/htdocs/comm/addpropal.php @@ -212,7 +212,7 @@ if ($action == 'create') print "
 
 
'.$langs->trans("CreateEmptyPropal").'
'; print ''; // Multiprice level - if ($conf->global->PRODUIT_MULTIPRICES) + if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print '
'; @@ -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 ''.$langs->trans("AddTrip").''; } - 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 7ba7a2412fb..2bc4da5a112 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 f7da122ad49..da457735f9a 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 84a6e6eb5ca..10d126a62dd 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 5b4fc238342..d09ea9802e3 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 b341e8a9c11..fb6fa29902e 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 3a16307a760..0abde58fc86 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 '
'; print '
'; @@ -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 3280c456e4f..f72cae173d3 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -50,7 +50,7 @@ print ''; print '
'; -if ($conf->propal->enabled) +if (! empty($conf->propal->enabled)) { $var=false; print ''; @@ -164,7 +164,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire) */ print ''; // Delivery address - if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) + if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)) { print ''; } - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { print ''; print '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)) { ?> 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 4fa3a8274df..b9ec775b592 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)) { 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 3b0251ea91d..cc90227dcba 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)) { ?> - global->DISPLAY_MARGIN_RATES) {?> + global->DISPLAY_MARGIN_RATES)) {?> global->DISPLAY_MARK_RATES) {?> + if (! empty($conf->global->DISPLAY_MARK_RATES)) {?> diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index f0c11c07f87..5eafe1d4b27 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -32,7 +32,7 @@ global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>> 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)) { ?> 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)) { "> 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 2f674860440..b9e18d3533e 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 22240663b19..030efe333dc 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 c15fc75023c..42f1535dfde 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 8870d50c639..b3081991290 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 be5978f5a33..06109252a25 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 a4977cf9861..340e3d6dfd7 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -213,7 +213,7 @@ if ($id > 0 || ! empty($ref)) print ''; // Delivery address - if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) + if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)) { print ''; - if ($conf->categorie->enabled) + if (! empty($conf->categorie->enabled)) { print ''; print ''; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 7ee96daf980..d04923bce54 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 5e7ee4a4207..d0cbdc2180f 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -842,7 +842,7 @@ else print '
'; - 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 1e873ef9d9a..59333c02927 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -117,7 +117,7 @@ while ($objp = $db->fetch_object($result)) print '
'; -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 d24ac0c2e47..caac721333c 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 3640cee6279..02c6b2508e3 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 fe240ac2266..8b1d4c8aef1 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 83822aa2407..87d84d297d3 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 0caf1c80d63..d190a550834 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -178,7 +178,7 @@ if ($id > 0 || ! empty($ref)) print ''.$object->client->getNomUrl(1).'
'; print ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load('projects'); print ''; // Accountancy code - if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED) + if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) { print ''; print ''; @@ -563,7 +563,7 @@ else print ''; // Accountancy code - if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED) + if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) { print ''; print ''; diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 584afaa321f..18227bf825d 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 df453887ea1..754764fa32c 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 ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load('projects'); print ''; diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index fb6c8de4f5a..e6ec1a422ae 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 ''; $nbrows=11; - if ($conf->projet->enabled) $nbrows++; + if (! empty($conf->projet->enabled)) $nbrows++; // Date print '\n"; - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { // Si module projet actif print "'; $nbrows=12; - if ($conf->projet->enabled) $nbrows++; + if (! empty($conf->projet->enabled)) $nbrows++; // Date print "".'".'".''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { print "".''; } diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/liste.php index ced00f94c50..3a3a8d7a180 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ódulo_Donaciones'); @@ -160,7 +160,7 @@ if ($resql) print "\n"; print "\n"; print ''; - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { print "'."\n"; // Proforma - if ($conf->global->FACTURE_USE_PROFORMAT) + if (! empty($conf->global->FACTURE_USE_PROFORMAT)) { print ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load('projects'); print ''; print ''; print ''; - if ($conf->service->enabled) + if (! empty($conf->service->enabled)) { print ''; } @@ -2090,7 +2090,7 @@ if ($action == 'create') print ''; print ''; print ''; // 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 ''; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { print ''; - 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 974b266354c..fbf44961722 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 ''; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { if ($facture->type != 2) print ''; if ($facture->type == 2) print ''; @@ -589,10 +589,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { // print ''; diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 74d891a7764..3d23f896c0e 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 acd041cc5c3..96b13604708 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 ''; // Bank account -if ($conf->banque->enabled) +if (! empty($conf->banque->enabled)) { if ($object->bank_account) { @@ -355,7 +355,7 @@ print ''; print '
'; -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 714d8a20d59..e1d460e0051 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 ''; print ''; print ''; - if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { print '
'; @@ -213,7 +213,7 @@ if ($resql) print ''; print ''; - if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { print ''; // Bank account -if ($conf->banque->enabled) +if (! empty($conf->banque->enabled)) { if ($paiement->bank_account) { @@ -293,7 +293,7 @@ print ''; print '
'; /* -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 0081af46ecf..11c575f701d 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 c458f55813d..8a2e3228e37 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 7bff88b37a4..cfbf7a91568 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 23d01de6631..d7d14938a6f 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 71dbdb6c947..68bfe41d968 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.='
'; $description.=$langs->trans("RulesVATDueProducts"); //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); + //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='
'.$langs->trans("DepositsAreNotIncluded"); else $description.='
'.$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.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); + //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$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 a5e1693c8f2..765b0d77fb8 100644 --- a/htdocs/compta/tva/fiche.php +++ b/htdocs/compta/tva/fiche.php @@ -172,7 +172,7 @@ if ($_GET["action"] == 'create') // Amount print '
'; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { print ''; - 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 1bcd7cabb47..e323117091d 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.='
'; $description.=$langs->trans("RulesVATDueProducts"); //if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); + //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='
'.$langs->trans("DepositsAreNotIncluded"); else $description.='
'.$langs->trans("DepositsAreIncluded"); $description.='
('.$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.='
'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite'); - //if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); + //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$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 c839f7a24e1..bcfaa39be96 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 03a356a8a72..07d2ee9e5c2 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 ''; } - if ($conf->propal->enabled) + if (! empty($conf->propal->enabled)) { print ''; } - if ($conf->contrat->enabled) + if (! empty($conf->contrat->enabled)) { print ''; } - if ($conf->facture->enabled) + if (! empty($conf->facture->enabled)) { print ''; - if ($conf->mailing->enabled) + if (! empty($conf->mailing->enabled)) { $langs->load("mails"); print ''; @@ -857,28 +857,28 @@ else $object->load_ref_elements(); - if ($conf->commande->enabled) + if (! empty($conf->commande->enabled)) { print ''; } - if ($conf->propal->enabled) + if (! empty($conf->propal->enabled)) { print ''; } - if ($conf->contrat->enabled) + if (! empty($conf->contrat->enabled)) { print ''; } - if ($conf->facture->enabled) + if (! empty($conf->facture->enabled)) { print '"; - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { print '\n"; // Projet - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load("projects"); print '"; print ''; print ''; print ''; - if($conf->global->DISPLAY_MARGIN_RATES) + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) print ''; - if($conf->global->DISPLAY_MARK_RATES) + if (! empty($conf->global->DISPLAY_MARK_RATES)) print ''; print ''; //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) { @@ -2970,9 +2970,9 @@ abstract class CommonObject print ''; print ''; print ''; - if($conf->global->DISPLAY_MARGIN_RATES) + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) print ''; - if($conf->global->DISPLAY_MARK_RATES) + if (! empty($conf->global->DISPLAY_MARK_RATES)) print ''; print ''; print ''; @@ -2980,9 +2980,9 @@ abstract class CommonObject print ''; print ''; print ''; - if($conf->global->DISPLAY_MARGIN_RATES) + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) print ''; - if($conf->global->DISPLAY_MARK_RATES) + if (! empty($conf->global->DISPLAY_MARK_RATES)) print ''; print ''; //} @@ -2991,9 +2991,9 @@ abstract class CommonObject print ''; print ''; print ''; - if($conf->global->DISPLAY_MARGIN_RATES) + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) print ''; - if($conf->global->DISPLAY_MARK_RATES) + if (! empty($conf->global->DISPLAY_MARK_RATES)) print ''; print ''; print '
'; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 2c665ec982c..8d8a1354dd4 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 "
".$langs->trans("DeliveryDate").''; - 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 7b5e3391330..af38165d48a 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 ec94022d853..3cc4ded371b 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 '
'.$langs->trans('Project').''; diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index 65abe9ccb5f..490b228f25a 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -281,7 +281,7 @@ if ($action == 'create') print '
'.$langs->trans("AccountancyCode").'
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("Date").''; @@ -318,7 +318,7 @@ if ($action == 'create') $form->select_types_paiements('', 'modepaiement', 'CRDT', 0, 1); print "
".$langs->trans("Project").""; @@ -368,7 +368,7 @@ if (! empty($id) && $action == 'edit') print '
'.$langs->trans("Date").''; @@ -458,7 +458,7 @@ if (! empty($id) && $action != 'edit') $linkback = ''.$langs->trans("BackToList").''; $nbrows=12; - if ($conf->projet->enabled) $nbrows++; + if (! empty($conf->projet->enabled)) $nbrows++; // Ref print "
'.$langs->trans("Ref").''; @@ -502,7 +502,7 @@ if (! empty($id) && $action != 'edit') print "
'.$langs->trans("Status").''.$don->getLibStatut(4).'
'.$langs->trans("Project").''.$don->projet.'
".$objp->societe."".$donationstatic->getFullName($langs)."'.dol_print_date($db->jdate($objp->datedon),'day').'"; if ($objp->pid) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 4e928108813..dbb6b43703c 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1882,7 +1882,7 @@ if ($action == 'create') print '
'; print ''; @@ -1973,7 +1973,7 @@ if ($action == 'create') print '
'.$langs->trans('Project').''; @@ -2080,7 +2080,7 @@ if ($action == 'create') print ''.$langs->trans('Qty').''.$langs->trans('ReductionShort').'     '.$langs->trans('ServiceLimitedDuration').'
'; // 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 '% '; print ''; @@ -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 ''; print ''; print ''; - if ($conf->banque->enabled) print ''; + if (! empty($conf->banque->enabled)) print ''; print ''; print ''; print ''; @@ -2679,7 +2679,7 @@ else if ($id > 0 || ! empty($ref)) print dol_print_date($db->jdate($objp->dp),'day').''; $label=($langs->trans("PaymentType".$objp->payment_code)!=("PaymentType".$objp->payment_code))?$langs->trans("PaymentType".$objp->payment_code):$objp->payment_label; print ''; - 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 bac78a55c78..1ad6c0480ba 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 ''; $nbrows=5; - if ($conf->projet->enabled) $nbrows++; + if (! empty($conf->projet->enabled)) $nbrows++; print ''; // Projet - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load("projects"); print ''; diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index f81252e39e6..7b60344fc06 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 a0ffe2b9035..3fea5bcd1c1 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 '
'.($object->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('BankAccount').''.$langs->trans('Amount').' 
'.$label.' '.$objp->num_paiement.''; /* @@ -366,7 +366,7 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans('Status').''.($object->getLibStatut(4,$totalpaye)).'
'; print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -388,7 +388,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $thirdpartystatic->client=1; print $thirdpartystatic->getNomUrl(1,'customer',44); print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -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 ''; } print '
'.$langs->trans("BoxTitleLastCustomerBills",$max).''.$langs->trans("AmountHT").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("DateModificationShort").' '.price($obj->total).''.price($obj->total).''.price($obj->total_ttc).''.dol_print_date($db->jdate($obj->tms),'day').''.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'
'.$langs->trans("NoInvoice").'

'; @@ -446,7 +446,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) print ''; print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -469,7 +469,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) $thirdpartystatic->fournisseur=1; print $thirdpartystatic->getNomUrl(1,'supplier',44); print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -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 ''; } print '
'.$langs->trans("BoxTitleLastSupplierBills",$max).''.$langs->trans("AmountHT").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("DateModificationShort").' '.price($obj->total_ht).''.price($obj->total_ht).''.price($obj->total_ttc).''.dol_print_date($db->jdate($obj->tms),'day').''.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3).'
'.$langs->trans("NoInvoice").'

'; @@ -742,7 +742,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us print ''; print ""; print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -781,7 +781,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us $societestatic->client=1; print $societestatic->getNomUrl(1,'customer',44); print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -795,7 +795,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us } print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -840,7 +840,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print '
'.$langs->trans("OrdersToBill").' ('.$num.')'.$langs->trans("AmountHT").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("ToBill").' '.price($obj->total_ht).''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->total_ttc-$obj->tot_fttc).''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,3).'
'.$langs->trans("Total").'   ('.$langs->trans("RemainderToBill").': '.price($tot_tobill).') '.price($tot_ht).''.price($tot_ht).''.price($tot_ttc).''.price($tot_tobill).' 
'; print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -880,7 +880,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $societestatic->client=1; print $societestatic->getNomUrl(1,'customer',44); print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -894,7 +894,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) } print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -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 ''; } print '
'.$langs->trans("BillsCustomersUnpaid",$num).' ('.$num.')'.$langs->trans("AmountHT").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("Received").' '.price($obj->total).''.price($obj->total).''.price($obj->total_ttc).''.price($obj->am).''.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'
'.$langs->trans("Total").'   ('.$langs->trans("RemainderToTake").': '.price($total_ttc-$totalam).') '.price($total).''.price($total).''.price($total_ttc).''.price($totalam).' 
'.$langs->trans("NoInvoice").'

'; @@ -944,7 +944,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) print ''; print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -967,7 +967,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) $societestatic->nom=$obj->nom; $societestatic->client=0; print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -980,7 +980,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) } print ''; - if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -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 ''; } print '
'.$langs->trans("BillsSuppliersUnpaid",$num).' ('.$num.')'.$langs->trans("AmountHT").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("Paid").' '.$societestatic->getNomUrl(1, 'supplier', 44).''.price($obj->total_ht).''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->am).''.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3).'
'.$langs->trans("Total").'   ('.$langs->trans("RemainderToPay").': '.price($total_ttc-$totalam).') '.price($total).''.price($total).''.price($total_ttc).''.price($totalam).' 
'.$langs->trans("NoInvoice").'

'; diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 3ad10ec2d08..8dded9ae73b 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 e62dc08adc9..ed0b7e11752 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.='
'.$langs->trans("WarningDepositsNotIncluded"); + if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$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.='
'.$langs->trans("WarningDepositsNotIncluded"); + if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$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 cccee441ac5..ce8ce775cf3 100644 --- a/htdocs/compta/localtax/fiche.php +++ b/htdocs/compta/localtax/fiche.php @@ -168,7 +168,7 @@ if ($_GET["action"] == 'create') // Amount print '
'.$langs->trans("Amount").'
'.$langs->trans("Account").''; $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant @@ -227,7 +227,7 @@ if ($id) print '
'.$langs->trans("Amount").''.price($vatpayment->amount).'
'.$langs->trans('AccountToCredit').''.$langs->trans('AccountToDebit').'
'; print '

'.$langs->trans("ClosePaidInvoicesAutomatically"); - /*if ($conf->prelevement->enabled) + /*if (! empty($conf->prelevement->enabled)) { $langs->load("withdrawals"); - if ($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS) print '
'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed"); + if (! empty($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS)) print '
'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed"); }*/ print '


'; // print '
'; print ''.price($objp->amount).''; if ($objp->statut == 0) print ''; diff --git a/htdocs/compta/payment_sc/fiche.php b/htdocs/compta/payment_sc/fiche.php index de865468d60..222c78a7f1d 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 '
'.$langs->trans('Amount').''.pr print '
'.$langs->trans('Note').''.nl2br($paiement->note).'
'.$langs->trans("Amount").'
'.$langs->trans("Account").''; $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant @@ -236,7 +236,7 @@ if ($id) print '
'.$langs->trans("Amount").''.price($vatpayment->amount).'
'.$langs->trans("ContactForOrders").''; print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder"); print '
'.$langs->trans("ContactForProposals").''; print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal"); print '
'.$langs->trans("ContactForContracts").''; print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract"); print '
'.$langs->trans("ContactForInvoices").''; 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").'
'; - 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 '
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').''.$langs->trans("NbOfEMailingsReceived").'
'.$langs->trans("ContactForOrders").''; print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder"); print '
'.$langs->trans("ContactForProposals").''; print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal"); print '
'.$langs->trans("ContactForContracts").''; print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract"); print '
'.$langs->trans("ContactForInvoices").''; print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice"); diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 4c9ba902cd0..e49c8b3e5a3 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 "
'.$langs->trans("Project").''; select_projects($soc->id,GETPOST("projectid"),"projectid"); @@ -767,7 +767,7 @@ else print ''.dol_print_date($object->date_contrat,"dayhour")."
'; @@ -1276,7 +1276,7 @@ else print "
'; // 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 c9dfed825d6..eae960970a9 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 f0645659062..627ffad350f 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 d4a701ca5ef..ff082c23b23 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 2da3527aa6f..ae7efcac3b9 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 bf577e76229..29e58b35135 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2959,9 +2959,9 @@ abstract class CommonObject print ''.$langs->trans('SellingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('Margin').''.$langs->trans('MarginRate').''.$langs->trans('MarkRate').'
'.price($marginInfo['pv_products']).''.price($marginInfo['pa_products']).''.price($marginInfo['margin_on_products']).''.(($marginInfo['margin_rate_products'] == '')?'n/a':price($marginInfo['margin_rate_products']).'%').''.(($marginInfo['mark_rate_products'] == '')?'n/a':price($marginInfo['mark_rate_products']).'%').'
'.price($marginInfo['pv_services']).''.price($marginInfo['pa_services']).''.price($marginInfo['margin_on_services']).''.(($marginInfo['margin_rate_services'] == '')?'n/a':price($marginInfo['margin_rate_services']).'%').''.(($marginInfo['mark_rate_services'] == '')?'n/a':price($marginInfo['mark_rate_services']).'%').'
'.price($marginInfo['pv_total']).''.price($marginInfo['pa_total']).''.price($marginInfo['total_margin']).''.(($marginInfo['total_margin_rate'] == '')?'n/a':price($marginInfo['total_margin_rate']).'%').''.(($marginInfo['total_mark_rate'] == '')?'n/a':price($marginInfo['total_mark_rate']).'%').'
'; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index b7f3bb0e6b4..07f51ebd72c 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 35da1b90beb..9e06d62ff74 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 30989a272e7..1e8003d22fb 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 '
'; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 00ff7db6ddd..0e00f836eee 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 07e7550994b..8d3990942c1 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 a5200a320d9..981ae2f25ef 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 2bd4fd8779b..f344ef8681d 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 33e562c464f..7cbcdb4854d 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 c78fb19af09..06e421db700 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 3d1b69279f6..5f402fad68c 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 caf9d7ef43d..7fb81297cb3 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 7bd6e542a42..eab91d27d4b 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 512c358b3c3..ae95eafd3e6 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&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&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&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer); $newmenu->add("/product/liste.php?leftmenu=product&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&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&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); } $newmenu->add("/product/liste.php?leftmenu=service&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&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 f031ea2d4aa..66115ca5068 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 c54a539f297..c56f20f8773 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 e46a7bfc2b6..90e1ab86aeb 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 f6b29b52b0a..5d693e675a8 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 c86a75652a5..922685bf649 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 906a1a74e37..d569c780512 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 f30b676cfc0..ce7e5db6dfb 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 d796fee8441..78e28d24fec 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 2804e78fb6a..b723206ef5c 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 653ec0d4344..d12c18b8ee2 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 0cda5ac63b7..452e94f9ad0 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 663c7198755..3e6d48bd29d 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 78a16adf15f..6b9aa3a0279 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 eebe473fd1e..51f5bf88b69 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 e80973afd67..cf01009e6c2 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 575d0172402..2b6ab211153 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 72d5c19b697..dea29ca8bdb 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 86ff65a677a..5f15d9b86dc 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 6213ed5fd3a..f35957f44e5 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 b238ee3cfe6..d18c14b6b6d 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 fc96075f430..63b470a28a1 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 652082cc57a..76a7d0f7fe9 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 9e8e5bdd064..3067a82ae45 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 013d6adb8c3..6dd54d977a8 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)) { ?> trans('BuyingPrice'); ?> "> pa_ht); ?>pa_ht == 0)?'n/a':price($line->marge_tx).'%'); ?> marque_tx).'%'; ?> trans('BuyingPrice'); ?>
'; print ''; print ''; print ''; - if ($conf->stock->enabled) + if (! empty($conf->stock->enabled)) { print ''; } @@ -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)?'
'.dol_htmlentitiesbr($line->desc):''; } @@ -800,7 +800,7 @@ if ($action == 'create') print ''; // Stock - if ($conf->stock->enabled) + if (! empty($conf->stock->enabled)) { print ''; //print ''; - if ($conf->stock->enabled) + if (! empty($conf->stock->enabled)) { print ''; } @@ -1266,7 +1266,7 @@ else //print ''; // Entrepot source - if ($conf->stock->enabled) + if (! empty($conf->stock->enabled)) { print ''; print ''; - if ($conf->stock->enabled) print ''; + if (! empty($conf->stock->enabled)) print ''; print ''; } print '
'; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 08d397603eb..0e09e08a240 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 ''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("QtyToShip").''.$langs->trans("Warehouse").' / '.$langs->trans("Stock").''; if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) @@ -1166,7 +1166,7 @@ else print ''.$langs->trans("CalculatedVolume").''.$langs->trans("Size").''.$langs->trans("WarehouseSource").''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").''; if ($lines[$i]->entrepot_id > 0) diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 1e0fa24744b..cfe6d41abba 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 ''; @@ -314,7 +314,7 @@ if ($id > 0 || ! empty($ref)) print ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load('projects'); print ''; print ''; print ''; - if ($conf->stock->enabled) + if (! empty($conf->stock->enabled)) { print ''; } @@ -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)?'
'.dol_htmlentitiesbr($objp->description):''; } @@ -624,7 +624,7 @@ if ($id > 0 || ! empty($ref)) print ''; - if ($conf->stock->enabled) + if (! empty($conf->stock->enabled)) { print ''; print ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load("project"); @@ -917,7 +917,7 @@ else if ($id > 0 || ! empty($ref)) print ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load('projects'); print ''; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 18dd0fcd216..8c21eb7db28 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 ecf15a06384..e1480bd6636 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)?'
'.dol_htmlentitiesbr($line->description):''; + if (! empty($conf->global->PRODUIT_DESC_IN_FORM)) print ($line->description && $line->description!=$product_static->libelle)?'
'.dol_htmlentitiesbr($line->description):''; } // Description - Editor wysiwyg @@ -1509,7 +1509,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''."\n"; // Proforma - if ($conf->global->FACTURE_USE_PROFORMAT) + if (! empty($conf->global->FACTURE_USE_PROFORMAT)) { print ''; print ''; print ''; - if ($conf->banque->enabled) print ''; + if (! empty($conf->banque->enabled)) print ''; print ''; print ''; print ''; @@ -1399,7 +1399,7 @@ else print ''; print '\n"; print ''; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { $bankaccountstatic->id=$objp->baid; $bankaccountstatic->ref=$objp->ref; @@ -1485,7 +1485,7 @@ else print ''; // Project - if ($conf->projet->enabled) + if (! empty($conf->projet->enabled)) { $langs->load('projects'); print ''; @@ -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)?'
'.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)?'
'.dol_htmlentitiesbr($object->lines[$i]->description):''; } // Description - Editor wysiwyg @@ -1784,7 +1784,7 @@ else print ''; print ''; print ''; - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { print ''; // 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 b3935d7c6e6..a6db039d2c9 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 956dbf82b7e..5c99d0d0bc6 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 e8b601fe43c..d5b40c491cb 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -197,7 +197,7 @@ if ($result > 0) // Amount print ''; - if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { print ''; } @@ -208,7 +208,7 @@ if ($result > 0) print ''; // Bank account - if ($conf->banque->enabled) + if (! empty($conf->banque->enabled)) { if ($object->bank_account) { @@ -308,7 +308,7 @@ if ($result > 0) */ print '
'; - 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 653093695d3..2b230edf3c1 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 05451b8b751..8a56d9e9fe3 100644 --- a/htdocs/fourn/product/index.php +++ b/htdocs/fourn/product/index.php @@ -78,13 +78,13 @@ if ($resql) print '
'; @@ -389,7 +389,7 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("KeepToShip").''.$langs->trans("Stock").'
'.$langs->trans("WarehouseSource").''; diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php index 2501f4cd88f..1e0a61b429f 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 b8bed3409d7..5de9d2203c6 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 '
'; 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 34e2cf02795..52509de0d45 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 '
'; print ''; @@ -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 '
'.$langs->trans('Payments').''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('BankAccount').''.$langs->trans('Amount').' 
'.img_object($langs->trans('ShowPayment'),'payment').' '.dol_print_date($db->jdate($objp->dp),'day')."'.$objp->paiement_type.' '.$objp->num_paiement.'
'.$langs->trans('AmountTTC').''.price($object->total_ttc).''.$langs->trans('Currency'.$conf->currency).'
'; 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 ea3a11927ab..8e45d645873 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 ''; print '
'.$langs->trans('Numero').'
'.$langs->trans('Account').''; $form->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',2); diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 488f260237a..d085c478710 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 '
'.$langs->trans('Amount').''.price($object->montant).' '.$langs->trans('Currency'.$conf->currency).'
'.$langs->trans('Status').''.$object->getLibStatut(4).'
'; print ''; -if ($conf->product->enabled) +if (! empty($conf->product->enabled)) { print ""; print ''; print ""; } -if ($conf->service->enabled) +if (! empty($conf->service->enabled)) { print ""; print ''; diff --git a/htdocs/fourn/product/photos.php b/htdocs/fourn/product/photos.php index 7dc2d69c44d..acaf3227e3c 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 e653f6f59d1..3a26cda4c67 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 5c36dbd04fd..d6e005ea5dd 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -314,7 +314,7 @@ if ($action == 'create') print ''; print ''; print ''; - if ($conf->stock->enabled) + if (! empty($conf->stock->enabled)) { print ''; } @@ -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 af7821b5bd2..f7965619ac3 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -194,23 +194,23 @@ print '

'; print ''.$langs->trans("FollowingUrlAreAvailableToMakePayments").':
'; print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount",$servicename).':
'; print ''.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?amount=9.99&tag=your_free_tag'."
\n"; -if ($conf->commande->enabled) +if (! empty($conf->commande->enabled)) { print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder",$servicename).':
'; print ''.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=order&ref=order_ref'."
\n"; } -if ($conf->facture->enabled) +if (! empty($conf->facture->enabled)) { print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice",$servicename).':
'; print ''.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=invoice&ref=invoice_ref'."
\n"; // print $langs->trans("SetupPayBoxToHavePaymentCreatedAutomatically",$langs->transnoentitiesnoconv("FeatureNotYetAvailable"))."
\n"; } -if ($conf->contrat->enabled) +if (! empty($conf->contrat->enabled)) { print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine",$servicename).':
'; print ''.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=contractline&ref=contractline_ref'."
\n"; } -if ($conf->adherent->enabled) +if (! empty($conf->adherent->enabled)) { print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription",$servicename).':
'; print ''.DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=membersubscription&ref=member_ref'."
\n"; diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index 925fda59120..13247bc1637 100755 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -47,7 +47,7 @@ function llxHeaderPaybox($title, $head = "") print ''."\n"; print "".$title."\n"; if ($head) print $head."\n"; - if ($conf->global->PAYBOX_CSS_URL) print ''."\n"; + if (! empty($conf->global->PAYBOX_CSS_URL)) print ''."\n"; else { print ''."\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 5a2b28b722b..c94d49d4da0 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -283,7 +283,7 @@ $token=''; print ''.$langs->trans("FollowingUrlAreAvailableToMakePayments").':
'; print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount",$servicename).':
'; print ''.getPaypalPaymentUrl(1,'free')."

\n"; -if ($conf->commande->enabled) +if (! empty($conf->commande->enabled)) { print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder",$servicename).':
'; print ''.getPaypalPaymentUrl(1,'order')."
\n"; @@ -305,7 +305,7 @@ if ($conf->commande->enabled) } print '
'; } -if ($conf->facture->enabled) +if (! empty($conf->facture->enabled)) { print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice",$servicename).':
'; print ''.getPaypalPaymentUrl(1,'invoice')."
\n"; @@ -327,7 +327,7 @@ if ($conf->facture->enabled) } print '
'; } -if ($conf->contrat->enabled) +if (! empty($conf->contrat->enabled)) { print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine",$servicename).':
'; print ''.getPaypalPaymentUrl(1,'contractline')."
\n"; @@ -349,7 +349,7 @@ if ($conf->contrat->enabled) } print '
'; } -if ($conf->adherent->enabled) +if (! empty($conf->adherent->enabled)) { print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription",$servicename).':
'; print ''.getPaypalPaymentUrl(1,'membersubscription')."
\n"; diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index dbaadbce9fb..72843f6aeeb 100755 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -46,7 +46,7 @@ function llxHeaderPaypal($title, $head = "") print ''."\n"; print "".$title."\n"; if ($head) print $head."\n"; - if ($conf->global->PAYPAL_CSS_URL) print ''."\n"; + if (! empty($conf->global->PAYPAL_CSS_URL)) print ''."\n"; else { print ''."\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 07e0e2bbb3f..ad8aae0d05e 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 65439ec797b..88738b97f51 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 -stock->enabled) { ?> +stock->enabled)) { ?> diff --git a/htdocs/product/canvas/product/tpl/card_edit.tpl.php b/htdocs/product/canvas/product/tpl/card_edit.tpl.php index 2fd2d3a5fc1..a60865e0867 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); -stock->enabled) { ?> +stock->enabled)) { ?> diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 5b9d06cb8cc..54995bb2e32 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 15d1cfc6b27..407c2869225 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 '
'.$productstatic->ref.'
'; //print $productstatic->getNomUrl(1).'
'; //print $value[0]; // This contains a tr line. print ''; print ''; - if ($conf->stock->enabled) print ''; + if (! empty($conf->stock->enabled)) print ''; print ''; } print '
'.$langs->trans("Statistics").'
'.$langs->trans("Products").''.round($prodser[0]).'
'.$langs->trans("Services").''.round($prodser[1]).'Quan. commandeeQuan. livreeQuan. a livrer'.$langs->trans("Stock").'selectarray('statut_buy',$statutarray,$object->status_tobuy); ?>
trans("StockLimit"); ?>
selectarray('statut_buy',$statutarray,$object->status_tobuy); ?>
trans("StockLimit"); ?>
'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')    '.$langs->trans("Stock").' : '.$productstatic->stock_reel.''.$langs->trans("Stock").' : '.$productstatic->stock_reel.'
'; @@ -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 '
'.$productstatic->ref.'
'; //print $productstatic->getNomUrl(1).'
'; //print $value[0]; // This contains a tr line. print '
'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')    '.$langs->trans("Stock").' : '.$productstatic->stock_reel.''.$langs->trans("Stock").' : '.$productstatic->stock_reel.'
'; @@ -345,7 +345,7 @@ if ($id || $ref) print '
'; $rowspan=1; - if ($conf->categorie->enabled) $rowspan++; + if (! empty($conf->categorie->enabled)) $rowspan++; print_fiche_titre($langs->trans("ProductToAddSearch"),'',''); print '
'; @@ -363,7 +363,7 @@ if ($id || $ref) print '
'; print ''; print '
'.$langs->trans("CategoryFilter").'   '.$form->select_all_categories(0,$catMere).'
'; print ''; -if ($conf->product->enabled) +if (! empty($conf->product->enabled)) { $statProducts = ""; $statProducts.= ''; @@ -126,7 +126,7 @@ if ($conf->product->enabled) $statProducts.= ''; $statProducts.= ""; } -if ($conf->service->enabled) +if (! empty($conf->service->enabled)) { $statServices = ""; $statServices.= ''; @@ -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 724b13a0467..cd0ce9ba307 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 ''; print ''; - if($conf->global->PRODUIT_MULTIPRICES) + if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print ''; } @@ -488,7 +488,7 @@ if ($result) print ""; // Price level - if ($conf->global->PRODUIT_MULTIPRICES) + if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print '"; } diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index b748d03069b..f4807cfb822 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 23e884c2e4a..dc3491d1e18 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -252,17 +252,17 @@ if ($id > 0 || $ref) print ''; // 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 '
'; 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 '
'; else $found=1; print $langs->trans("SuppliersOrdersRunning").': '.$stock_commande_fournisseur; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index ee236837a3e..18638682133 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 5ad4c62bf93..f692e633e93 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 febd6130f67..89c57e87139 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 acea9f714d0..afd0cb40c1d 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 5c24d29041d..d6d31201e17 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 6a72d73cb50..62c382460e7 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 '
'; - if ($conf->agenda->enabled) + if (! empty($conf->agenda->enabled)) { print ''.$langs->trans("AddAction").''; } diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajaxcompanies.php index b960eb0b087..874bda75d6f 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 3faba3cf2d8..e486e4c6fe9 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 d519f125c09..1133da8a79d 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++) {
-global->MAIN_MULTILANGS) { ?> +global->MAIN_MULTILANGS)) { ?> diff --git a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php index 4d89f95b8c8..76dbccd1019 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++) { -global->MAIN_MULTILANGS) { ?> +global->MAIN_MULTILANGS)) { ?> diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php index 1eaf013af0d..8d79db94ea7 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++) { -global->MAIN_MULTILANGS) { ?> +global->MAIN_MULTILANGS)) { ?> @@ -225,7 +225,7 @@ for ($i=1; $i<=4; $i++) { -adherent->enabled) { ?> +adherent->enabled)) { ?> diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index ac4e4cceef0..b84ebc82f98 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 @@ -global->MAIN_MULTILANGS) { ?> +global->MAIN_MULTILANGS)) { ?> diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php index 296869bbae3..597fb95ccc8 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']) { -global->MAIN_MULTILANGS) { ?> +global->MAIN_MULTILANGS)) { ?> diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index a47f3c7711f..1b680b809b0 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'); -global->MAIN_MULTILANGS) { ?> +global->MAIN_MULTILANGS)) { ?> @@ -166,7 +166,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); -adherent->enabled) { ?> +adherent->enabled)) { ?> diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index f51390d90b4..047a61f4e02 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 edca64dfcf8..2e8f659a738 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 fcc8a4f6efe..2d3fe14b97e 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 ''; diff --git a/htdocs/societe/info.php b/htdocs/societe/info.php index 28d626c37f2..5f8468fd1f6 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 00e1a182dfe..952d1c5e6ed 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 0a5888eb77c..f4a221fb098 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 ''; // Default language - if ($conf->global->MAIN_MULTILANGS) + if (! empty($conf->global->MAIN_MULTILANGS)) { print ''; // Default language - if ($conf->global->MAIN_MULTILANGS) + if (! empty($conf->global->MAIN_MULTILANGS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; print ''; diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 4913d6c7521..9002814e0b3 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 8cba8d76e4f..8ac5fde2fe4 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; -global->MAIN_JQUERY_JNOTIFY_BOTTOM) { ?> +global->MAIN_JQUERY_JNOTIFY_BOTTOM)) { ?> top: auto !important; bottom: 4px !important; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 475428486d2..26f8993c354 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; -global->MAIN_JQUERY_JNOTIFY_BOTTOM) { ?> +global->MAIN_JQUERY_JNOTIFY_BOTTOM)) { ?> top: auto !important; bottom: 4px !important; diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 1501cfe8899..54880874716 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; -global->MAIN_JQUERY_JNOTIFY_BOTTOM) { ?> +global->MAIN_JQUERY_JNOTIFY_BOTTOM)) { ?> top: auto !important; bottom: 4px !important; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 487557b939d..f49cdde8a78 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 4198f8c2a3f..3191ae10578 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 cf3776b6c10..d00ed40c564 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 bc47a4a8be8..163b0fb024a 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').' '.$url."
\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').' '.$url."
\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').' '.$url."
\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').' '.$url."
\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').' '.$url."
\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').' '.$url."
\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').' '.$url."
\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').' '.$url."
\n"; diff --git a/htdocs/webservices/index.php b/htdocs/webservices/index.php index a448425ac26..f584fd32ce4 100644 --- a/htdocs/webservices/index.php +++ b/htdocs/webservices/index.php @@ -53,17 +53,17 @@ if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) print ''.$langs->trans("WSDLCanBeDownloadedHere").':
'; $url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php?wsdl'; print img_picto('','object_globe.png') . ' ' . $url . "
\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') . ' ' . $url . "
\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') . ' ' . $url . "
\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') . ' ' . $url . "
\n"; @@ -77,17 +77,17 @@ print '
'; print ''.$langs->trans("EndPointIs").':
'; $url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php'; print img_picto('','object_globe.png') . ' ' . $url . "
\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') . ' ' . $url . "
\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') . ' ' . $url . "
\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') . ' ' . $url . "
\n";
'.$langs->trans("Statistics").'
'.$langs->trans("ProductsNotOnSell").''.round($prodser[0][0]).''.$langs->trans("ProductsOnSell").''.round($prodser[0][1]).'
'.$langs->trans("ServicesNotOnSell").''.round($prodser[1][0]).'
'.$langs->trans("AppliedPricesFrom").''.$langs->trans("MultiPriceLevelsName").'".dol_print_date($db->jdate($objp->dp),"dayhour")."'.$objp->price_level."
control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?>
trans("DefaultLang"); ?> control->tpl['select_lang']; ?>control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?>
trans("DefaultLang"); ?> control->tpl['select_lang']; ?>control->tpl['effectif']; ?>
trans("DefaultLang"); ?> control->tpl['default_lang']; ?>control->tpl['sales_representatives']; ?>
trans("LinkedToDolibarrMember"); ?> control->tpl['linked_member']; ?>
trans("DefaultLang"); ?> control->tpl['select_lang']; ?>
trans("DefaultLang"); ?> control->tpl['select_lang']; ?>control->tpl['typent']; ?>
trans("DefaultLang"); ?> control->tpl['default_lang']; ?>control->tpl['sales_representatives']; ?>
trans("LinkedToDolibarrMember"); ?> control->tpl['linked_member']; ?>
'.$langs->trans("Capital").' '.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; print $formadmin->select_language($object->default_lang,'default_lang',0,0,1); @@ -1677,7 +1677,7 @@ else print '
'.$langs->trans("DefaultLang").''; @@ -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 '
'.$langs->trans("LinkedToDolibarrMember").'