r99279 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99278‎ | r99279 | r99280 >
Date:22:56, 7 October 2011
Author:jpostlethwaite
Status:ok (Comments)
Tags:fundraising 
Comment:
Using global variable for $wgOut instead of passing a reference. See r98479.
Modified paths:
  • /branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php (modified) (history)

Diff [purge]

Index: branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
@@ -119,11 +119,11 @@
120120 switch ( $this->adapter->getTransactionType() ) {
121121
122122 case 'BANK_TRANSFER':
123 - $this->executeBankTransfer( $wgOut );
 123+ $this->executeBankTransfer();
124124 break;
125125
126126 case 'INSERT_ORDERWITHPAYMENT':
127 - $this->executeInsertOrderWithPayment( $wgOut );
 127+ $this->executeInsertOrderWithPayment();
128128 break;
129129
130130 default:
@@ -157,11 +157,11 @@
158158
159159 /**
160160 * Execute BANK_TRANSFER
161 - *
162 - * @param OutputPage $wgOut
163161 */
164 - public function executeBankTransfer( &$wgOut ) {
 162+ public function executeBankTransfer() {
165163
 164+ //global $wgOut;
 165+
166166 $result = $this->adapter->do_transaction( 'BANK_TRANSFER' );
167167 $this->adapter->addDonorDataToSession();
168168
@@ -170,11 +170,11 @@
171171
172172 /**
173173 * Execute INSERT_ORDERWITHPAYMENT
174 - *
175 - * @param OutputPage $wgOut
176174 */
177 - public function executeInsertOrderWithPayment( &$wgOut ) {
 175+ public function executeInsertOrderWithPayment() {
178176
 177+ global $wgOut;
 178+
179179 $result = $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
180180 $this->adapter->addDonorDataToSession();
181181 //$result = $this->adapter->do_transaction( 'TEST_CONNECTION' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98479Added helper execute methods to process different transaction types. The new ...jpostlethwaite22:27, 29 September 2011

Comments

#Comment by Johnduhart (talk | contribs)   22:59, 7 October 2011
+		//global $wgOut;
+

Why?

#Comment by Jpostlethwaite (talk | contribs)   23:01, 7 October 2011

executeBankTransfer() is not a complete method and will have to output to the browser. It is just a reminder.

executeInsertOrderWithPayment() is complete and is doing this.

#Comment by Johnduhart (talk | contribs)   23:02, 7 October 2011

Ah, okay.

Status & tagging log