Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/262840

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
6 files changed, 15 insertions(+), 21 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/40/262840/1

diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index a31e253..bbbdc63 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 1742d4b..3edc64c 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 117a362..f9e3faf 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 f013038..618dae8 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -2389,7 +2389,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 dda4e8f..897115b 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 5c5981b..689fec4 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 );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib96697f3c7c7d9bbdec4b63d6a2b5f6b4db4eaed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>

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

Reply via email to