falkland_islands_238_2.cif 964 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. function falkland_islands_install() {
  3. // Make the entry in the country table.
  4. // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  5. db_insert('uc_countries')
  6. ->fields(array(
  7. 'country_id' => 238,
  8. 'country_name' => 'Falkland Islands (Malvinas)',
  9. 'country_iso_code_2' => 'FK',
  10. 'country_iso_code_3' => 'FLK',
  11. 'version' => 2,
  12. ))
  13. ->execute();
  14. // No zones
  15. // Set address format
  16. uc_set_address_format(
  17. 238,
  18. "!company\r\n".
  19. "!first_name !last_name\r\n".
  20. "!street1\r\n".
  21. "!street2\r\n".
  22. "!city, !zone_name !postal_code\r\n".
  23. "!country_name_if"
  24. );
  25. }
  26. function falkland_islands_update($version) {
  27. switch ($version) {
  28. case 2:
  29. // Correct ISO-3166-1 country name
  30. db_update('uc_countries')
  31. ->fields(array('country_name' => 'Falkland Islands (Malvinas)'))
  32. ->condition('country_id', 238)
  33. ->execute();
  34. break;
  35. }
  36. }