sierra_leone_694_1.cif 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. function sierra_leone_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' => 694,
  8. 'country_name' => 'Sierra Leone',
  9. 'country_iso_code_2' => 'SL',
  10. 'country_iso_code_3' => 'SLE',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(694, 'SL-W', 'Western Area (Freetown)'),
  17. array(694, 'SL-E', 'Eastern'),
  18. array(694, 'SL-N', 'Northern'),
  19. array(694, 'SL-S', 'Southern'),
  20. );
  21. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  22. foreach ($zones as $zone) {
  23. $query->values($zone);
  24. }
  25. $query->execute();
  26. // Set address format
  27. uc_set_address_format(
  28. 694,
  29. "!company\r\n".
  30. "!first_name !last_name\r\n".
  31. "!street1\r\n".
  32. "!street2\r\n".
  33. "!city, !zone_name !postal_code\r\n".
  34. "!country_name_if"
  35. );
  36. }