Ejegg has submitted this change and it was merged.

Change subject: Rename GatewayForm to GatewayPage to distinguish from 
Gateway_Form
......................................................................


Rename GatewayForm to GatewayPage to distinguish from Gateway_Form

Changes the name of the GatewayForm that extends UnlistedSpecialPage,
since Gateway_Form really is specialized to render forms

Change-Id: I92f874bc3c8690208dedada115f088677ce04e51
---
M DonationInterface.php
M adyen_gateway/adyen_gateway.body.php
M adyen_gateway/adyen_resultswitcher.body.php
M amazon_gateway/amazon_gateway.body.php
M extras/custom_filters/filters/minfraud/minfraud.body.php
R gateway_common/GatewayPage.php
M gateway_forms/Form.php
M gateway_forms/RapidHtml.php
M globalcollect_gateway/globalcollect_gateway.body.php
M globalcollect_gateway/globalcollect_resultswitcher.body.php
M payflowpro_gateway/payflowpro_gateway.body.php
M paypal_gateway/paypal_gateway.body.php
M paypal_gateway/paypal_resultswitcher.body.php
M worldpay_gateway/worldpay_gateway.body.php
14 files changed, 16 insertions(+), 18 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved



diff --git a/DonationInterface.php b/DonationInterface.php
index 14d44ac..92c173f 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -103,7 +103,7 @@
 $wgAutoloadClasses['DonationData'] = $donationinterface_dir . 
'gateway_common/DonationData.php';
 $wgAutoloadClasses['EncodingMangler'] = $donationinterface_dir . 
'gateway_common/EncodingMangler.php';
 $wgAutoloadClasses['GatewayAdapter'] = $donationinterface_dir . 
'gateway_common/gateway.adapter.php';
-$wgAutoloadClasses['GatewayForm'] = $donationinterface_dir . 
'gateway_common/GatewayForm.php';
+$wgAutoloadClasses['GatewayPage'] = $donationinterface_dir . 
'gateway_common/GatewayPage.php';
 $wgAutoloadClasses['DataValidator'] = $donationinterface_dir . 
'gateway_common/DataValidator.php';
 $wgAutoloadClasses['PaymentMethod'] = $donationinterface_dir . 
'gateway_common/PaymentMethod.php';
 
diff --git a/adyen_gateway/adyen_gateway.body.php 
b/adyen_gateway/adyen_gateway.body.php
index 8a72fba..05a37ae 100644
--- a/adyen_gateway/adyen_gateway.body.php
+++ b/adyen_gateway/adyen_gateway.body.php
@@ -20,7 +20,7 @@
  * AdyenGateway
  *
  */
-class AdyenGateway extends GatewayForm {
+class AdyenGateway extends GatewayPage {
 
        /**
         * Constructor - set up the new special page
diff --git a/adyen_gateway/adyen_resultswitcher.body.php 
b/adyen_gateway/adyen_resultswitcher.body.php
index 1c05364..72bbe5a 100644
--- a/adyen_gateway/adyen_resultswitcher.body.php
+++ b/adyen_gateway/adyen_resultswitcher.body.php
@@ -1,6 +1,6 @@
 <?php
 
-class AdyenGatewayResult extends GatewayForm {
+class AdyenGatewayResult extends GatewayPage {
 
        /**
         * Defines the action to take on a Adyen transaction.
diff --git a/amazon_gateway/amazon_gateway.body.php 
b/amazon_gateway/amazon_gateway.body.php
index f6ddc10..785f4b9 100644
--- a/amazon_gateway/amazon_gateway.body.php
+++ b/amazon_gateway/amazon_gateway.body.php
@@ -16,7 +16,7 @@
  *
  */
 
-class AmazonGateway extends GatewayForm {
+class AmazonGateway extends GatewayPage {
        /**
         * Constructor - set up the new special page
         */
diff --git a/extras/custom_filters/filters/minfraud/minfraud.body.php 
b/extras/custom_filters/filters/minfraud/minfraud.body.php
index 686bcf7..1100bfa 100644
--- a/extras/custom_filters/filters/minfraud/minfraud.body.php
+++ b/extras/custom_filters/filters/minfraud/minfraud.body.php
@@ -164,7 +164,7 @@
                $this->minfraudQuery['accept_language'] = 
$wgRequest->getHeader( 'accept-language' );
 
                // fetch the array of country codes
-               $country_codes = GatewayForm::getCountries();
+               $country_codes = GatewayPage::getCountries();
 
                // loop through the map and add pertinent values from $data to 
the hash
                foreach ( $map as $key => $value ) {
diff --git a/gateway_common/GatewayForm.php b/gateway_common/GatewayPage.php
similarity index 98%
rename from gateway_common/GatewayForm.php
rename to gateway_common/GatewayPage.php
index 31b9b10..4a3524e 100644
--- a/gateway_common/GatewayForm.php
+++ b/gateway_common/GatewayPage.php
@@ -17,14 +17,14 @@
  */
 
 /**
- * GatewayForm
+ * GatewayPage
  * This class is the generic unlisted special page in charge of actually 
  * displaying the form. Each gateway will have one or more direct descendants 
of 
  * this class, with most of the gateway-specific control logic in its 
handleRequest
  * function. For instance: 
extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
  *
  */
-abstract class GatewayForm extends UnlistedSpecialPage {
+abstract class GatewayPage extends UnlistedSpecialPage {
        /**
         * An array of form errors
         * @var array $errors
@@ -385,5 +385,3 @@
        }
 
 }
-
-//end of GatewayForm class definiton
diff --git a/gateway_forms/Form.php b/gateway_forms/Form.php
index 150c8bc..220fd66 100644
--- a/gateway_forms/Form.php
+++ b/gateway_forms/Form.php
@@ -162,7 +162,7 @@
                $country_options = '';
 
                // create a new array of countries with potentially translated 
country names for alphabetizing later
-               foreach ( GatewayForm::getCountries() as $iso_value => 
$full_name ) {
+               foreach ( GatewayPage::getCountries() as $iso_value => 
$full_name ) {
                        $countries[$iso_value] = wfMessage( 
'donate_interface-country-dropdown-' . $iso_value )->text();
                }
 
diff --git a/gateway_forms/RapidHtml.php b/gateway_forms/RapidHtml.php
index c83a95d..acefe86 100644
--- a/gateway_forms/RapidHtml.php
+++ b/gateway_forms/RapidHtml.php
@@ -563,7 +563,7 @@
                global $wgDonationInterfaceForbiddenCountries;
 
                //returns an array of iso_code => country name
-               $countries = GatewayForm::getCountries();
+               $countries = GatewayPage::getCountries();
 
                //unset blacklisted countries first
                foreach ( $wgDonationInterfaceForbiddenCountries as 
$country_code ) {
diff --git a/globalcollect_gateway/globalcollect_gateway.body.php 
b/globalcollect_gateway/globalcollect_gateway.body.php
index 92883c0..b5fbe04 100644
--- a/globalcollect_gateway/globalcollect_gateway.body.php
+++ b/globalcollect_gateway/globalcollect_gateway.body.php
@@ -20,7 +20,7 @@
  * GlobalCollectGateway
  *
  */
-class GlobalCollectGateway extends GatewayForm {
+class GlobalCollectGateway extends GatewayPage {
        /**
         * Constructor - set up the new special page
         */
diff --git a/globalcollect_gateway/globalcollect_resultswitcher.body.php 
b/globalcollect_gateway/globalcollect_resultswitcher.body.php
index 40a7cb0..eca5b13 100644
--- a/globalcollect_gateway/globalcollect_resultswitcher.body.php
+++ b/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -1,6 +1,6 @@
 <?php
 
-class GlobalCollectGatewayResult extends GatewayForm {
+class GlobalCollectGatewayResult extends GatewayPage {
        /**
         * Defines the action to take on a GlobalCollect transaction.
         *
diff --git a/payflowpro_gateway/payflowpro_gateway.body.php 
b/payflowpro_gateway/payflowpro_gateway.body.php
index 02562ef..f0c9c57 100644
--- a/payflowpro_gateway/payflowpro_gateway.body.php
+++ b/payflowpro_gateway/payflowpro_gateway.body.php
@@ -1,6 +1,6 @@
 <?php
 
-class PayflowProGateway extends GatewayForm {
+class PayflowProGateway extends GatewayPage {
        /**
         * Constructor - set up the new special page
         */
@@ -130,7 +130,7 @@
                        $this->getOutput()->addHTML( '<h3 
class="response_message">' . htmlspecialchars( $responseMsg, ENT_QUOTES ) . 
'</h3>' );
 
                        // translate country code into text
-                       $countries = GatewayForm::getCountries();
+                       $countries = GatewayPage::getCountries();
 
                        $rows = array(
                                'title' => array( $this->msg( 
'donate_interface-post-transaction' )->text() ),
diff --git a/paypal_gateway/paypal_gateway.body.php 
b/paypal_gateway/paypal_gateway.body.php
index 8f4afc7..1d703f8 100644
--- a/paypal_gateway/paypal_gateway.body.php
+++ b/paypal_gateway/paypal_gateway.body.php
@@ -16,7 +16,7 @@
  *
  */
 
-class PaypalGateway extends GatewayForm {
+class PaypalGateway extends GatewayPage {
 
        /**
         * Constructor - set up the new special page
diff --git a/paypal_gateway/paypal_resultswitcher.body.php 
b/paypal_gateway/paypal_resultswitcher.body.php
index 19ef3be..3056534 100644
--- a/paypal_gateway/paypal_resultswitcher.body.php
+++ b/paypal_gateway/paypal_resultswitcher.body.php
@@ -1,6 +1,6 @@
 <?php
 
-class PaypalGatewayResult extends GatewayForm {
+class PaypalGatewayResult extends GatewayPage {
 
        /**
         * Defines the action to take on a Paypal transaction.
diff --git a/worldpay_gateway/worldpay_gateway.body.php 
b/worldpay_gateway/worldpay_gateway.body.php
index f35badb..2b6e149 100644
--- a/worldpay_gateway/worldpay_gateway.body.php
+++ b/worldpay_gateway/worldpay_gateway.body.php
@@ -20,7 +20,7 @@
  * WorldPayGateway
  *
  */
-class WorldPayGateway extends GatewayForm {
+class WorldPayGateway extends GatewayPage {
 
        /**
         * Constructor - set up the new special page

-- 
To view, visit https://gerrit.wikimedia.org/r/156873
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I92f874bc3c8690208dedada115f088677ce04e51
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deploy-payments_1.22
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to