Commit 48f3a179 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1514647: Update country list to reflect current world state



Some new countries, some split from Netherlands Antilles, some countries
changed their titles etc

Change-Id: I1ce8d31b8a75981a59546687cd395cc668d943c7
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent b305516e
......@@ -877,6 +877,7 @@ $string['country.bj'] = 'Benin';
$string['country.bm'] = 'Bermuda';
$string['country.bt'] = 'Bhutan';
$string['country.bo'] = 'Bolivia';
$string['country.bq'] = 'Bonaire';
$string['country.ba'] = 'Bosnia and Herzegovina';
$string['country.bw'] = 'Botswana';
$string['country.bv'] = 'Bouvet Island';
......@@ -906,6 +907,7 @@ $string['country.cr'] = 'Costa Rica';
$string['country.ci'] = 'Cote D\'ivoire';
$string['country.hr'] = 'Croatia';
$string['country.cu'] = 'Cuba';
$string['country.cw'] = 'Curacao';
$string['country.cy'] = 'Cyprus';
$string['country.cz'] = 'Czech Republic';
$string['country.dk'] = 'Denmark';
......@@ -944,7 +946,7 @@ $string['country.gn'] = 'Guinea';
$string['country.gw'] = 'Guinea-bissau';
$string['country.gy'] = 'Guyana';
$string['country.ht'] = 'Haiti';
$string['country.hm'] = 'Heard Island and Mcdonald Islands';
$string['country.hm'] = 'Heard Island and McDonald Islands';
$string['country.va'] = 'Holy See (Vatican City State)';
$string['country.hn'] = 'Honduras';
$string['country.hk'] = 'Hong Kong';
......@@ -974,7 +976,7 @@ $string['country.lv'] = 'Latvia';
$string['country.lb'] = 'Lebanon';
$string['country.ls'] = 'Lesotho';
$string['country.lr'] = 'Liberia';
$string['country.ly'] = 'Libyan Arab Jamahiriya';
$string['country.ly'] = 'Libya';
$string['country.li'] = 'Liechtenstein';
$string['country.lt'] = 'Lithuania';
$string['country.lu'] = 'Luxembourg';
......@@ -1004,7 +1006,6 @@ $string['country.na'] = 'Namibia';
$string['country.nr'] = 'Nauru';
$string['country.np'] = 'Nepal';
$string['country.nl'] = 'Netherlands';
$string['country.an'] = 'Netherlands Antilles';
$string['country.nc'] = 'New Caledonia';
$string['country.nz'] = 'New Zealand';
$string['country.ni'] = 'Nicaragua';
......@@ -1017,7 +1018,7 @@ $string['country.no'] = 'Norway';
$string['country.om'] = 'Oman';
$string['country.pk'] = 'Pakistan';
$string['country.pw'] = 'Palau';
$string['country.ps'] = 'Palestinian Territory, Occupied';
$string['country.ps'] = 'Palestine, State of';
$string['country.pa'] = 'Panama';
$string['country.pg'] = 'Papua New Guinea';
$string['country.py'] = 'Paraguay';
......@@ -1032,9 +1033,11 @@ $string['country.re'] = 'Reunion';
$string['country.ro'] = 'Romania';
$string['country.ru'] = 'Russian Federation';
$string['country.rw'] = 'Rwanda';
$string['country.bl'] = 'Saint Barthelemy';
$string['country.sh'] = 'Saint Helena';
$string['country.kn'] = 'Saint Kitts and Nevis';
$string['country.lc'] = 'Saint Lucia';
$string['country.mf'] = 'Saint Martin (French part)';
$string['country.pm'] = 'Saint Pierre and Miquelon';
$string['country.vc'] = 'Saint Vincent and The Grenadines';
$string['country.ws'] = 'Samoa';
......@@ -1042,16 +1045,18 @@ $string['country.sm'] = 'San Marino';
$string['country.st'] = 'Sao Tome and Principe';
$string['country.sa'] = 'Saudi Arabia';
$string['country.sn'] = 'Senegal';
$string['country.cs'] = 'Serbia and Montenegro';
$string['country.cs'] = 'Serbia';
$string['country.sc'] = 'Seychelles';
$string['country.sl'] = 'Sierra Leone';
$string['country.sg'] = 'Singapore';
$string['country.sx'] = 'Sint Maarten (Dutch part)';
$string['country.sk'] = 'Slovakia';
$string['country.si'] = 'Slovenia';
$string['country.sb'] = 'Solomon Islands';
$string['country.so'] = 'Somalia';
$string['country.za'] = 'South Africa';
$string['country.gs'] = 'South Georgia and The South Sandwich Islands';
$string['country.ss'] = 'South Sudan';
$string['country.es'] = 'Spain';
$string['country.lk'] = 'Sri Lanka';
$string['country.sd'] = 'Sudan';
......
......@@ -4337,5 +4337,17 @@ function xmldb_core_upgrade($oldversion=0) {
change_field_precision($table, $field);
}
if ($oldversion < 2016030300) {
log_debug('Removing obsolete Netherlands Antilles ".an" country type');
safe_require('artefact', 'internal');
if ($results = get_records_sql_assoc("SELECT * FROM {artefact} WHERE artefacttype = ? AND title = ?", array('country','an'))) {
foreach ($results as $result) {
$classname = generate_artefact_class_name($result->artefacttype);
$a = new $classname($result->id);
$a->delete();
}
}
}
return $status;
}
......@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2016021200;
$config->version = 2016030300;
$config->series = '16.04';
$config->release = '16.04dev';
$config->minupgradefrom = 2012080604;
......
......@@ -1916,6 +1916,7 @@ function getoptions_country() {
'bm',
'bt',
'bo',
'bq',
'ba',
'bw',
'bv',
......@@ -1944,6 +1945,7 @@ function getoptions_country() {
'cr',
'ci',
'hr',
'cw',
'cu',
'cy',
'cz',
......@@ -2043,7 +2045,6 @@ function getoptions_country() {
'nr',
'np',
'nl',
'an',
'nc',
'nz',
'ni',
......@@ -2071,9 +2072,11 @@ function getoptions_country() {
'ro',
'ru',
'rw',
'bl',
'sh',
'kn',
'lc',
'mf',
'pm',
'vc',
'ws',
......@@ -2085,12 +2088,14 @@ function getoptions_country() {
'sc',
'sl',
'sg',
'sx',
'sk',
'si',
'sb',
'so',
'za',
'gs',
'ss',
'es',
'lk',
'sd',
......
......@@ -29,6 +29,7 @@ Scenario: Editing admin profile page (Bug: 1426983)
| Business phone | 040298375 |
| Mobile phone | 0272093875482 |
| Fax number | 09237842 |
And I select "South Sudan" from "Country"
And I press "Save profile"
# Verifying the settings saved
And I should see "Profile saved successfully"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment