Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/279302
Change subject: Maintenance notice takes precedence over disabled gateway ...................................................................... Maintenance notice takes precedence over disabled gateway Change-Id: Id5f73e2bbc8c69f930d106643203578246d8a9c6 --- M gateway_common/GatewayPage.php 1 file changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/02/279302/1 diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php index 9202486..563fd9e 100644 --- a/gateway_common/GatewayPage.php +++ b/gateway_common/GatewayPage.php @@ -50,7 +50,7 @@ $this->logger = DonationLoggerFactory::getLogger( $this->adapter ); $this->getOutput()->addModules( 'donationInterface.skinOverride' ); - $me = get_called_class(); + $me = get_called_class(); # FIXME: eliminate parameter by using late static binding? parent::__construct( $me ); } @@ -70,12 +70,6 @@ $wgLang = $this->getContext()->getLanguage(); // BackCompat } - if ( $this->adapter->getGlobal( 'Enabled' ) !== true ) { - $this->logger->info( 'Displaying fail page for disabled gateway' ); - $this->displayFailPage(); - return; - } - if( $wgContributionTrackingFundraiserMaintenance || $wgContributionTrackingFundraiserMaintenanceUnsched ){ $this->getOutput()->redirect( Title::newFromText('Special:FundraiserMaintenance')->getFullURL(), '302' ); @@ -83,6 +77,10 @@ } try { + if ( $this->adapter->getGlobal( 'Enabled' ) !== true ) { + throw new Exception( 'Disabled gateway' ); + } + $this->handleRequest(); } catch ( Exception $ex ) { $this->logger->error( "Displaying fail page for exception: " . $ex->getMessage() ); -- To view, visit https://gerrit.wikimedia.org/r/279302 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5f73e2bbc8c69f930d106643203578246d8a9c6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Awight <awi...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits