Ejegg has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/355462 )
Change subject: Allow old 'currency_code' param for form chooser
......................................................................
Allow old 'currency_code' param for form chooser
Revert when all incoming links are fixed.
Change-Id: I5d954c75135ba5a51ca4b7630f6b314c0cb866d9
---
M special/GatewayFormChooser.php
1 file changed, 12 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/62/355462/1
diff --git a/special/GatewayFormChooser.php b/special/GatewayFormChooser.php
index 3fb21ad..84159f8 100644
--- a/special/GatewayFormChooser.php
+++ b/special/GatewayFormChooser.php
@@ -49,6 +49,10 @@
$country = $getValOrNull( 'country' );
$currency = $getValOrNull( 'currency' );
+ // TODO: remove when incoming links are updated
+ if ( !$currency ) {
+ $currency = $getValOrNull( 'currency_code' );
+ }
$paymentMethod = $getValOrNull( 'payment_method' );
$paymentSubMethod = $getValOrNull( 'payment_submethod' );
$gateway = $getValOrNull( 'gateway' );
@@ -92,6 +96,14 @@
}
}
+ // TODO: remove when incoming links are updated
+ if ( !empty( $params['currency_code'] ) ) {
+ if ( empty( $params['currency'] ) ) {
+ $params['currency'] = $params['currency_code'];
+ }
+ unset( $params['currency_code'] );
+ }
+
$redirectURL = self::buildPaymentsFormURL( $form, $params );
// Perform the redirection
--
To view, visit https://gerrit.wikimedia.org/r/355462
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d954c75135ba5a51ca4b7630f6b314c0cb866d9
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