[-] FO : Do not suggest states that are not active

This commit is contained in:
gRoussac
2013-01-09 17:05:33 +01:00
parent f768081aa0
commit b672b3281e
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -482,7 +482,8 @@ class CarrierCore extends ObjectModel
$countries[$country['id_country']] = $country;
foreach ($states as &$state)
if (isset($countries[$state['id_country']])) /* Does not keep the state if its country has been disabled and not selected */
$countries[$state['id_country']]['states'][] = $state;
if ($state['active'] == 1)
$countries[$state['id_country']]['states'][] = $state;
return $countries;
}