r101780 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101779‎ | r101780 | r101781 >
Date:02:41, 3 November 2011
Author:awjrichards
Status:deferred
Tags:
Comment:
Modified paths:
  • /branches/fundraising/deployment/payments_1.17/extensions/DonationInterface (modified) (history)
  • /branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php (modified) (history)

Diff [purge]

Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -111,20 +111,27 @@
112112 // general decline message
113113 $declinedDefault = wfMsg( 'php-response-declined' );
114114
115 - $data = $this->adapter->getData();
116 - $referrer = $data['referrer'];
117 - unset( $data['referrer'] );
118 - $data['amount'] = $data['amount']/100;
119 - $data['error'] = $declinedDefault;
120 - $params = wfArrayToCGI( $data );
 115+ $displayData = $this->adapter->getDisplayData();
 116+ $referrer = $displayData['referrer'];
121117
122 - // Make sure the referrer has a query string
123 - if ( strpos( $referrer, '?' ) === false ) {
124 - $returnto = htmlspecialchars_decode( $referrer ) . '?' . $params;
125 - } else {
126 - $returnto = htmlspecialchars_decode( $referrer ) . '&' . $params;
127 - }
 118+ $queryArray = array (
 119+ 'fname' => $displayData['fname'],
 120+ 'lname' => $displayData['lname'],
 121+ 'street' => $displayData['street'],
 122+ 'city' => $displayData['city'],
 123+ 'state' => $displayData['state'],
 124+ 'zip' => $displayData['zip'],
 125+ 'country' => $displayData['country'],
 126+ 'utm_source' => $displayData['utm_source'],
 127+ 'utm_medium' => $displayData['utm_medium'],
 128+ 'utm_campaign' => $displayData['utm_campaign'],
 129+ 'numAttempt' => $displayData['numAttempt'],
 130+ 'error' => $declinedDefault,
 131+ );
128132
 133+ // TODO: figure out something better so we aren't expanding the URL after every attempt.
 134+ $returnto = wfAppendQuery( htmlspecialchars_decode( $referrer ), $queryArray );
 135+
129136 // Return the referrer URL with the data included in the query string
130137 return $returnto;
131138 }
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface
___________________________________________________________________
Modified: svn:mergeinfo
132139 Merged /trunk/extensions/DonationInterface:r101779

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101779follow-up to r101764, better URL building and switching to getDisplayDatakaldari02:30, 3 November 2011

Status & tagging log