Index: branches/wmf/1.16wmf4/extensions/ContributionTracking/ContributionTracking.alias.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | 'ContributionTracking' => array( '기여추적' ), |
80 | 80 | ); |
81 | 81 | |
82 | | -/** Ripoarisch (Ripoarisch) */ |
| 82 | +/** Colognian (Ripoarisch) */ |
83 | 83 | $specialPageAliases['ksh'] = array( |
84 | 84 | 'ContributionTracking' => array( 'MetmaacherVerfoljung' ), |
85 | 85 | ); |
— | — | @@ -151,4 +151,4 @@ |
152 | 152 | /** |
153 | 153 | * For backwards compatibility with MediaWiki 1.15 and earlier. |
154 | 154 | */ |
155 | | -$aliases =& $specialPageAliases; |
\ No newline at end of file |
| 155 | +$aliases =& $specialPageAliases; |
Property changes on: branches/wmf/1.16wmf4/extensions/ContributionTracking/ContributionTracking.alias.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
156 | 156 | Reverse-merged /trunk/extensions/ContributionTracking/ContributionTracking.alias.php:r64690-74436,74440-78133 |
157 | 157 | Reverse-merged /trunk/phase3/extensions/ContributionTracking/ContributionTracking.alias.php:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573 |
158 | 158 | Reverse-merged /trunk/extensions/ContributionReporting/ContributionTracking.alias.php:r74440-74491 |
159 | 159 | Reverse-merged /branches/wmf-deployment/extensions/ContributionTracking/ContributionTracking.alias.php:r60970 |
Index: branches/wmf/1.16wmf4/extensions/ContributionTracking/ContributionTracking.sql |
— | — | @@ -1,4 +1,4 @@ |
2 | | -CREATE TABLE `contribution_tracking` ( |
| 2 | +CREATE TABLE IF NOT EXISTS /*_*/`contribution_tracking` ( |
3 | 3 | `id` int(10) unsigned NOT NULL auto_increment, |
4 | 4 | `contribution_id` int(10) unsigned default NULL, |
5 | 5 | `note` text, |
— | — | @@ -13,4 +13,4 @@ |
14 | 14 | PRIMARY KEY (`id`), |
15 | 15 | UNIQUE KEY `contribution_id` (`contribution_id`), |
16 | 16 | KEY `ts` (`ts`) |
17 | | -) /*wgDBTableOptions/*; |
| 17 | +) /*wgDBTableOptions*/; |
Index: branches/wmf/1.16wmf4/extensions/ContributionTracking/patch-owa.sql |
— | — | @@ -0,0 +1,5 @@ |
| 2 | +-- |
| 3 | +-- create contribution_tracking.owa_session and owa_ref |
| 4 | +-- |
| 5 | +ALTER TABLE /*_*/contribution_tracking ADD owa_session varbinary(255); |
| 6 | +ALTER TABLE /*_*/contribution_tracking ADD owa_ref INTEGER; |
Property changes on: branches/wmf/1.16wmf4/extensions/ContributionTracking/patch-owa.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 7 | + native |
Index: branches/wmf/1.16wmf4/extensions/ContributionTracking/ContributionTracking_OWA_ref.sql |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +-- |
| 3 | +-- Schema for OWA_ref |
| 4 | +-- |
| 5 | +-- Used to normalize target pages for OWA "conversions" |
| 6 | +-- |
| 7 | + |
| 8 | +CREATE TABLE IF NOT EXISTS /*_*/contribution_tracking_owa_ref ( |
| 9 | + -- URL of event |
| 10 | + url VARBINARY(255) unique, |
| 11 | + |
| 12 | + -- event ID |
| 13 | + id INTEGER AUTO_INCREMENT PRIMARY KEY |
| 14 | +) /*$wgDBTableOptions*/; |
| 15 | + |
Property changes on: branches/wmf/1.16wmf4/extensions/ContributionTracking/ContributionTracking_OWA_ref.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 16 | + native |
Index: branches/wmf/1.16wmf4/extensions/ContributionTracking/ContributionTracking_body.php |
— | — | @@ -5,16 +5,36 @@ |
6 | 6 | parent::__construct( 'ContributionTracking' ); |
7 | 7 | } |
8 | 8 | |
| 9 | + function get_owa_ref_id($ref){ |
| 10 | + // Replication lag means sometimes a new event will not exist in the table yet |
| 11 | + $dbw = contributionTrackingConnection(); //wfGetDB( DB_MASTER ); |
| 12 | + $id_num = $dbw->selectField( |
| 13 | + 'contribution_tracking_owa_ref', |
| 14 | + 'id', |
| 15 | + array( 'url' => $ref ), |
| 16 | + __METHOD__ |
| 17 | + ); |
| 18 | + // Once we're on mysql 5, we can use replace() instead of this selectField --> insert or update hooey |
| 19 | + if ( $id_num === false ) { |
| 20 | + $dbw->insert( |
| 21 | + 'contribution_tracking_owa_ref', |
| 22 | + array( 'url' => (string) $event_name ), |
| 23 | + __METHOD__ |
| 24 | + ); |
| 25 | + $id_num = $dbw->insertId(); |
| 26 | + } |
| 27 | + return $id_num === false ? 0 : $id_num; |
| 28 | + } |
| 29 | + |
| 30 | + |
9 | 31 | function execute( $language ) { |
10 | | - global $wgRequest, $wgOut; |
11 | | - wfLoadExtensionMessages( 'ContributionTracking' ); |
| 32 | + global $wgRequest, $wgOut, $wgContributionTrackingPayPalIPN, $wgContributionTrackingReturnToURLDefault, |
| 33 | + $wgContributionTrackingPayPalRecurringIPN, $wgContributionTrackingPayPalBusiness; |
12 | 34 | |
13 | 35 | if ( !preg_match( '/^[a-z-]+$/', $language ) ) { |
14 | 36 | $language = 'en'; |
15 | 37 | } |
16 | 38 | $this->lang = Language::factory( $language ); |
17 | | - wfLoadExtensionMessages( 'ContributionTracking' ); |
18 | | - wfLoadExtensionMessages( 'ContributionTracking', $language ); |
19 | 39 | |
20 | 40 | $this->setHeaders(); |
21 | 41 | |
— | — | @@ -28,6 +48,11 @@ |
29 | 49 | |
30 | 50 | $ts = $db->timestamp(); |
31 | 51 | |
| 52 | + $owa_ref = $wgRequest->getText('owa_ref', null); |
| 53 | + if($owa_ref != null && !is_numeric($owa_ref)){ |
| 54 | + $owa_ref = $this->get_owa_ref_id($owa_ref); |
| 55 | + } |
| 56 | + |
32 | 57 | $tracked_contribution = array( |
33 | 58 | 'note' => $wgRequest->getText('comment', null), |
34 | 59 | 'referrer' => $wgRequest->getText('referrer', null), |
— | — | @@ -37,6 +62,8 @@ |
38 | 63 | 'utm_campaign' => $wgRequest->getText('utm_campaign', null), |
39 | 64 | 'optout' => ($wgRequest->getCheck('email-opt', 0) ? 0 : 1), |
40 | 65 | 'language' => $wgRequest->getText('language', null), |
| 66 | + 'owa_session' => $wgRequest->getText('owa_session', null), |
| 67 | + 'owa_ref' => $owa_ref, |
41 | 68 | 'ts' => $ts, |
42 | 69 | ); |
43 | 70 | |
— | — | @@ -58,33 +85,57 @@ |
59 | 86 | if( $returnTitle ) { |
60 | 87 | $returnto = $returnTitle->getFullUrl(); |
61 | 88 | } else { |
62 | | - $returnto = "http://wikimediafoundation.org/wiki/Thank_You/$language"; |
| 89 | + $returnto = $wgContributionTrackingReturnToURLDefault . "/$language"; |
63 | 90 | } |
64 | 91 | |
65 | 92 | // Set the action and tracking ID fields |
66 | 93 | $repost = array(); |
67 | 94 | $action = 'http://wikimediafoundation.org/'; |
| 95 | + $amount_field_name = 'amount'; // the amount fieldname may be different depending on the service |
68 | 96 | if ( $gateway == 'paypal' ) { |
| 97 | + |
69 | 98 | $action = 'https://www.paypal.com/cgi-bin/webscr'; |
| 99 | + |
| 100 | + /* |
| 101 | + Commenting this out until we're ready to launch premiums. |
| 102 | + // Premiums |
| 103 | + if ( $wgRequest->getCheck( 'shirt') ) { |
| 104 | + $repost['on0'] = 'Shirt Size'; |
| 105 | + $repost['os0'] = $wgRequest->getText( 'size', null ); |
| 106 | + $repost['no_shipping'] = 2; |
| 107 | + } |
| 108 | + */ |
70 | 109 | |
71 | 110 | // Tracking |
72 | 111 | $repost['on0'] = 'contribution_tracking_id'; |
73 | 112 | |
74 | 113 | // PayPal |
75 | | - $repost['business'] = 'donations@wikimedia.org'; |
| 114 | + $repost['business'] = $wgContributionTrackingPayPalBusiness; |
76 | 115 | $repost['item_name'] = 'One-time donation'; |
77 | 116 | $repost['item_number'] = 'DONATE'; |
78 | | - $repost['cmd'] = '_xclick'; |
79 | 117 | $repost['no_note'] = '0'; |
80 | | - $repost['notify_url'] = 'https://civicrm.wikimedia.org/fundcore_gateway/paypal'; |
81 | 118 | $repost['return'] = $returnto; |
82 | | - |
83 | 119 | $repost['currency_code'] = $wgRequest->getText( 'currency_code', 'USD' ); |
84 | 120 | |
85 | 121 | // additional fields to pass to PayPal from single-step credit card form |
86 | 122 | $repost[ 'first_name' ] = $wgRequest->getText( 'fname', null ); |
87 | 123 | $repost[ 'last_name' ] = $wgRequest->getText( 'lname', null ); |
88 | 124 | $repost[ 'email' ] = $wgRequest->getText( 'email', null ); |
| 125 | + |
| 126 | + // if this is a recurring donation, we have add'l fields to send to paypal |
| 127 | + if ( $wgRequest->getText( 'recurring_paypal' ) == 'true' ) { |
| 128 | + $repost[ 't3' ] = "M"; // The unit of measurement for for p3 (M = month) |
| 129 | + $repost[ 'p3' ] = '1'; // Billing cycle duration |
| 130 | + $repost[ 'srt' ] = '12'; // # of billing cycles |
| 131 | + $repost[ 'src' ] = '1'; // Make this 'recurring' |
| 132 | + $repost[ 'sra' ] = '1'; // Turn on re-attempt on failure |
| 133 | + $repost[ 'cmd' ] = '_xclick-subscriptions'; |
| 134 | + $amount_field_name = 'a3'; |
| 135 | + $repost['notify_url'] = $wgContributionTrackingPayPalRecurringIPN; |
| 136 | + } else { |
| 137 | + $repost['cmd'] = '_xclick'; |
| 138 | + $repost['notify_url'] = $wgContributionTrackingPayPalIPN; |
| 139 | + } |
89 | 140 | } |
90 | 141 | else if ( $gateway == 'moneybookers' ) { |
91 | 142 | $action = 'https://www.moneybookers.com/app/payment.pl'; |
— | — | @@ -104,13 +155,15 @@ |
105 | 156 | } |
106 | 157 | |
107 | 158 | // Normalized amount |
108 | | - $repost['amount'] = $wgRequest->getVal( 'amount' ); |
| 159 | + $repost[ $amount_field_name ] = $wgRequest->getVal( 'amount' ); |
109 | 160 | if ( $wgRequest->getVal( 'amountGiven' ) ) { |
110 | | - $repost['amount'] = $wgRequest->getVal( 'amountGiven' ); |
| 161 | + $repost[ $amount_field_name ] = $wgRequest->getVal( 'amountGiven' ); |
111 | 162 | } |
112 | 163 | |
113 | 164 | // Tracking |
| 165 | + // passing contrib tracking id in two places to ease transition to new model (custom field) |
114 | 166 | $repost['os0'] = $contribution_tracking_id; |
| 167 | + $repost['custom'] = $contribution_tracking_id; |
115 | 168 | |
116 | 169 | $wgOut->addWikiText( "{{2009/Donate-banner/$language}}" ); |
117 | 170 | $wgOut->addHTML( $this->msgWiki( 'contrib-tracking-submitting' ) ); |
— | — | @@ -143,6 +196,7 @@ |
144 | 197 | return wfMsgExt( $key, array( 'escape', 'language' => $this->lang ) ); |
145 | 198 | } |
146 | 199 | |
| 200 | + |
147 | 201 | function msgWiki( $key ) { |
148 | 202 | return wfMsgExt( $key, array( 'parse', 'language' => $this->lang ) ); |
149 | 203 | } |
Index: branches/wmf/1.16wmf4/extensions/ContributionTracking/ContributionTracking.i18n.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | |
22 | 22 | 'contrib-tracking-submitting' => 'Submitting to payment processor...', |
23 | 23 | 'contrib-tracking-continue' => 'If you are not automatically redirected, click the button to complete your donation at PayPal.', |
24 | | - 'contrib-tracking-redirect' => 'You will be automatically redirected to complete your donation at PayPal.', |
| 24 | + 'contrib-tracking-redirect' => 'You will be automatically redirected to PayPal to complete your donation.', |
25 | 25 | |
26 | 26 | 'contrib-tracking-button' => 'Continue', |
27 | 27 | |
— | — | @@ -94,6 +94,19 @@ |
95 | 95 | 'contrib-tracking-button' => 'استمر', |
96 | 96 | ); |
97 | 97 | |
| 98 | +/** Bashkir (Башҡорт) |
| 99 | + * @author Assele |
| 100 | + */ |
| 101 | +$messages['ba'] = array( |
| 102 | + 'contributiontracking-desc' => 'Викимедиа файҙаһына иғәнә йыйыуҙы күҙәтеү', |
| 103 | + 'contributiontracking' => 'Иғәнә йыйыуҙы күҙәтеү', |
| 104 | + 'contrib-tracking-error' => 'Хата', |
| 105 | + 'contrib-tracking-error-text' => 'Форманы ебәреү хатаһы', |
| 106 | + 'contrib-tracking-submitting' => 'Түләүҙәрҙе эшкәртеү ҡоралына ебәреү...', |
| 107 | + 'contrib-tracking-continue' => 'Әгәр һеҙ автоматик рәүештә йүнәлтелгән булмаһағыҙ, PayPal сайтында иғәнә биреүҙе тамамлау өсөн, төймәгә баҫығыҙ.', |
| 108 | + 'contrib-tracking-button' => 'Дауам итергә', |
| 109 | +); |
| 110 | + |
98 | 111 | /** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
99 | 112 | * @author EugeneZelenko |
100 | 113 | * @author Jim-by |
— | — | @@ -128,9 +141,12 @@ |
129 | 142 | |
130 | 143 | /** Bengali (বাংলা) |
131 | 144 | * @author Bellayet |
| 145 | + * @author Wikitanvir |
132 | 146 | */ |
133 | 147 | $messages['bn'] = array( |
134 | 148 | 'contrib-tracking-error' => 'ত্রুটি', |
| 149 | + 'contrib-tracking-submitting' => 'পেমেন্ট প্রসেসরের কাছে প্রদান করা হচ্ছে...', |
| 150 | + 'contrib-tracking-continue' => 'আপনাকে যদি স্বয়ংক্রিয়ভাবে পুনর্নির্দেশিত করা না হয়, তবে পেপ্যাল-এ আপনার অনুদান সম্পন্ন করতে নিচের বাটনে ক্লিক করুন।', |
135 | 151 | 'contrib-tracking-button' => 'অগ্রসর হোন', |
136 | 152 | ); |
137 | 153 | |
— | — | @@ -158,6 +174,7 @@ |
159 | 175 | 'contrib-tracking-error-text' => 'Slanje nevaljanog obrasca', |
160 | 176 | 'contrib-tracking-submitting' => 'Šaljem za proces plaćanja...', |
161 | 177 | 'contrib-tracking-continue' => 'Ako niste automatski preusmjereni, kliknite na dugme da završite Vašu donaciju putem PayPala.', |
| 178 | + 'contrib-tracking-redirect' => 'Bit ćete automatski preusmjereni na PayPal da dovršite vašu donaciju.', |
162 | 179 | 'contrib-tracking-button' => 'nastavi', |
163 | 180 | ); |
164 | 181 | |
— | — | @@ -235,6 +252,7 @@ |
236 | 253 | 'contrib-tracking-error-text' => 'Njepłaśiwe słanje formulara', |
237 | 254 | 'contrib-tracking-submitting' => 'Płaśenje wótpósćeła se k wobźěłowanjeju...', |
238 | 255 | 'contrib-tracking-continue' => 'Joli njepósrědnjaš se awtomatiski dalej, klikni na tłocašk, aby dokóńcył swój dar pśez PayPal.', |
| 256 | + 'contrib-tracking-redirect' => 'Buźošo so awtomatiski k PayPaloju dalej pósrědnjaś, aby wy swójo pósćiwanje skóńcył.', |
239 | 257 | 'contrib-tracking-button' => 'Dalej', |
240 | 258 | ); |
241 | 259 | |
— | — | @@ -293,6 +311,7 @@ |
294 | 312 | 'contrib-tracking-error' => 'Viga', |
295 | 313 | 'contrib-tracking-submitting' => 'Maksevahendaja juurde suunamine...', |
296 | 314 | 'contrib-tracking-continue' => 'Kui sind ei suunata automaatselt, klõpsa nuppu, et annetus PayPalis lõpule viia.', |
| 315 | + 'contrib-tracking-redirect' => 'Annetuse lõpule viimiseks suunatakse sind automaatselt PayPali.', |
297 | 316 | 'contrib-tracking-button' => 'Jätka', |
298 | 317 | ); |
299 | 318 | |
— | — | @@ -363,6 +382,13 @@ |
364 | 383 | 'contrib-tracking-button' => 'Continuar', |
365 | 384 | ); |
366 | 385 | |
| 386 | +/** Friulian (Furlan) |
| 387 | + * @author Klenje |
| 388 | + */ |
| 389 | +$messages['fur'] = array( |
| 390 | + 'contrib-tracking-button' => 'Va indevant', |
| 391 | +); |
| 392 | + |
367 | 393 | /** Galician (Galego) |
368 | 394 | * @author Toliño |
369 | 395 | */ |
— | — | @@ -370,9 +396,9 @@ |
371 | 397 | 'contributiontracking-desc' => 'Seguimento das contribucións da recadación de fondos da Wikimedia', |
372 | 398 | 'contributiontracking' => 'Seguimento das contribucións', |
373 | 399 | 'contrib-tracking-error' => 'Erro', |
374 | | - 'contrib-tracking-error-text' => 'Formulario de proposta inválido', |
| 400 | + 'contrib-tracking-error-text' => 'Envío do formulario inválido', |
375 | 401 | 'contrib-tracking-submitting' => 'Enviando ao procesador de pagamentos...', |
376 | | - 'contrib-tracking-continue' => 'Se non é redirixido automaticamente, faga clic no botón para completar a súa doazón por PayPal.', |
| 402 | + 'contrib-tracking-continue' => 'Se non es redirixido automaticamente, fai clic no botón para completar a túa doazón por PayPal.', |
377 | 403 | 'contrib-tracking-redirect' => 'Serás redirixido automaticamente ao PayPal para completar a túa doazón.', |
378 | 404 | 'contrib-tracking-button' => 'Continuar', |
379 | 405 | ); |
— | — | @@ -409,6 +435,7 @@ |
410 | 436 | |
411 | 437 | /** Hebrew (עברית) |
412 | 438 | * @author Rotem Liss |
| 439 | + * @author YaronSh |
413 | 440 | */ |
414 | 441 | $messages['he'] = array( |
415 | 442 | 'contributiontracking-desc' => 'מעקב תרומות להתרמה לקרן ויקימדיה', |
— | — | @@ -417,6 +444,7 @@ |
418 | 445 | 'contrib-tracking-error-text' => 'שליחת פורום בלתי תקינה', |
419 | 446 | 'contrib-tracking-submitting' => 'נשלח למעבד התרומות...', |
420 | 447 | 'contrib-tracking-continue' => 'אם ההפניה אינה מתבצעת אוטומטית, לחצו על הכפתור כדי להשלים את תרומתכם באתר PayPal.', |
| 448 | + 'contrib-tracking-redirect' => 'כעת תתבצע העברה אוטומטית ל־PayPal כדי להשלים את תרומתך.', |
421 | 449 | 'contrib-tracking-button' => 'המשך', |
422 | 450 | ); |
423 | 451 | |
— | — | @@ -611,6 +639,7 @@ |
612 | 640 | 'contrib-tracking-error-text' => 'Feeler bäi der Iwwermëttlung vum Formulaire', |
613 | 641 | 'contrib-tracking-submitting' => 'Weiderschécken op de System fir ze bezuelen ...', |
614 | 642 | 'contrib-tracking-continue' => 'Wann Dir net automatesch virugeleed gitt, da clickt w.e.g. op de Knäppchen fir ären Don iwwer PayPal ofzeschléissen.', |
| 643 | + 'contrib-tracking-redirect' => 'Dir gitt automatesch op PayPal virugeleet fir Ären Don ofzeschléissen.', |
615 | 644 | 'contrib-tracking-button' => 'Weider', |
616 | 645 | ); |
617 | 646 | |
— | — | @@ -638,6 +667,13 @@ |
639 | 668 | 'contrib-tracking-button' => 'Tęsti', |
640 | 669 | ); |
641 | 670 | |
| 671 | +/** Latvian (Latviešu) |
| 672 | + * @author Papuass |
| 673 | + */ |
| 674 | +$messages['lv'] = array( |
| 675 | + 'contrib-tracking-button' => 'Turpināt', |
| 676 | +); |
| 677 | + |
642 | 678 | /** Eastern Mari (Олык Марий) |
643 | 679 | * @author Сай |
644 | 680 | */ |
— | — | @@ -717,6 +753,7 @@ |
718 | 754 | 'contrib-tracking-error-text' => 'Ongeldige formulierinvoer', |
719 | 755 | 'contrib-tracking-submitting' => 'Bezig met het uitvoeren van de betaling...', |
720 | 756 | 'contrib-tracking-continue' => 'Als u niet automatisch wordt doorgestuurd, klik dan op de knop om uw donatie via PayPal te voltooien.', |
| 757 | + 'contrib-tracking-redirect' => 'U wordt automatisch doorgeleid naar PayPal om de transactie te voltooien.', |
721 | 758 | 'contrib-tracking-button' => 'Doorgaan', |
722 | 759 | ); |
723 | 760 | |
— | — | @@ -823,6 +860,7 @@ |
824 | 861 | |
825 | 862 | /** Brazilian Portuguese (Português do Brasil) |
826 | 863 | * @author Eduardo.mps |
| 864 | + * @author Giro720 |
827 | 865 | */ |
828 | 866 | $messages['pt-br'] = array( |
829 | 867 | 'contributiontracking-desc' => 'Seguimento de doações para a coleta de fundos da Wikimedia', |
— | — | @@ -831,15 +869,19 @@ |
832 | 870 | 'contrib-tracking-error-text' => 'Submissão de formulário inválida', |
833 | 871 | 'contrib-tracking-submitting' => 'Submetendo ao processador de pagamentos...', |
834 | 872 | 'contrib-tracking-continue' => 'Se você não for redirecionado automaticamente, clique no botão para completar a sua doação no PayPal.', |
| 873 | + 'contrib-tracking-redirect' => 'Será reencaminhado automaticamente para o Paypal para terminar a sua doação.', |
835 | 874 | 'contrib-tracking-button' => 'Continuar', |
836 | 875 | ); |
837 | 876 | |
838 | 877 | /** Romanian (Română) |
| 878 | + * @author Firilacroco |
839 | 879 | * @author KlaudiuMihaila |
840 | 880 | * @author Stelistcristi |
841 | 881 | */ |
842 | 882 | $messages['ro'] = array( |
843 | 883 | 'contrib-tracking-error' => 'Eroare', |
| 884 | + 'contrib-tracking-error-text' => 'Trimiterea formularului este invalidă', |
| 885 | + 'contrib-tracking-submitting' => 'Trimitere la procesorul de plată...', |
844 | 886 | 'contrib-tracking-button' => 'Continuați', |
845 | 887 | ); |
846 | 888 | |
— | — | @@ -866,6 +908,17 @@ |
867 | 909 | 'contrib-tracking-button' => 'Продолжить', |
868 | 910 | ); |
869 | 911 | |
| 912 | +/** Rusyn (Русиньскый) |
| 913 | + * @author Gazeb |
| 914 | + */ |
| 915 | +$messages['rue'] = array( |
| 916 | + 'contributiontracking' => 'Слїдованя приспевків', |
| 917 | + 'contrib-tracking-error' => 'Хыба', |
| 918 | + 'contrib-tracking-error-text' => 'Одосланый формуларь не быв правилно выповненый', |
| 919 | + 'contrib-tracking-submitting' => 'Платба ся одосылать про спрацованя ...', |
| 920 | + 'contrib-tracking-button' => 'Продовжовати', |
| 921 | +); |
| 922 | + |
870 | 923 | /** Yakut (Саха тыла) |
871 | 924 | * @author HalanTul |
872 | 925 | */ |
— | — | @@ -947,11 +1000,20 @@ |
948 | 1001 | 'contrib-tracking-error' => 'Hitilafu', |
949 | 1002 | ); |
950 | 1003 | |
| 1004 | +/** Tamil (தமிழ்) |
| 1005 | + * @author TRYPPN |
| 1006 | + */ |
| 1007 | +$messages['ta'] = array( |
| 1008 | + 'contrib-tracking-error' => 'தவறு', |
| 1009 | + 'contrib-tracking-button' => 'தொடரவும்', |
| 1010 | +); |
| 1011 | + |
951 | 1012 | /** Telugu (తెలుగు) |
952 | 1013 | * @author Veeven |
953 | 1014 | */ |
954 | 1015 | $messages['te'] = array( |
955 | 1016 | 'contrib-tracking-error' => 'పొరపాటు', |
| 1017 | + 'contrib-tracking-continue' => 'స్వయంచాలకంగా మిమ్మల్ని దారి మళ్ళించకపోతే, పేపాల్ లో మీ విరాళాన్ని పూర్తిచెయ్యడానికి మీరే బొత్తాన్ని నొక్కండి.', |
956 | 1018 | 'contrib-tracking-button' => 'కొనసాగించు', |
957 | 1019 | ); |
958 | 1020 | |
— | — | @@ -1024,6 +1086,7 @@ |
1025 | 1087 | |
1026 | 1088 | /** Ukrainian (Українська) |
1027 | 1089 | * @author Aleksandrit |
| 1090 | + * @author Тест |
1028 | 1091 | */ |
1029 | 1092 | $messages['uk'] = array( |
1030 | 1093 | 'contributiontracking-desc' => 'Відстеження збору пожертвувань на користь Вікімедіі', |
— | — | @@ -1032,6 +1095,7 @@ |
1033 | 1096 | 'contrib-tracking-error-text' => 'Неправильне підпорядкування форми', |
1034 | 1097 | 'contrib-tracking-submitting' => 'Відправка оброблювачеві платежів...', |
1035 | 1098 | 'contrib-tracking-continue' => 'Якщо ви не були автоматично перенаправлені, натисніть на кнопку, щоб завершити вашу пожертву на сайті PayPal.', |
| 1099 | + 'contrib-tracking-redirect' => 'Ви будете автоматично перенаправлені на PayPal для завершення вашого пожертвування.', |
1036 | 1100 | 'contrib-tracking-button' => 'Продовжити', |
1037 | 1101 | ); |
1038 | 1102 | |
Index: branches/wmf/1.16wmf4/extensions/ContributionTracking/ContributionTracking.php |
— | — | @@ -23,12 +23,73 @@ |
24 | 24 | $wgExtensionAliasesFiles['ContributionTracking'] = $dir . 'ContributionTracking.alias.php'; |
25 | 25 | $wgAutoloadClasses['ContributionTracking'] = $dir . 'ContributionTracking_body.php'; |
26 | 26 | $wgSpecialPages['ContributionTracking'] = 'ContributionTracking'; |
| 27 | +//this only works if contribution tracking is inside a mediawiki DB, which typically it isn't. |
| 28 | +//$wgHooks['LoadExtensionSchemaUpdates'][] = 'efContributionTrackingLoadUpdates'; |
27 | 29 | |
| 30 | +/** |
| 31 | + * The default 'return to' URL for a thank you page after posting to the contribution |
| 32 | + * |
| 33 | + * NO trailing slash, please |
| 34 | + */ |
| 35 | +$wgContributionTrackingReturnToURLDefault = 'http://wikimediafoundation.org/wiki/Thank_You'; |
| 36 | + |
28 | 37 | $wgContributionTrackingDBserver = $wgDBserver; |
29 | 38 | $wgContributionTrackingDBname = $wgDBname; |
30 | 39 | $wgContributionTrackingDBuser = $wgDBuser; |
31 | 40 | $wgContributionTrackingDBpassword = $wgDBpassword; |
32 | 41 | |
| 42 | +/** |
| 43 | + * IPN listener address for regular PayPal trxns |
| 44 | + */ |
| 45 | +$wgContributionTrackingPayPalIPN = 'https://civicrm.wikimedia.org/fundcore_gateway/paypal'; |
| 46 | + |
| 47 | +/** |
| 48 | + * IPN listener address for recurring payment PayPal trxns |
| 49 | + */ |
| 50 | +$wgContributionTrackingPayPalRecurringIPN = 'https://civicrm.wikimedia.org/fundcore_gateway/paypal'; |
| 51 | + |
| 52 | +/** |
| 53 | + * 'Business' string for PayPal |
| 54 | + */ |
| 55 | +$wgContributionTrackingPayPalBusiness = 'donations@wikimedia.org'; |
| 56 | + |
| 57 | +function efContributionTrackingLoadUpdates(){ |
| 58 | + global $wgExtNewTables, $wgExtNewFields; |
| 59 | + $dir = dirname( __FILE__ ) . '/'; |
| 60 | + $wgExtNewTables[] = array( 'contribution_tracking', $dir . 'ContributionTracking.sql' ); |
| 61 | + $wgExtNewTables[] = array( 'contribution_tracking_owa_ref', $dir . 'ContributionTracking_OWA_ref.sql' ); |
| 62 | + |
| 63 | + $wgExtNewFields[] = array( |
| 64 | + 'contribution_tracking', |
| 65 | + 'owa_session', |
| 66 | + $dir . 'patch-owa.sql', |
| 67 | + ); |
| 68 | + return true; |
| 69 | + |
| 70 | +} |
| 71 | + |
| 72 | + //convert a referrer URL to an index in the owa_ref table |
| 73 | +function ef_contribution_tracking_owa_get_ref_id($ref){ |
| 74 | + // Replication lag means sometimes a new event will not exist in the table yet |
| 75 | + $dbw = contributionTrackingConnection(); |
| 76 | + $id_num = $dbw->selectField( |
| 77 | + 'contribution_tracking_owa_ref', |
| 78 | + 'id', |
| 79 | + array( 'url' => $ref ), |
| 80 | + __METHOD__ |
| 81 | + ); |
| 82 | + // Once we're on mysql 5, we can use replace() instead of this selectField --> insert or update hooey |
| 83 | + if ( $id_num === false ) { |
| 84 | + $dbw->insert( |
| 85 | + 'contribution_tracking_owa_ref', |
| 86 | + array( 'url' => (string) $ref ), |
| 87 | + __METHOD__ |
| 88 | + ); |
| 89 | + $id_num = $dbw->insertId(); |
| 90 | + } |
| 91 | + return $id_num === false ? 0 : $id_num; |
| 92 | + } |
| 93 | + |
33 | 94 | function contributionTrackingConnection() { |
34 | 95 | global $wgContributionTrackingDBserver, $wgContributionTrackingDBname; |
35 | 96 | global $wgContributionTrackingDBuser, $wgContributionTrackingDBpassword; |
Property changes on: branches/wmf/1.16wmf4/extensions/ContributionTracking |
___________________________________________________________________ |
Modified: svn:mergeinfo |
36 | 97 | Merged /trunk/extensions/ContributionTracking:r74437-74439,74494-77266,77400-77443,77445-78134 |