Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
f33fe8d9
Commit
f33fe8d9
authored
Dec 01, 2017
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Dec 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1732046: Fixing up the country codes within country lib file"
parents
b904f03c
3b64fa1f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
274 deletions
+73
-274
htdocs/lang/en.utf8/mahara.php
htdocs/lang/en.utf8/mahara.php
+2
-1
htdocs/lib/country.php
htdocs/lib/country.php
+69
-22
htdocs/lib/web.php
htdocs/lib/web.php
+2
-251
No files found.
htdocs/lang/en.utf8/mahara.php
View file @
f33fe8d9
...
...
@@ -1025,6 +1025,7 @@ $string['country.yt'] = 'Mayotte';
$string
[
'country.mx'
]
=
'Mexico'
;
$string
[
'country.fm'
]
=
'Micronesia, Federated States of'
;
$string
[
'country.md'
]
=
'Moldova, Republic of'
;
$string
[
'country.me'
]
=
'Montenegro'
;
$string
[
'country.mc'
]
=
'Monaco'
;
$string
[
'country.mn'
]
=
'Mongolia'
;
$string
[
'country.ms'
]
=
'Montserrat'
;
...
...
@@ -1074,7 +1075,7 @@ $string['country.sm'] = 'San Marino';
$string
[
'country.st'
]
=
'Sao Tome and Principe'
;
$string
[
'country.sa'
]
=
'Saudi Arabia'
;
$string
[
'country.sn'
]
=
'Senegal'
;
$string
[
'country.
c
s'
]
=
'Serbia'
;
$string
[
'country.
r
s'
]
=
'Serbia'
;
$string
[
'country.sc'
]
=
'Seychelles'
;
$string
[
'country.sl'
]
=
'Sierra Leone'
;
$string
[
'country.sg'
]
=
'Singapore'
;
...
...
htdocs/lib/country.php
View file @
f33fe8d9
...
...
@@ -54,11 +54,6 @@ class Country {
'3'
=>
'arm'
,
'match'
=>
"^Armenia
\$
"
,
),
array
(
'2'
=>
'an'
,
'3'
=>
'ant'
,
'match'
=>
"^Netherlands Antilles
\$
"
,
),
array
(
'2'
=>
'ao'
,
'3'
=>
'ago'
,
...
...
@@ -149,6 +144,11 @@ class Country {
'3'
=>
'ben'
,
'match'
=>
"^Benin
\$
"
,
),
array
(
'2'
=>
'bl'
,
'3'
=>
'blm'
,
'match'
=>
"^Saint Barthelemy
\$
"
,
),
array
(
'2'
=>
'bm'
,
'3'
=>
'bmu'
,
...
...
@@ -164,6 +164,11 @@ class Country {
'3'
=>
'bol'
,
'match'
=>
"^Bolivia
\$
"
,
),
array
(
'2'
=>
'bq'
,
'3'
=>
'bes'
,
'match'
=>
"^Bonaire, Sint Eustatius and Saba
\$
"
,
),
array
(
'2'
=>
'br'
,
'3'
=>
'bra'
,
...
...
@@ -264,11 +269,6 @@ class Country {
'3'
=>
'cri'
,
'match'
=>
"^Costa Rica
\$
"
,
),
array
(
'2'
=>
'cs'
,
'3'
=>
'scg'
,
'match'
=>
"^Serbia and Montenegro
\$
"
,
),
array
(
'2'
=>
'cu'
,
'3'
=>
'cub'
,
...
...
@@ -279,6 +279,11 @@ class Country {
'3'
=>
'cpv'
,
'match'
=>
"^Cape Verde
\$
"
,
),
array
(
'2'
=>
'cw'
,
'3'
=>
'cuw'
,
'match'
=>
"^Curacao
\$
"
,
),
array
(
'2'
=>
'cx'
,
'3'
=>
'cxr'
,
...
...
@@ -389,11 +394,6 @@ class Country {
'3'
=>
'fra'
,
'match'
=>
"^France
\$
"
,
),
array
(
'2'
=>
'fx'
,
'3'
=>
'fxx'
,
'match'
=>
"^France, Metropolitan
\$
"
,
),
array
(
'2'
=>
'ga'
,
'3'
=>
'gab'
,
...
...
@@ -419,6 +419,11 @@ class Country {
'3'
=>
'guf'
,
'match'
=>
"^French Guiana
\$
"
,
),
array
(
'2'
=>
'gg'
,
'3'
=>
'ggy'
,
'match'
=>
"^Guernsey
\$
"
,
),
array
(
'2'
=>
'gh'
,
'3'
=>
'gha'
,
...
...
@@ -529,6 +534,11 @@ class Country {
'3'
=>
'isr'
,
'match'
=>
"^Israel
\$
"
,
),
array
(
'2'
=>
'im'
,
'3'
=>
'imn'
,
'match'
=>
"^Isle of Man
\$
"
,
),
array
(
'2'
=>
'in'
,
'3'
=>
'ind'
,
...
...
@@ -559,6 +569,11 @@ class Country {
'3'
=>
'ita'
,
'match'
=>
"^Italy
\$
"
,
),
array
(
'2'
=>
'je'
,
'3'
=>
'jey'
,
'match'
=>
"^Jersey
\$
"
,
),
array
(
'2'
=>
'jm'
,
'3'
=>
'jam'
,
...
...
@@ -682,7 +697,7 @@ class Country {
array
(
'2'
=>
'ly'
,
'3'
=>
'lby'
,
'match'
=>
"^Libya
n Arab Jamahiriya
\$
"
,
'match'
=>
"^Libya
\$
"
,
),
array
(
'2'
=>
'ma'
,
...
...
@@ -699,6 +714,16 @@ class Country {
'3'
=>
'mda'
,
'match'
=>
"^Moldova, Republic of
\$
"
,
),
array
(
'2'
=>
'me'
,
'3'
=>
'mne'
,
'match'
=>
"^Montenegro
\$
"
,
),
array
(
'2'
=>
'mf'
,
'3'
=>
'maf'
,
'match'
=>
"^Saint Martin (French part)
\$
"
,
),
array
(
'2'
=>
'mg'
,
'3'
=>
'mdg'
,
...
...
@@ -907,7 +932,7 @@ class Country {
array
(
'2'
=>
'ps'
,
'3'
=>
'pse'
,
'match'
=>
"^Palestin
ian Territory, Occupied
\$
"
,
'match'
=>
"^Palestin
e, State of
\$
"
,
),
array
(
'2'
=>
'pt'
,
...
...
@@ -939,6 +964,11 @@ class Country {
'3'
=>
'rou'
,
'match'
=>
"^Romania
\$
"
,
),
array
(
'2'
=>
'rs'
,
'3'
=>
'srb'
,
'match'
=>
"^Serbia
\$
"
,
),
array
(
'2'
=>
'ru'
,
'3'
=>
'rus'
,
...
...
@@ -1024,6 +1054,11 @@ class Country {
'3'
=>
'sur'
,
'match'
=>
"^Suriname
\$
"
,
),
array
(
'2'
=>
'ss'
,
'3'
=>
'ssd'
,
'match'
=>
"^South Sudan
\$
"
,
),
array
(
'2'
=>
'st'
,
'3'
=>
'stp'
,
...
...
@@ -1034,6 +1069,11 @@ class Country {
'3'
=>
'slv'
,
'match'
=>
"^El Salvador
\$
"
,
),
array
(
'2'
=>
'sx'
,
'3'
=>
'sxm'
,
'match'
=>
"^Sint Maarten (Dutch part)
\$
"
,
),
array
(
'2'
=>
'sy'
,
'3'
=>
'syr'
,
...
...
@@ -1199,6 +1239,11 @@ class Country {
'3'
=>
'wsm'
,
'match'
=>
"^Samoa
\$
"
,
),
array
(
'2'
=>
'xk'
,
'3'
=>
'xk'
,
'match'
=>
"^Kosovo
\$
"
,
),
array
(
'2'
=>
'ye'
,
'3'
=>
'yem'
,
...
...
@@ -1209,11 +1254,6 @@ class Country {
'3'
=>
'myt'
,
'match'
=>
"^Mayotte
\$
"
,
),
array
(
'2'
=>
'xk'
,
'3'
=>
'xk'
,
'match'
=>
"^Kosovo
\$
"
,
),
array
(
'2'
=>
'za'
,
'3'
=>
'zaf'
,
...
...
@@ -1263,4 +1303,11 @@ class Country {
return
null
;
}
public
static
function
iso3166_alpha2
()
{
$alpha2
=
array
();
foreach
(
self
::
$mapping
as
$countrydata
)
{
$alpha2
[]
=
$countrydata
[
'2'
];
}
return
$alpha2
;
}
}
htdocs/lib/web.php
View file @
f33fe8d9
...
...
@@ -2001,257 +2001,8 @@ function getoptions_country() {
if
(
!
empty
(
$countries
))
{
return
$countries
;
}
$codes
=
array
(
'af'
,
'ax'
,
'al'
,
'dz'
,
'as'
,
'ad'
,
'ao'
,
'ai'
,
'aq'
,
'ag'
,
'ar'
,
'am'
,
'aw'
,
'au'
,
'at'
,
'az'
,
'bs'
,
'bh'
,
'bd'
,
'bb'
,
'by'
,
'be'
,
'bz'
,
'bj'
,
'bm'
,
'bt'
,
'bo'
,
'bq'
,
'ba'
,
'bw'
,
'bv'
,
'br'
,
'io'
,
'bn'
,
'bg'
,
'bf'
,
'bi'
,
'kh'
,
'cm'
,
'ca'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
,
'ws'
,
'sm'
,
'st'
,
'sa'
,
'sn'
,
'cs'
,
'sc'
,
'sl'
,
'sg'
,
'sx'
,
'sk'
,
'si'
,
'sb'
,
'so'
,
'za'
,
'gs'
,
'ss'
,
'es'
,
'lk'
,
'sd'
,
'sr'
,
'sj'
,
'sz'
,
'se'
,
'ch'
,
'sy'
,
'tw'
,
'tj'
,
'tz'
,
'th'
,
'tl'
,
'tg'
,
'tk'
,
'to'
,
'tt'
,
'tn'
,
'tr'
,
'tm'
,
'tc'
,
'tv'
,
'ug'
,
'ua'
,
'ae'
,
'gb'
,
'us'
,
'um'
,
'uy'
,
'uz'
,
'vu'
,
've'
,
'vn'
,
'vg'
,
'vi'
,
'wf'
,
'eh'
,
'ye'
,
'xk'
,
'zm'
,
'zw'
,
);
require_once
(
get_config
(
'libroot'
)
.
'country.php'
);
$codes
=
Country
::
iso3166_alpha2
();
foreach
(
$codes
as
$c
)
{
$countries
[
$c
]
=
get_string
(
"country.
{
$c
}
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment