Index: language_import_helper.php =================================================================== --- language_import_helper.php (revision 13557) +++ language_import_helper.php (working copy) @@ -267,28 +267,30 @@ ORDER BY `Event`, `Type`'; $events = $this->Conn->Query($sql, 'EventId'); - // countries - $sql = 'SELECT * - FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . ' - WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' - ORDER BY `IsoCode`'; - $countries = $this->Conn->Query($sql, 'CountryStateId'); + if (in_array('Core', $module_ids)) { + // countries + $sql = 'SELECT * + FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . ' + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY `IsoCode`'; + $countries = $this->Conn->Query($sql, 'CountryStateId'); - // states - $sql = 'SELECT * - FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . ' - WHERE Type = ' . DESTINATION_TYPE_STATE . ' - ORDER BY `IsoCode`'; - $states = $this->Conn->Query($sql, 'CountryStateId'); + // states + $sql = 'SELECT * + FROM ' . $this->Application->getUnitOption('country-state', 'TableName') . ' + WHERE Type = ' . DESTINATION_TYPE_STATE . ' + ORDER BY `IsoCode`'; + $states = $this->Conn->Query($sql, 'CountryStateId'); - foreach ($states as $state_id => $state_data) { - $country_id = $state_data['StateCountryId']; + foreach ($states as $state_id => $state_data) { + $country_id = $state_data['StateCountryId']; - if (!array_key_exists('States', $countries[$country_id])) { - $countries[$country_id]['States'] = Array (); + if (!array_key_exists('States', $countries[$country_id])) { + $countries[$country_id]['States'] = Array (); + } + + $countries[$country_id]['States'][] = $state_id; } - - $countries[$country_id]['States'][] = $state_id; } foreach ($languages as $language_id => $language_info) { @@ -353,7 +355,7 @@ $ret .= "\t\t" . '' . "\n"; } - if ($countries) { + if (in_array('Core', $module_ids) && $countries) { $ret .= "\t\t" . '' . "\n"; foreach ($countries as $country_id => $country_data) { $translation = $country_data['l' . $language_id . '_Name'];