diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 019bea5d0d3..9b6e36ba4cc 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -499,7 +499,7 @@ class Adherent extends CommonObject // Envoi mail confirmation $from = $conf->email_from; - if (!empty(getDolGlobalString('ADHERENT_MAIL_FROM'))) { + if (getDolGlobalString('ADHERENT_MAIL_FROM')) { $from = getDolGlobalString('ADHERENT_MAIL_FROM'); } diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 66df8bd59f1..e72b87ff7f6 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -189,7 +189,7 @@ $message .= ''; $message .= ajax_autoselect('webdavpublicurl'); $message .= '
'; -if (!empty(getDolGlobalString('DAV_ALLOW_PUBLIC_DIR'))) { +if (getDolGlobalString('DAV_ALLOW_PUBLIC_DIR')) { $urlEntity = (isModEnabled('multicompany') ? '?entity=' . $conf->entity : ''); $url = '' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . ''; diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index a6d0f3a3f0b..a640370dc7b 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -382,7 +382,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { // Show progression print ''.$langs->trans("TicketsShowProgression").''; print ''; - if (empty(getDolGlobalInt('TICKET_SHOW_PROGRESSION'))) { + if (!getDolGlobalInt('TICKET_SHOW_PROGRESSION')) { print '' . img_picto($langs->trans('Disabled'), 'switch_off') . ''; } else { print '' . img_picto($langs->trans('Enabled'), 'switch_on') . ''; diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 2a943073314..d4d618586e5 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -396,7 +396,7 @@ class FormAccounting extends Form $num_rows = $this->db->num_rows($resql); - if ($num_rows == 0 && (empty(getDolGlobalInt('CHARTOFACCOUNTS')) || getDolGlobalInt('CHARTOFACCOUNTS') < 0)) { + if ($num_rows == 0 && getDolGlobalInt('CHARTOFACCOUNTS') <= 0) { $langs->load("errors"); $showempty = $langs->trans("ErrorYouMustFirstSetupYourChartOfAccount"); } else { diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 168a00f6ab0..50efa0e9612 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -272,7 +272,7 @@ if ($action == 'presend') { if (is_object($object) && is_object($object->thirdparty)) { $checkRead= 'load("mymodule@mymodule"); - if (empty(getDolGlobalString('MYMODULE_MYOBJECT_ADDON'))) { + if (!getDolGlobalString('MYMODULE_MYOBJECT_ADDON')) { $conf->global->MYMODULE_MYOBJECT_ADDON = 'mod_myobject_standard'; } - if (!empty(getDolGlobalString('MYMODULE_MYOBJECT_ADDON'))) { + if (getDolGlobalString('MYMODULE_MYOBJECT_ADDON')) { $mybool = false; $file = getDolGlobalString('MYMODULE_MYOBJECT_ADDON').".php"; diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 647f7798b3d..02d38b87bbe 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -411,8 +411,8 @@ class modMyModule extends DolibarrModules $this->import_convertvalue_array[$r] = array( 't.ref' => array( 'rule'=>'getrefifauto', - 'class'=>(empty(getDolGlobalString('MYMODULE_MYOBJECT_ADDON')) ? 'mod_myobject_standard' : getDolGlobalString('MYMODULE_MYOBJECT_ADDON')), - 'path'=>"/core/modules/commande/".(empty(getDolGlobalString('MYMODULE_MYOBJECT_ADDON')) ? 'mod_myobject_standard' : getDolGlobalString('MYMODULE_MYOBJECT_ADDON')).'.php' + 'class'=>(!getDolGlobalString('MYMODULE_MYOBJECT_ADDON') ? 'mod_myobject_standard' : getDolGlobalString('MYMODULE_MYOBJECT_ADDON')), + 'path'=>"/core/modules/commande/".(!getDolGlobalString('MYMODULE_MYOBJECT_ADDON') ? 'mod_myobject_standard' : getDolGlobalString('MYMODULE_MYOBJECT_ADDON')).'.php' 'classobject'=>'MyObject', 'pathobject'=>'/mymodule/class/myobject.class.php', ), diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index 0063ba76b73..6767e6784ed 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -163,7 +163,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // Scan directories $nbofiles = count($listoffiles); - if (!empty(getDolGlobalString('MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH'))) { + if (getDolGlobalString('MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH')) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index 5dca1a952b1..f24067f7547 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -179,7 +179,7 @@ class pdf_standard_myobject extends ModelePDFMyObject // Load translation files required by the page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); - if (!empty(getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) && $outputlangs->defaultlang != getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) { + if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && $outputlangs->defaultlang != getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) { global $outputlangsbis; $outputlangsbis = new Translate('', $conf); $outputlangsbis->setDefaultLang(getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')); diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index b93c503fda4..0a2fcc6c339 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -187,7 +187,7 @@ $form = new Form($db); if ($object->id > 0) { $title = $langs->trans("Agenda"); - //if (!empty(getDolGlobalString('MAIN_HTML_TITLE')) && preg_match('/thirdpartynameonly/',getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) $title=$object->name." - ".$title; + //if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/',getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) $title=$object->name." - ".$title; $help_url = 'EN:Module_Agenda_En|DE:Modul_Terminplanung'; llxHeader('', $title, $help_url);