r110352 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110351‎ | r110352 | r110353 >
Date:01:16, 31 January 2012
Author:jamesur
Status:ok
Tags:
Comment:
adjusting currency rates to account for min and max but try not to give odd minimum numbers such as requiring a minimum of 2.1 or 1.3
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/currencyRates.inc (modified) (history)
  • /trunk/extensions/DonationInterface/modules/validate.currencyMinimums.js (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/modules/validate.currencyMinimums.js
@@ -1,86 +1,86 @@
22 // If you change these, also change in currencyRates.inc.
33 window.wgCurrencyMinimums = {
4 - 'AED': 4,
5 - 'ARS': 4,
6 - 'AUD': 1,
7 - 'BBD': 2,
8 - 'BDT': 76,
9 - 'BGN': 1.4,
10 - 'BHD': 0.4,
11 - 'BMD': 1,
12 - 'BND': 1.3,
13 - 'BOB': 7,
14 - 'BRL': 1.7,
15 - 'BSD': 1,
16 - 'BZD': 2,
17 - 'CAD': 1,
18 - 'CHF': 0.9,
19 - 'CLP': 494,
20 - 'CNY': 6,
21 - 'COP': 1910,
22 - 'CRC': 512,
23 - 'CZK': 18,
24 - 'DKK': 5,
25 - 'DOP': 38,
26 - 'DZD': 73,
27 - 'EEK': 11,
28 - 'EGP': 6,
29 - 'EUR': 0.7,
30 - 'GBP': 0.6,
31 - 'GTQ': 7.8,
32 - 'HKD': 7.7,
33 - 'HNL': 19,
34 - 'HRK': 5,
35 - 'HUF': 219,
36 - 'IDR': 8960,
37 - 'ILS': 3.6,
38 - 'INR': 49,
39 - 'JMD': 85,
40 - 'JOD': 0.7,
41 - 'JPY': 78,
42 - 'KES': 97,
43 - 'KRW': 1127,
44 - 'KYD': 0.8,
45 - 'KZT': 147,
46 - 'LBP': 1500,
47 - 'LKR': 110,
48 - 'LTL': 2.5,
49 - 'LVL': 0.5,
50 - 'MAD': 8.1,
51 - 'MKD': 45,
52 - 'MUR': 29,
53 - 'MVR': 15,
54 - 'MXN': 13,
55 - 'MYR': 3,
56 - 'NOK': 5.5,
57 - 'NZD': 1.2,
58 - 'OMR': 0.3,
59 - 'PAB': 1,
60 - 'PEN': 2.7,
61 - 'PHP': 43,
62 - 'PKR': 86,
63 - 'PLN': 3,
64 - 'PYG': 4190,
65 - 'QAR': 3.6,
66 - 'RON': 3.1,
67 - 'RUB': 30,
68 - 'SAR': 3.7,
69 - 'SEK': 6.5,
70 - 'SGD': 1.2,
71 - 'SVC': 8.7,
72 - 'THB': 30,
73 - 'TJS': 4.7,
74 - 'TND': 1.4,
75 - 'TRY': 1.7,
76 - 'TTD': 6,
77 - 'TWD': 30,
78 - 'UAH': 8,
79 - 'USD': 1,
80 - 'UYU': 19,
81 - 'UZS': 1760,
82 - 'VND': 21000,
83 - 'XAF': 470,
84 - 'XCD': 2.7,
85 - 'XOF': 476,
86 - 'ZAR': 7.8
87 -};
\ No newline at end of file
 4+ 'AED': '4',
 5+ 'ARS': '4',
 6+ 'AUD': '1',
 7+ 'BBD': '2',
 8+ 'BDT': '76',
 9+ 'BGN': '1',
 10+ 'BHD': '0.4',
 11+ 'BMD': '1',
 12+ 'BND': '1',
 13+ 'BOB': '7',
 14+ 'BRL': '2',
 15+ 'BSD': '1',
 16+ 'BZD': '2',
 17+ 'CAD': '1',
 18+ 'CHF': '0.9',
 19+ 'CLP': '494',
 20+ 'CNY': '6',
 21+ 'COP': '1910',
 22+ 'CRC': '512',
 23+ 'CZK': '18',
 24+ 'DKK': '5',
 25+ 'DOP': '38',
 26+ 'DZD': '73',
 27+ 'EEK': '11',
 28+ 'EGP': '6',
 29+ 'EUR': '0.7',
 30+ 'GBP': '0.6',
 31+ 'GTQ': '8',
 32+ 'HKD': '8',
 33+ 'HNL': '19',
 34+ 'HRK': '5',
 35+ 'HUF': '219',
 36+ 'IDR': '8960',
 37+ 'ILS': '4',
 38+ 'INR': '49',
 39+ 'JMD': '85',
 40+ 'JOD': '0.7',
 41+ 'JPY': '78',
 42+ 'KES': '97',
 43+ 'KRW': '1127',
 44+ 'KYD': '0.8',
 45+ 'KZT': '147',
 46+ 'LBP': '1500',
 47+ 'LKR': '110',
 48+ 'LTL': '2',
 49+ 'LVL': '0.5',
 50+ 'MAD': '8',
 51+ 'MKD': '45',
 52+ 'MUR': '29',
 53+ 'MVR': '15',
 54+ 'MXN': '13',
 55+ 'MYR': '3',
 56+ 'NOK': '5',
 57+ 'NZD': '1',
 58+ 'OMR': '0.3',
 59+ 'PAB': '1',
 60+ 'PEN': '3',
 61+ 'PHP': '43',
 62+ 'PKR': '86',
 63+ 'PLN': '3',
 64+ 'PYG': '4190',
 65+ 'QAR': '4',
 66+ 'RON': '3',
 67+ 'RUB': '30',
 68+ 'SAR': '4',
 69+ 'SEK': '6',
 70+ 'SGD': '1',
 71+ 'SVC': '9',
 72+ 'THB': '30',
 73+ 'TJS': '5',
 74+ 'TND': '1',
 75+ 'TRY': '2',
 76+ 'TTD': '6',
 77+ 'TWD': '30',
 78+ 'UAH': '8',
 79+ 'USD': '1',
 80+ 'UYU': '19',
 81+ 'UZS': '1760',
 82+ 'VND': '21000',
 83+ 'XAF': '470',
 84+ 'XCD': '3',
 85+ 'XOF': '476',
 86+ 'ZAR': '8'
 87+};
Index: trunk/extensions/DonationInterface/gateway_common/currencyRates.inc
@@ -2,22 +2,23 @@
33
44 /**
55 * Supplies rough (not up-to-date) conversion rates for currencies
6 - * Last updated November 3, 2011 (rounded down)
 6+ * Last updated November 3, 2011 (rounded)
77 */
88 function getCurrencyRates() {
99 // If you change these, make sure to also update any JS validation scripts
 10+ // For now I'm not rounding numbers under 1 because I don't think that's a big issue and could cause issues with the max check.
1011 $currencyRates = array(
1112 'AED' => '4',
1213 'ARS' => '4',
1314 'AUD' => '1',
1415 'BBD' => '2',
1516 'BDT' => '76',
16 - 'BGN' => '1.4',
 17+ 'BGN' => '1',
1718 'BHD' => '0.4',
1819 'BMD' => '1',
19 - 'BND' => '1.3',
 20+ 'BND' => '1',
2021 'BOB' => '7',
21 - 'BRL' => '1.7',
 22+ 'BRL' => '2',
2223 'BSD' => '1',
2324 'BZD' => '2',
2425 'CAD' => '1',
@@ -34,13 +35,13 @@
3536 'EGP' => '6',
3637 'EUR' => '0.7',
3738 'GBP' => '0.6',
38 - 'GTQ' => '7.8',
39 - 'HKD' => '7.7',
 39+ 'GTQ' => '8',
 40+ 'HKD' => '8',
4041 'HNL' => '19',
4142 'HRK' => '5',
4243 'HUF' => '219',
4344 'IDR' => '8960',
44 - 'ILS' => '3.6',
 45+ 'ILS' => '4',
4546 'INR' => '49',
4647 'JMD' => '85',
4748 'JOD' => '0.7',
@@ -51,34 +52,34 @@
5253 'KZT' => '147',
5354 'LBP' => '1500',
5455 'LKR' => '110',
55 - 'LTL' => '2.5',
 56+ 'LTL' => '2',
5657 'LVL' => '0.5',
57 - 'MAD' => '8.1',
 58+ 'MAD' => '8',
5859 'MKD' => '45',
5960 'MUR' => '29',
6061 'MVR' => '15',
6162 'MXN' => '13',
6263 'MYR' => '3',
63 - 'NOK' => '5.5',
64 - 'NZD' => '1.2',
 64+ 'NOK' => '5',
 65+ 'NZD' => '1',
6566 'OMR' => '0.3',
6667 'PAB' => '1',
67 - 'PEN' => '2.7',
 68+ 'PEN' => '3',
6869 'PHP' => '43',
6970 'PKR' => '86',
7071 'PLN' => '3',
7172 'PYG' => '4190',
72 - 'QAR' => '3.6',
73 - 'RON' => '3.1',
 73+ 'QAR' => '4',
 74+ 'RON' => '3',
7475 'RUB' => '30',
75 - 'SAR' => '3.7',
76 - 'SEK' => '6.5',
77 - 'SGD' => '1.2',
78 - 'SVC' => '8.7',
 76+ 'SAR' => '4',
 77+ 'SEK' => '6',
 78+ 'SGD' => '1',
 79+ 'SVC' => '9',
7980 'THB' => '30',
80 - 'TJS' => '4.7',
81 - 'TND' => '1.4',
82 - 'TRY' => '1.7',
 81+ 'TJS' => '5',
 82+ 'TND' => '1',
 83+ 'TRY' => '2',
8384 'TTD' => '6',
8485 'TWD' => '30',
8586 'UAH' => '8',
@@ -87,9 +88,9 @@
8889 'UZS' => '1760',
8990 'VND' => '21000',
9091 'XAF' => '470',
91 - 'XCD' => '2.7',
 92+ 'XCD' => '3',
9293 'XOF' => '476',
93 - 'ZAR' => '7.8',
 94+ 'ZAR' => '8',
9495 );
9596
9697 return $currencyRates;

Status & tagging log