Index: branches/fundraising/extensions/DonationInterface/gateway_common/gateway.adapter.php |
— | — | @@ -150,6 +150,7 @@ |
151 | 151 | * @see DonationData |
152 | 152 | */ |
153 | 153 | public function __construct( $options = array() ) { |
| 154 | + global $wgRequest; |
154 | 155 | |
155 | 156 | // Extract the options |
156 | 157 | extract( $options ); |
— | — | @@ -175,7 +176,7 @@ |
176 | 177 | |
177 | 178 | $this->postdata = $this->dataObj->getData(); |
178 | 179 | //TODO: Fix this a bit. |
179 | | - $this->posted = $this->dataObj->wasPosted(); |
| 180 | + $this->posted = $wgRequest->wasPosted(); |
180 | 181 | |
181 | 182 | $this->setPostDefaults( $postDefaults ); |
182 | 183 | $this->defineTransactions(); |
Index: branches/fundraising/extensions/DonationInterface/gateway_common/DonationData.php |
— | — | @@ -424,6 +424,7 @@ |
425 | 425 | } |
426 | 426 | |
427 | 427 | public function checkTokens() { |
| 428 | + global $wgRequest; |
428 | 429 | static $match = null; |
429 | 430 | |
430 | 431 | if ( $match === null ) { |
— | — | @@ -440,7 +441,7 @@ |
441 | 442 | // match token |
442 | 443 | $token_check = ( $this->isSomething( 'token' ) ) ? $this->getVal( 'token' ) : $token; //TODO: does this suck as much as it looks like it does? |
443 | 444 | $match = $this->matchEditToken( $token_check, $salt ); |
444 | | - if ( $this->wasPosted() ) { |
| 445 | + if ( $wgRequest->wasPosted() ) { |
445 | 446 | $this->log( $this->getAnnoyingOrderIDLogLinePrefix() . ' Submitted edit token: ' . $this->getVal( 'token' ), LOG_DEBUG ); |
446 | 447 | $this->log( $this->getAnnoyingOrderIDLogLinePrefix() . ' Token match: ' . ($match ? 'true' : 'false' ), LOG_DEBUG ); |
447 | 448 | } |
— | — | @@ -449,14 +450,6 @@ |
450 | 451 | return $match; |
451 | 452 | } |
452 | 453 | |
453 | | - function wasPosted() { |
454 | | - //TODO: Get rid of these log statements. |
455 | | - if ( $this->isSomething( 'posted' ) ) { |
456 | | - return true; |
457 | | - } |
458 | | - return false; |
459 | | - } |
460 | | - |
461 | 454 | /** |
462 | 455 | * Get the utm_source string |
463 | 456 | * |