Skip to content

Commit

Permalink
Forgot that MAIN_SHOW_STATE_CODE is not just 0 or 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ruistrecht-alt committed Feb 7, 2018
1 parent 3a7cb43 commit ecea8d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/core/class/html.formcompany.class.php
Expand Up @@ -267,7 +267,8 @@ function select_state($selected='',$country_codeid=0, $htmlname='state_id')
}

// 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:''));
}
Expand Down

0 comments on commit ecea8d6

Please sign in to comment.