From ecea8d698c3c83e98588e9e8272642f8f574f86b Mon Sep 17 00:00:00 2001 From: Rui Strecht Date: Wed, 7 Feb 2018 16:07:33 +0000 Subject: [PATCH] Forgot that MAIN_SHOW_STATE_CODE is not just 0 or 1 --- htdocs/core/class/html.formcompany.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 6d4547eb68c..7e69d7c7ca0 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -267,7 +267,8 @@ class FormCompany } // Si traduction existe, on l'utilise, sinon on prend le libelle par defaut - if(!empty($conf->global->MAIN_SHOW_STATE_CODE) && $conf->global->MAIN_SHOW_STATE_CODE == 1) { + if(!empty($conf->global->MAIN_SHOW_STATE_CODE) && + ($conf->global->MAIN_SHOW_STATE_CODE == 1 || $conf->global->MAIN_SHOW_STATE_CODE == 2 || $conf->global->MAIN_SHOW_STATE_CODE === 'all')) { if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1) { $out.= $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:'')); }