r100476 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100475‎ | r100476 | r100477 >
Date:23:51, 21 October 2011
Author:kaldari
Status:reverted (Comments)
Tags:
Comment:
follow-up to r98202 - some comments and fixes
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/DonationData.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_common/GatewayForm.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -46,7 +46,7 @@
4747 //and then pop out. Maybe. We're probably going to have to test it a couple different ways, for user experience.
4848 //However, we're _definitely_ going to need to pop out _before_ we redirect to the thank you or fail pages.
4949 if ( strpos( $referrer, $wgServer ) === false ) {
50 - $wgOut->allowClickjacking();
 50+ $wgOut->allowClickjacking(); // so we can embed in an iframe when necessary
5151 $wgOut->addModules( 'iframe.liberator' );
5252 return;
5353 }
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
@@ -44,7 +44,7 @@
4545 global $wgRequest, $wgOut, $wgExtensionAssetsPath;
4646 $CSSVersion = $this->adapter->getGlobal( 'CSSVersion' );
4747
48 - $wgOut->allowClickjacking();
 48+ $wgOut->allowClickjacking(); // so we can embed in an iframe when necessary
4949
5050 $wgOut->addExtensionStyle(
5151 $wgExtensionAssetsPath . '/DonationInterface/gateway_forms/css/gateway.css?284' .
Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
@@ -1103,9 +1103,10 @@
11041104 // refresh our data
11051105 $this->postdata = $this->dataObj->getData();
11061106
1107 - //update contribution tracking
 1107+ // update contribution tracking
11081108 $this->dataObj->updateContributionTracking( true );
11091109
 1110+ // Build the redirect URL. $this->postdata['language'] is escaped by sanitizeInput().
11101111 $ret = self::getGlobal( "PaypalURL" ) . "/" . $this->postdata['language'] . "?gateway=paypal&" . http_build_query( $this->getPaypalData() );
11111112 self::log( $ret );
11121113 return $ret;
@@ -1255,7 +1256,7 @@
12561257 }
12571258
12581259 public function getFormClass() {
1259 - if ( isset( $this->form_class ) && class_exists( $this->form_class ) ) {
 1260+ if ( isset( $this->form_class ) && MWInit::classExists( $this->form_class ) ) {
12601261 return $this->form_class;
12611262 } else {
12621263 return false;
Index: trunk/extensions/DonationInterface/gateway_common/DonationData.php
@@ -708,7 +708,7 @@
709709 }
710710
711711 function getAdapterClass(){
712 - if ( class_exists( $this->boss ) ) {
 712+ if ( MWInit::classExists( $this->boss ) ) {
713713 return $this->boss;
714714 } else {
715715 return false;
Index: trunk/extensions/DonationInterface/gateway_common/GatewayForm.php
@@ -334,10 +334,10 @@
335335
336336 // make sure our form class exists before going on, if not try loading default form class
337337 $class_name = "Gateway_Form_" . $form_class;
338 - if ( !class_exists( $class_name ) ) {
 338+ if ( !MWInit::classExists( $class_name ) ) {
339339 $class_name_orig = $class_name;
340340 $class_name = "Gateway_Form_" . $defaultForm;
341 - if ( !class_exists( $class_name ) ) {
 341+ if ( !MWInit::classExists( $class_name ) ) {
342342 throw new MWException( 'Could not load form ' . $class_name_orig . ' nor default form ' . $class_name );
343343 }
344344 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r100486Reverting r100476, due to the part where MWInit doesn't exist in 1.17, and we...khorn02:01, 22 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98202More refactoring work for the gateway adapters, mostly surrounding the specia...khorn00:48, 27 September 2011

Comments

#Comment by Khorn (WMF) (talk | contribs)   02:01, 22 October 2011

Reverted because MWInit doesn't exist yet (on 1.17).

Status & tagging log