http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73261
Revision: 73261
Author: kaldari
Date: 2010-09-17 23:48:29 +0000 (Fri, 17 Sep 2010)
Log Message:
-----------
removing stray $centralNoticeDB, moving countries list to static method in
CentralNoticeDB, adding some preliminary code for banner allocation viewer
(currently not localizable)
Modified Paths:
--------------
trunk/extensions/CentralNotice/CentralNotice.db.php
trunk/extensions/CentralNotice/CentralNotice.i18n.php
trunk/extensions/CentralNotice/SpecialBannerAllocation.php
trunk/extensions/CentralNotice/SpecialCentralNotice.php
Modified: trunk/extensions/CentralNotice/CentralNotice.db.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.db.php 2010-09-17 23:36:52 UTC
(rev 73260)
+++ trunk/extensions/CentralNotice/CentralNotice.db.php 2010-09-17 23:48:29 UTC
(rev 73261)
@@ -161,4 +161,253 @@
return $templates;
}
+ /*
+ * Return all of the available countries for geotargeting
+ * (This should probably be moved to a core database table at some
point.)
+ */
+ static function getCountriesList() {
+ $countries = array(
+ 'AF'=>'Afghanistan',
+ 'AL'=>'Albania',
+ 'DZ'=>'Algeria',
+ 'AS'=>'American Samoa',
+ 'AD'=>'Andorra',
+ 'AO'=>'Angola',
+ 'AI'=>'Anguilla',
+ 'AQ'=>'Antarctica',
+ 'AG'=>'Antigua and Barbuda',
+ 'AR'=>'Argentina',
+ 'AM'=>'Armenia',
+ 'AW'=>'Aruba',
+ 'AU'=>'Australia',
+ 'AT'=>'Austria',
+ 'AZ'=>'Azerbaijan',
+ 'BS'=>'Bahamas',
+ 'BH'=>'Bahrain',
+ 'BD'=>'Bangladesh',
+ 'BB'=>'Barbados',
+ 'BY'=>'Belarus',
+ 'BE'=>'Belgium',
+ 'BZ'=>'Belize',
+ 'BJ'=>'Benin',
+ 'BM'=>'Bermuda',
+ 'BT'=>'Bhutan',
+ 'BO'=>'Bolivia',
+ 'BA'=>'Bosnia and Herzegovina',
+ 'BW'=>'Botswana',
+ 'BV'=>'Bouvet Island',
+ 'BR'=>'Brazil',
+ 'IO'=>'British Indian Ocean Territory',
+ 'BN'=>'Brunei Darussalam',
+ 'BG'=>'Bulgaria',
+ 'BF'=>'Burkina Faso',
+ 'BI'=>'Burundi',
+ 'KH'=>'Cambodia',
+ 'CM'=>'Cameroon',
+ 'CA'=>'Canada',
+ 'CV'=>'Cape Verde',
+ 'KY'=>'Cayman Islands',
+ 'CF'=>'Central African Republic',
+ 'TD'=>'Chad',
+ 'CL'=>'Chile',
+ 'CN'=>'China',
+ 'CX'=>'Christmas Island',
+ 'CC'=>'Cocos (Keeling) Islands',
+ 'CO'=>'Colombia',
+ 'KM'=>'Comoros',
+ 'CD'=>'Congo, Democratic Republic of the',
+ 'CG'=>'Congo',
+ 'CK'=>'Cook Islands',
+ 'CR'=>'Costa Rica',
+ 'CI'=>'Côte d\'Ivoire',
+ 'HR'=>'Croatia',
+ 'CU'=>'Cuba',
+ 'CY'=>'Cyprus',
+ 'CZ'=>'Czech Republic',
+ 'DK'=>'Denmark',
+ 'DJ'=>'Djibouti',
+ 'DM'=>'Dominica',
+ 'DO'=>'Dominican Republic',
+ 'EC'=>'Ecuador',
+ 'EG'=>'Egypt',
+ 'SV'=>'El Salvador',
+ 'GQ'=>'Equatorial Guinea',
+ 'ER'=>'Eritrea',
+ 'EE'=>'Estonia',
+ 'ET'=>'Ethiopia',
+ 'FK'=>'Falkland Islands (Malvinas)',
+ 'FO'=>'Faroe Islands',
+ 'FJ'=>'Fiji',
+ 'FI'=>'Finland',
+ 'FR'=>'France',
+ 'GF'=>'French Guiana',
+ 'PF'=>'French Polynesia',
+ 'TF'=>'French Southern Territories',
+ 'GA'=>'Gabon',
+ 'GM'=>'Gambia',
+ 'GE'=>'Georgia',
+ 'DE'=>'Germany',
+ 'GH'=>'Ghana',
+ 'GI'=>'Gibraltar',
+ 'GR'=>'Greece',
+ 'GL'=>'Greenland',
+ 'GD'=>'Grenada',
+ 'GP'=>'Guadeloupe',
+ 'GU'=>'Guam',
+ 'GT'=>'Guatemala',
+ 'GW'=>'Guinea-Bissau',
+ 'GN'=>'Guinea',
+ 'GY'=>'Guyana',
+ 'HT'=>'Haiti',
+ 'HM'=>'Heard Island and McDonald Islands',
+ 'VA'=>'Holy See (Vatican City State)',
+ 'HN'=>'Honduras',
+ 'HK'=>'Hong Kong',
+ 'HU'=>'Hungary',
+ 'IS'=>'Iceland',
+ 'IN'=>'India',
+ 'ID'=>'Indonesia',
+ 'IR'=>'Iran',
+ 'IQ'=>'Iraq',
+ 'IE'=>'Ireland',
+ 'IL'=>'Israel',
+ 'IT'=>'Italy',
+ 'JM'=>'Jamaica',
+ 'JP'=>'Japan',
+ 'JO'=>'Jordan',
+ 'KZ'=>'Kazakhstan',
+ 'KE'=>'Kenya',
+ 'KI'=>'Kiribati',
+ 'KW'=>'Kuwait',
+ 'KG'=>'Kyrgyzstan',
+ 'LA'=>'Lao People\'s Democratic Republic',
+ 'LV'=>'Latvia',
+ 'LB'=>'Lebanon',
+ 'LS'=>'Lesotho',
+ 'LR'=>'Liberia',
+ 'LY'=>'Libyan Arab Jamahiriya',
+ 'LI'=>'Liechtenstein',
+ 'LT'=>'Lithuania',
+ 'LU'=>'Luxembourg',
+ 'MO'=>'Macao',
+ 'MK'=>'Macedonia, Republic of',
+ 'MG'=>'Madagascar',
+ 'MW'=>'Malawi',
+ 'MY'=>'Malaysia',
+ 'MV'=>'Maldives',
+ 'ML'=>'Mali',
+ 'MT'=>'Malta',
+ 'MH'=>'Marshall Islands',
+ 'MQ'=>'Martinique',
+ 'MR'=>'Mauritania',
+ 'MU'=>'Mauritius',
+ 'YT'=>'Mayotte',
+ 'MX'=>'Mexico',
+ 'FM'=>'Micronesia',
+ 'MD'=>'Moldova, Republic of',
+ 'MC'=>'Moldova',
+ 'MN'=>'Mongolia',
+ 'ME'=>'Montenegro',
+ 'MS'=>'Montserrat',
+ 'MA'=>'Morocco',
+ 'MZ'=>'Mozambique',
+ 'MM'=>'Myanmar',
+ 'NA'=>'Namibia',
+ 'NR'=>'Nauru',
+ 'NP'=>'Nepal',
+ 'AN'=>'Netherlands Antilles',
+ 'NL'=>'Netherlands',
+ 'NC'=>'New Caledonia',
+ 'NZ'=>'New Zealand',
+ 'NI'=>'Nicaragua',
+ 'NE'=>'Niger',
+ 'NG'=>'Nigeria',
+ 'NU'=>'Niue',
+ 'NF'=>'Norfolk Island',
+ 'KP'=>'North Korea',
+ 'MP'=>'Northern Mariana Islands',
+ 'NO'=>'Norway',
+ 'OM'=>'Oman',
+ 'PK'=>'Pakistan',
+ 'PW'=>'Palau',
+ 'PS'=>'Palestinian Territory',
+ 'PA'=>'Panama',
+ 'PG'=>'Papua New Guinea',
+ 'PY'=>'Paraguay',
+ 'PE'=>'Peru',
+ 'PH'=>'Philippines',
+ 'PN'=>'Pitcairn',
+ 'PL'=>'Poland',
+ 'PT'=>'Portugal',
+ 'PR'=>'Puerto Rico',
+ 'QA'=>'Qatar',
+ 'RE'=>'Reunion',
+ 'RO'=>'Romania',
+ 'RU'=>'Russian Federation',
+ 'RW'=>'Rwanda',
+ 'SH'=>'Saint Helena',
+ 'KN'=>'Saint Kitts and Nevis',
+ 'LC'=>'Saint Lucia',
+ 'PM'=>'Saint Pierre and Miquelon',
+ 'VC'=>'Saint Vincent and the Grenadines',
+ 'WS'=>'Samoa',
+ 'SM'=>'San Marino',
+ 'ST'=>'Sao Tome and Principe',
+ 'SA'=>'Saudi Arabia',
+ 'SN'=>'Senegal',
+ 'CS'=>'Serbia and Montenegro',
+ 'RS'=>'Serbia',
+ 'SC'=>'Seychelles',
+ 'SL'=>'Sierra Leone',
+ 'SG'=>'Singapore',
+ 'SK'=>'Slovakia',
+ 'SI'=>'Slovenia',
+ 'SB'=>'Solomon Islands',
+ 'SO'=>'Somalia',
+ 'ZA'=>'South Africa',
+ 'KR'=>'South Korea',
+ 'ES'=>'Spain',
+ 'LK'=>'Sri Lanka',
+ 'SD'=>'Sudan',
+ 'SR'=>'Suriname',
+ 'SJ'=>'Svalbard and Jan Mayen',
+ 'SZ'=>'Swaziland',
+ 'SE'=>'Sweden',
+ 'CH'=>'Switzerland',
+ 'SY'=>'Syrian Arab Republic',
+ 'TW'=>'Taiwan',
+ 'TJ'=>'Tajikistan',
+ 'TZ'=>'Tanzania',
+ 'TH'=>'Thailand',
+ 'TL'=>'Timor-Leste',
+ 'TG'=>'Togo',
+ 'TK'=>'Tokelau',
+ 'TO'=>'Tonga',
+ 'TT'=>'Trinidad and Tobago',
+ 'TN'=>'Tunisia',
+ 'TR'=>'Turkey',
+ 'TM'=>'Turkmenistan',
+ 'TC'=>'Turks and Caicos Islands',
+ 'TV'=>'Tuvalu',
+ 'UG'=>'Uganda',
+ 'UA'=>'Ukraine',
+ 'AE'=>'United Arab Emirates',
+ 'GB'=>'United Kingdom',
+ 'UM'=>'United States Minor Outlying Islands',
+ 'US'=>'United States',
+ 'UY'=>'Uruguay',
+ 'UZ'=>'Uzbekistan',
+ 'VU'=>'Vanuatu',
+ 'VE'=>'Venezuela',
+ 'VN'=>'Vietnam',
+ 'VG'=>'Virgin Islands, British',
+ 'VI'=>'Virgin Islands, U.S.',
+ 'WF'=>'Wallis and Futuna',
+ 'EH'=>'Western Sahara',
+ 'YE'=>'Yemen',
+ 'ZM'=>'Zambia',
+ 'ZW'=>'Zimbabwe'
+ );
+ return $countries;
+ }
}
Modified: trunk/extensions/CentralNotice/CentralNotice.i18n.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.i18n.php 2010-09-17
23:36:52 UTC (rev 73260)
+++ trunk/extensions/CentralNotice/CentralNotice.i18n.php 2010-09-17
23:48:29 UTC (rev 73261)
@@ -11,8 +11,8 @@
$messages['en'] = array(
'centralnotice' => 'Central notice admin',
- 'noticetemplate' => 'Central notice banners',
- 'bannerallocation' => 'Central notice banner allocation',
+ 'noticetemplate' => 'Central notice admin',
+ 'bannerallocation' => 'Central notice admin',
'centralnotice-desc' => 'Adds a central sitenotice',
'centralnotice-summary' => 'This module allows you to edit your
currently setup central notices.
It can also be used to add or remove old notices.',
Modified: trunk/extensions/CentralNotice/SpecialBannerAllocation.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialBannerAllocation.php 2010-09-17
23:36:52 UTC (rev 73260)
+++ trunk/extensions/CentralNotice/SpecialBannerAllocation.php 2010-09-17
23:48:29 UTC (rev 73261)
@@ -20,7 +20,7 @@
* Handle different types of page requests
*/
function execute( $sub ) {
- global $wgOut, $wgUser, $wgRequest, $wgScriptPath;
+ global $wgOut, $wgUser, $wgRequest, $wgScriptPath,
$wgNoticeProjects, $wgContLanguageCode;
// Begin output
$this->setHeaders();
@@ -48,8 +48,64 @@
// Begin Allocation selection fieldset
$htmlOut .= Xml::openElement( 'fieldset', array( 'class' =>
'prefsection' ) );
- $htmlOut .= 'Coming soon!';
+ $htmlOut .= Xml::openElement( 'form', array( 'method' => 'post'
) );
+ $htmlOut .= Xml::element( 'h2', null, 'View banner allocation'
);
+ $htmlOut .= Xml::tags( 'p', null, 'Choose the environment you
would like to view banner allocation for:' );
+ $htmlOut .= Xml::openElement( 'table', array ( 'cellpadding' =>
9 ) );
+ $htmlOut .= Xml::openElement( 'tr' );
+ $htmlOut .= Xml::tags( 'td', array( 'style' => 'width: 150px;'
), wfMsgHtml( 'centralnotice-project-name' ) );
+ $htmlOut .= Xml::openElement( 'td' );
+ $htmlOut .= Xml::openElement( 'select', array( 'name' =>
'project' ) );
+ foreach ( $wgNoticeProjects as $value ) {
+ $htmlOut .= Xml::option( $value, $value, false );
+ }
+ $htmlOut .= Xml::closeElement( 'select' );
+ $htmlOut .= Xml::closeElement( 'td' );
+ $htmlOut .= Xml::closeElement( 'tr' );
+ $htmlOut .= Xml::openElement( 'tr' );
+ $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
'Project language' );
+ $htmlOut .= Xml::openElement( 'td' );
+ // Make sure the site language is in the list; a custom
language code might not have a defined name...
+ $languages = Language::getLanguageNames( true );
+ if( !array_key_exists( $wgContLanguageCode, $languages ) ) {
+ $languages[$wgContLanguageCode] = $wgContLanguageCode;
+ }
+ ksort( $languages );
+ $htmlOut .= Xml::openElement( 'select', array( 'name' =>
'language' ) );
+ foreach( $languages as $code => $name ) {
+ $htmlOut .= Xml::option(
+ wfMsg( 'centralnotice-language-listing', $code,
$name ),
+ $code,
+ false
+ );
+ }
+ $htmlOut .= Xml::closeElement( 'select' );
+ $htmlOut .= Xml::closeElement( 'td' );
+ $htmlOut .= Xml::closeElement( 'tr' );
+ $htmlOut .= Xml::openElement( 'tr' );
+ $htmlOut .= Xml::tags( 'td', array(), 'Country' );
+ $htmlOut .= Xml::openElement( 'td' );
+ $countries = CentralNoticeDB::getCountriesList();
+ $htmlOut .= Xml::openElement( 'select', array( 'name' =>
'country' ) );
+ foreach( $countries as $code => $name ) {
+ $htmlOut .= Xml::option(
+ $name,
+ $code,
+ false
+ );
+ }
+ $htmlOut .= Xml::closeElement( 'select' );
+ $htmlOut .= Xml::closeElement( 'td' );
+ $htmlOut .= Xml::closeElement( 'tr' );
+ $htmlOut .= Xml::closeElement( 'table' );
+
+ $htmlOut .= Xml::tags( 'div',
+ array( 'class' => 'cn-buttons' ),
+ Xml::submitButton( wfMsg( 'centralnotice-modify' ) )
+ );
+ $htmlOut .= Xml::closeElement( 'form' );
+
// End Allocation selection fieldset
$htmlOut .= Xml::closeElement( 'fieldset' );
Modified: trunk/extensions/CentralNotice/SpecialCentralNotice.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialCentralNotice.php 2010-09-17
23:36:52 UTC (rev 73260)
+++ trunk/extensions/CentralNotice/SpecialCentralNotice.php 2010-09-17
23:48:29 UTC (rev 73261)
@@ -6,7 +6,7 @@
}
class CentralNotice extends SpecialPage {
- var $centralNoticeDB, $editable, $centralNoticeError;
+ var $editable, $centralNoticeError;
function __construct() {
// Register special page
@@ -1546,248 +1546,7 @@
* @return multiple select list
*/
function geoMultiSelector( $selected = array() ) {
- $countries = array(
- 'AF'=>'Afghanistan',
- 'AL'=>'Albania',
- 'DZ'=>'Algeria',
- 'AS'=>'American Samoa',
- 'AD'=>'Andorra',
- 'AO'=>'Angola',
- 'AI'=>'Anguilla',
- 'AQ'=>'Antarctica',
- 'AG'=>'Antigua and Barbuda',
- 'AR'=>'Argentina',
- 'AM'=>'Armenia',
- 'AW'=>'Aruba',
- 'AU'=>'Australia',
- 'AT'=>'Austria',
- 'AZ'=>'Azerbaijan',
- 'BS'=>'Bahamas',
- 'BH'=>'Bahrain',
- 'BD'=>'Bangladesh',
- 'BB'=>'Barbados',
- 'BY'=>'Belarus',
- 'BE'=>'Belgium',
- 'BZ'=>'Belize',
- 'BJ'=>'Benin',
- 'BM'=>'Bermuda',
- 'BT'=>'Bhutan',
- 'BO'=>'Bolivia',
- 'BA'=>'Bosnia and Herzegovina',
- 'BW'=>'Botswana',
- 'BV'=>'Bouvet Island',
- 'BR'=>'Brazil',
- 'IO'=>'British Indian Ocean Territory',
- 'BN'=>'Brunei Darussalam',
- 'BG'=>'Bulgaria',
- 'BF'=>'Burkina Faso',
- 'BI'=>'Burundi',
- 'KH'=>'Cambodia',
- 'CM'=>'Cameroon',
- 'CA'=>'Canada',
- 'CV'=>'Cape Verde',
- 'KY'=>'Cayman Islands',
- 'CF'=>'Central African Republic',
- 'TD'=>'Chad',
- 'CL'=>'Chile',
- 'CN'=>'China',
- 'CX'=>'Christmas Island',
- 'CC'=>'Cocos (Keeling) Islands',
- 'CO'=>'Colombia',
- 'KM'=>'Comoros',
- 'CD'=>'Congo, Democratic Republic of the',
- 'CG'=>'Congo',
- 'CK'=>'Cook Islands',
- 'CR'=>'Costa Rica',
- 'CI'=>'Côte d\'Ivoire',
- 'HR'=>'Croatia',
- 'CU'=>'Cuba',
- 'CY'=>'Cyprus',
- 'CZ'=>'Czech Republic',
- 'DK'=>'Denmark',
- 'DJ'=>'Djibouti',
- 'DM'=>'Dominica',
- 'DO'=>'Dominican Republic',
- 'EC'=>'Ecuador',
- 'EG'=>'Egypt',
- 'SV'=>'El Salvador',
- 'GQ'=>'Equatorial Guinea',
- 'ER'=>'Eritrea',
- 'EE'=>'Estonia',
- 'ET'=>'Ethiopia',
- 'FK'=>'Falkland Islands (Malvinas)',
- 'FO'=>'Faroe Islands',
- 'FJ'=>'Fiji',
- 'FI'=>'Finland',
- 'FR'=>'France',
- 'GF'=>'French Guiana',
- 'PF'=>'French Polynesia',
- 'TF'=>'French Southern Territories',
- 'GA'=>'Gabon',
- 'GM'=>'Gambia',
- 'GE'=>'Georgia',
- 'DE'=>'Germany',
- 'GH'=>'Ghana',
- 'GI'=>'Gibraltar',
- 'GR'=>'Greece',
- 'GL'=>'Greenland',
- 'GD'=>'Grenada',
- 'GP'=>'Guadeloupe',
- 'GU'=>'Guam',
- 'GT'=>'Guatemala',
- 'GW'=>'Guinea-Bissau',
- 'GN'=>'Guinea',
- 'GY'=>'Guyana',
- 'HT'=>'Haiti',
- 'HM'=>'Heard Island and McDonald Islands',
- 'VA'=>'Holy See (Vatican City State)',
- 'HN'=>'Honduras',
- 'HK'=>'Hong Kong',
- 'HU'=>'Hungary',
- 'IS'=>'Iceland',
- 'IN'=>'India',
- 'ID'=>'Indonesia',
- 'IR'=>'Iran',
- 'IQ'=>'Iraq',
- 'IE'=>'Ireland',
- 'IL'=>'Israel',
- 'IT'=>'Italy',
- 'JM'=>'Jamaica',
- 'JP'=>'Japan',
- 'JO'=>'Jordan',
- 'KZ'=>'Kazakhstan',
- 'KE'=>'Kenya',
- 'KI'=>'Kiribati',
- 'KW'=>'Kuwait',
- 'KG'=>'Kyrgyzstan',
- 'LA'=>'Lao People\'s Democratic Republic',
- 'LV'=>'Latvia',
- 'LB'=>'Lebanon',
- 'LS'=>'Lesotho',
- 'LR'=>'Liberia',
- 'LY'=>'Libyan Arab Jamahiriya',
- 'LI'=>'Liechtenstein',
- 'LT'=>'Lithuania',
- 'LU'=>'Luxembourg',
- 'MO'=>'Macao',
- 'MK'=>'Macedonia, Republic of',
- 'MG'=>'Madagascar',
- 'MW'=>'Malawi',
- 'MY'=>'Malaysia',
- 'MV'=>'Maldives',
- 'ML'=>'Mali',
- 'MT'=>'Malta',
- 'MH'=>'Marshall Islands',
- 'MQ'=>'Martinique',
- 'MR'=>'Mauritania',
- 'MU'=>'Mauritius',
- 'YT'=>'Mayotte',
- 'MX'=>'Mexico',
- 'FM'=>'Micronesia',
- 'MD'=>'Moldova, Republic of',
- 'MC'=>'Moldova',
- 'MN'=>'Mongolia',
- 'ME'=>'Montenegro',
- 'MS'=>'Montserrat',
- 'MA'=>'Morocco',
- 'MZ'=>'Mozambique',
- 'MM'=>'Myanmar',
- 'NA'=>'Namibia',
- 'NR'=>'Nauru',
- 'NP'=>'Nepal',
- 'AN'=>'Netherlands Antilles',
- 'NL'=>'Netherlands',
- 'NC'=>'New Caledonia',
- 'NZ'=>'New Zealand',
- 'NI'=>'Nicaragua',
- 'NE'=>'Niger',
- 'NG'=>'Nigeria',
- 'NU'=>'Niue',
- 'NF'=>'Norfolk Island',
- 'KP'=>'North Korea',
- 'MP'=>'Northern Mariana Islands',
- 'NO'=>'Norway',
- 'OM'=>'Oman',
- 'PK'=>'Pakistan',
- 'PW'=>'Palau',
- 'PS'=>'Palestinian Territory',
- 'PA'=>'Panama',
- 'PG'=>'Papua New Guinea',
- 'PY'=>'Paraguay',
- 'PE'=>'Peru',
- 'PH'=>'Philippines',
- 'PN'=>'Pitcairn',
- 'PL'=>'Poland',
- 'PT'=>'Portugal',
- 'PR'=>'Puerto Rico',
- 'QA'=>'Qatar',
- 'RE'=>'Reunion',
- 'RO'=>'Romania',
- 'RU'=>'Russian Federation',
- 'RW'=>'Rwanda',
- 'SH'=>'Saint Helena',
- 'KN'=>'Saint Kitts and Nevis',
- 'LC'=>'Saint Lucia',
- 'PM'=>'Saint Pierre and Miquelon',
- 'VC'=>'Saint Vincent and the Grenadines',
- 'WS'=>'Samoa',
- 'SM'=>'San Marino',
- 'ST'=>'Sao Tome and Principe',
- 'SA'=>'Saudi Arabia',
- 'SN'=>'Senegal',
- 'CS'=>'Serbia and Montenegro',
- 'RS'=>'Serbia',
- 'SC'=>'Seychelles',
- 'SL'=>'Sierra Leone',
- 'SG'=>'Singapore',
- 'SK'=>'Slovakia',
- 'SI'=>'Slovenia',
- 'SB'=>'Solomon Islands',
- 'SO'=>'Somalia',
- 'ZA'=>'South Africa',
- 'KR'=>'South Korea',
- 'ES'=>'Spain',
- 'LK'=>'Sri Lanka',
- 'SD'=>'Sudan',
- 'SR'=>'Suriname',
- 'SJ'=>'Svalbard and Jan Mayen',
- 'SZ'=>'Swaziland',
- 'SE'=>'Sweden',
- 'CH'=>'Switzerland',
- 'SY'=>'Syrian Arab Republic',
- 'TW'=>'Taiwan',
- 'TJ'=>'Tajikistan',
- 'TZ'=>'Tanzania',
- 'TH'=>'Thailand',
- 'TL'=>'Timor-Leste',
- 'TG'=>'Togo',
- 'TK'=>'Tokelau',
- 'TO'=>'Tonga',
- 'TT'=>'Trinidad and Tobago',
- 'TN'=>'Tunisia',
- 'TR'=>'Turkey',
- 'TM'=>'Turkmenistan',
- 'TC'=>'Turks and Caicos Islands',
- 'TV'=>'Tuvalu',
- 'UG'=>'Uganda',
- 'UA'=>'Ukraine',
- 'AE'=>'United Arab Emirates',
- 'GB'=>'United Kingdom',
- 'UM'=>'United States Minor Outlying Islands',
- 'US'=>'United States',
- 'UY'=>'Uruguay',
- 'UZ'=>'Uzbekistan',
- 'VU'=>'Vanuatu',
- 'VE'=>'Venezuela',
- 'VN'=>'Vietnam',
- 'VG'=>'Virgin Islands, British',
- 'VI'=>'Virgin Islands, U.S.',
- 'WF'=>'Wallis and Futuna',
- 'EH'=>'Western Sahara',
- 'YE'=>'Yemen',
- 'ZM'=>'Zambia',
- 'ZW'=>'Zimbabwe'
- );
+ $countries = CentralNoticeDB::getCountriesList();
$options = "\n";
foreach( $countries as $code => $name ) {
$options .= Xml::option(
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs