jenkins-bot has submitted this change and it was merged.

Change subject: Fix maintenance form display
......................................................................


Fix maintenance form display

Make Mustache forms default, show maintenance forms.

Bug: T86248
Change-Id: Ib96697f3c7c7d9bbdec4b63d6a2b5f6b4db4eaed
---
M adyen_gateway/adyen.adapter.php
M amazon_gateway/amazon.adapter.php
M astropay_gateway/astropay.adapter.php
M gateway_common/gateway.adapter.php
M globalcollect_gateway/globalcollect.adapter.php
M paypal_gateway/paypal.adapter.php
M worldpay_gateway/worldpay.adapter.php
7 files changed, 17 insertions(+), 23 deletions(-)

Approvals:
  Cdentinger: Looks good to me, approved
  Awight: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index 84875a9..c880fda 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -30,10 +30,6 @@
                return 'namevalue';
        }
 
-       public function getFormClass() {
-               return 'Gateway_Form_Mustache';
-       }
-
        public function getRequiredFields() {
                $fields = parent::getRequiredFields();
                $fields[] = 'address';
diff --git a/amazon_gateway/amazon.adapter.php 
b/amazon_gateway/amazon.adapter.php
index 1885731..0fb3ebf 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -64,14 +64,6 @@
                $this->session_addDonorData();
        }
 
-       public function getFormClass() {
-               if ( strpos( $this->dataObj->getVal_Escaped( 'ffname' ), 
'error' ) === 0 ) {
-                       // TODO: make a mustache error form
-                       return parent::getFormClass();
-               }
-               return 'Gateway_Form_Mustache';
-       }
-
        public function getCommunicationType() {
                return 'xml';
        }
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 0937866..24436e3 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -26,14 +26,6 @@
        const IDENTIFIER = 'astropay';
        const GLOBAL_PREFIX = 'wgAstropayGateway';
 
-       public function getFormClass() {
-               if ( strpos( $this->dataObj->getVal_Escaped( 'ffname' ), 
'error') === 0 ) {
-                       // TODO: make a mustache error form
-                       return parent::getFormClass();
-               }
-               return 'Gateway_Form_Mustache';
-       }
-
        public function getCommunicationType() {
                return 'namevalue';
        }
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 2fbec85..cf2703e 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -2424,7 +2424,13 @@
        }
 
        public function getFormClass() {
-               return 'Gateway_Form_RapidHtml';
+               $ffname = $this->dataObj->getVal_Escaped( 'ffname' );
+               if ( strpos( $ffname, 'error') === 0
+                       || strpos( $ffname, 'maintenance') === 0 ) {
+                       // TODO: make a mustache error form
+                       return 'Gateway_Form_RapidHtml';
+               }
+               return 'Gateway_Form_Mustache';
        }
 
        public function getGatewayAdapterClass() {
diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index f0b57f6..068e4c6 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -31,6 +31,10 @@
                return 'xml';
        }
 
+       public function getFormClass() {
+               return 'Gateway_Form_RapidHtml';
+       }
+
        /**
         * Add a key to the transaction INSERT_ORDERWITHPAYMENT.
         *
diff --git a/paypal_gateway/paypal.adapter.php 
b/paypal_gateway/paypal.adapter.php
index 5cf3139..58167bd 100644
--- a/paypal_gateway/paypal.adapter.php
+++ b/paypal_gateway/paypal.adapter.php
@@ -25,6 +25,10 @@
                return 'redirect';
        }
 
+       public function getFormClass() {
+               return 'Gateway_Form_RapidHtml';
+       }
+
        function __construct( $options = array() ) {
                parent::__construct( $options );
 
diff --git a/worldpay_gateway/worldpay.adapter.php 
b/worldpay_gateway/worldpay.adapter.php
index 13eac16..01cca26 100644
--- a/worldpay_gateway/worldpay.adapter.php
+++ b/worldpay_gateway/worldpay.adapter.php
@@ -234,9 +234,9 @@
 
        public function getFormClass() {
                if ( $this->isESOP() ) {
-                       return 'Gateway_Form_Mustache';
+                       return parent::getFormClass();
                }
-               return parent::getFormClass();
+               return 'Gateway_Form_RapidHtml';
        }
 
        public function getCommunicationType() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib96697f3c7c7d9bbdec4b63d6a2b5f6b4db4eaed
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to