From 7c0be404c8a91e6fed6a1f84efd045245b46b5dc Mon Sep 17 00:00:00 2001 From: scyrma Date: Wed, 30 Jan 2008 07:45:43 +0000 Subject: [PATCH] Imported and replaced country list to fix MDL-13060. The new list is the exact ISO list. Note that an official list also exists in French, but we will need to do translations to other languages. This commit also includes the restorelib upgrade path. --- backup/restorelib.php | 13 ++ lang/en_utf8/countries.php | 344 +++++++++++++++++++------------------ 2 files changed, 192 insertions(+), 165 deletions(-) diff --git a/backup/restorelib.php b/backup/restorelib.php index b745ecbeb9d..fcdfd5827dc 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -1382,6 +1382,19 @@ $user->lang = 'mi_nt'; } + //Country list updates - MDL-13060 + //Any user whose country code has been deleted or modified needs to be assigned a valid one. + $country_update_map = array( + 'ZR' => 'CD', + 'TP' => 'TL', + 'FX' => 'FR', + 'KO' => 'RS', + 'CS' => 'RS', + 'WA' => 'GB'); + if (array_key_exists($user->country, $country_update_map)) { + $user->country = $country_update_map[$user->country]; + } + //Check if it's admin and coursecreator $is_admin = !empty($user->roles['admin']); $is_coursecreator = !empty($user->roles['coursecreator']); diff --git a/lang/en_utf8/countries.php b/lang/en_utf8/countries.php index a531b6aa22d..c9ccb1797ca 100644 --- a/lang/en_utf8/countries.php +++ b/lang/en_utf8/countries.php @@ -1,246 +1,260 @@ -