r79408 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79407‎ | r79408 | r79409 >
Date:02:07, 1 January 2011
Author:kaldari
Status:reverted
Tags:
Comment:
adding country to tracking table
Modified paths:
  • /trunk/extensions/ContributionTracking/ContributionTracking_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionTracking/ContributionTracking_body.php
@@ -28,6 +28,7 @@
2929
3030
3131 function execute( $language ) {
 32+ require_once( 'countryCodes.inc' );
3233 global $wgRequest, $wgOut, $wgContributionTrackingPayPalIPN, $wgContributionTrackingReturnToURLDefault,
3334 $wgContributionTrackingPayPalRecurringIPN, $wgContributionTrackingPayPalBusiness;
3435
@@ -52,6 +53,14 @@
5354 if($owa_ref != null && !is_numeric($owa_ref)){
5455 $owa_ref = $this->get_owa_ref_id($owa_ref);
5556 }
 57+
 58+ // Translate the shipping country from a code to a country name
 59+ $country = '';
 60+ $code = $wgRequest->getText('country2');
 61+ if ( $code ) {
 62+ $countries = countryCodes();
 63+ $country = $countries[$code];
 64+ }
5665
5766 $tracked_contribution = array(
5867 'note' => $wgRequest->getText('comment', null),
@@ -62,6 +71,7 @@
6372 'utm_campaign' => $wgRequest->getText('utm_campaign', null),
6473 'optout' => ($wgRequest->getCheck('email-opt', 0) ? 0 : 1),
6574 'language' => $wgRequest->getText('language', null),
 75+ 'country' => $country,
6676 'owa_session' => $wgRequest->getText('owa_session', null),
6777 'owa_ref' => $owa_ref,
6878 'ts' => $ts,

Follow-up revisions

RevisionCommit summaryAuthorDate
r93115Revert r79408 and delete countryCodes.inc - were changes made immediately pos...awjrichards21:04, 25 July 2011

Status & tagging log