[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Another SmashPig initialization fix
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/339329 ) Change subject: Another SmashPig initialization fix .. Another SmashPig initialization fix Need to initialize the logger too. We should provide a logger prefix, but the bloated gateway constructor needs SmashPig already initialized. Change-Id: Iaac0f061904adb559b3cb0516300c1c9601e69d8 --- M DonationInterface.class.php M gateway_common/donation.api.php 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Awight: Looks good to me, approved diff --git a/DonationInterface.class.php b/DonationInterface.class.php index 40a5648..9132a26 100644 --- a/DonationInterface.class.php +++ b/DonationInterface.class.php @@ -89,7 +89,9 @@ */ public static function initializeSmashPig( $view ) { $spConfig = Configuration::createForView( $view ); - Context::init( $spConfig ); + // FIXME: should set a logger prefix here, but we've got a chicken + // and egg problem with the Gateway constructor + Context::initWithLogger( $spConfig ); return $spConfig; } } diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php index 447a389..9f41ded 100644 --- a/gateway_common/donation.api.php +++ b/gateway_common/donation.api.php @@ -15,8 +15,8 @@ // @todo FIXME: Unused local variable. $submethod = $this->donationData['payment_submethod']; - $gatewayObj = $this->getGatewayObject(); DonationInterface::initializeSmashPig( $this->gateway ); + $gatewayObj = $this->getGatewayObject(); if ( !$gatewayObj ) { return; // already failed with a dieUsage call -- To view, visit https://gerrit.wikimedia.org/r/339329 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaac0f061904adb559b3cb0516300c1c9601e69d8 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Katie Horn Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Another SmashPig initialization fix
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/339329 ) Change subject: Another SmashPig initialization fix .. Another SmashPig initialization fix Need to initialize the logger too. We should provide a logger prefix, but the bloated gateway constructor needs SmashPig already initialized. Change-Id: Iaac0f061904adb559b3cb0516300c1c9601e69d8 --- M DonationInterface.class.php M gateway_common/donation.api.php 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/29/339329/1 diff --git a/DonationInterface.class.php b/DonationInterface.class.php index 40a5648..9132a26 100644 --- a/DonationInterface.class.php +++ b/DonationInterface.class.php @@ -89,7 +89,9 @@ */ public static function initializeSmashPig( $view ) { $spConfig = Configuration::createForView( $view ); - Context::init( $spConfig ); + // FIXME: should set a logger prefix here, but we've got a chicken + // and egg problem with the Gateway constructor + Context::initWithLogger( $spConfig ); return $spConfig; } } diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php index 447a389..9f41ded 100644 --- a/gateway_common/donation.api.php +++ b/gateway_common/donation.api.php @@ -15,8 +15,8 @@ // @todo FIXME: Unused local variable. $submethod = $this->donationData['payment_submethod']; - $gatewayObj = $this->getGatewayObject(); DonationInterface::initializeSmashPig( $this->gateway ); + $gatewayObj = $this->getGatewayObject(); if ( !$gatewayObj ) { return; // already failed with a dieUsage call -- To view, visit https://gerrit.wikimedia.org/r/339329 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaac0f061904adb559b3cb0516300c1c9601e69d8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits