r104707 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104706‎ | r104707 | r104708 >
Date:17:31, 30 November 2011
Author:khorn
Status:ok
Tags:
Comment:
Added lots of log statements to GC's resultswitcher to facilitate solving the case of the unreproducable whitescreen.
Also, minimal cleanup.
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -72,7 +72,7 @@
7373 $oid = $wgRequest->getText( 'order_id' );
7474
7575 //this next block is for credit card coming back from GC. Only that. Nothing else, ever.
76 - if ( $this->adapter->getData_Raw( 'payment_method') === 'cc' && $this->adapter->hasDonorDataInSession( 'order_id', $_GET['order_id'] ) ) {
 76+ if ( $this->adapter->getData_Raw( 'payment_method') === 'cc' ) {
7777 if ( !array_key_exists( 'order_status', $_SESSION ) || !array_key_exists( $oid, $_SESSION['order_status'] ) ) {
7878 $_SESSION['order_status'][$oid] = $this->adapter->do_transaction( 'Confirm_CreditCard' );
7979 $_SESSION['order_status'][$oid]['data']['count'] = 0;
@@ -98,10 +98,18 @@
9999 if ($go) {
100100 $wgOut->addHTML( "<br>Redirecting to page $go" );
101101 $wgOut->redirect( $go );
102 - } //TODO: There really should be an else here.
 102+ } else {
 103+ $this->adapter->log("Resultswitcher: No redirect defined.");
 104+ }
 105+ } else {
 106+ $this->adapter->log("Resultswitcher: No TransactionWMFStatus.");
103107 }
104 - }
105 - }
 108+ } else {
 109+ $this->adapter->log("Resultswitcher: Payment method is not cc.");
 110+ }
 111+ } else {
 112+ $this->adapter->log("Resultswitcher: Token Check Failed.");
 113+ }
106114 }
107115
108116 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r104709MFT r104707khorn17:47, 30 November 2011
r104717followup r104707...khorn19:00, 30 November 2011

Status & tagging log