HomePhabricator

Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…

Authored by jenkins-bot <jenkins-bot@gerrit.wikimedia.org>.

Description

Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface a20a8c943b9845c210570532b02d14f289cc85e3

Make configuration testable

Get rid of conditional initialization, this made it impossible to test multiple
configurations.

Disable all components by default.

Deployment notes

You must rename and and new variables in LocalSettings.php to use this patch.
Enabling gateways looks like this now:

$wgGlobalCollectGatewayEnabled = true;

Please add a line for each gateway you would like enabled.

All "optional parts" are disabled by default now. Add lines for any custom
filters and features you desire. Adding the following lines before your local
settings will give the same behavior as defaults as they were before this
patch, not including gateways:

$wgDonationInterfaceEnableFormChooser = true;
$wgDonationInterfaceEnableFunctionsFilter = true;
$wgDonationInterfaceEnableMinfraud = true;
$wgDonationInterfaceEnableReferrerFilter = true;
$wgDonationInterfaceEnableSourceFilter = true;

TODO:

  • It's creepy to allow GatewayFormChooser to return results for disabled

gateways, but the idea is that we've removing forms from
$wgDonationInterfaceAllowedHtmlForms, so we return an empty array anyway.
This was not consistent in previous code, some forms were gated on configuration,
most were not.

  • Something here should work out of the box. Enable a dummy gateway by default?
  • We should use getGlobal everywhere, for example when testing the EnableStomp

configuration, so all features can be toggled per gateway.

Bug: T94477
Change-Id: I02bfbf7d46ef9946aae97ead562fc87cc29b5a4e

Details

Committed
Gerrit Code ReviewMay 24 2015, 3:08 PM
Parents
rMEXTb543ff6e6bba: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface…
Branches
Unknown
Tags
Unknown
ChangeId
I02bfbf7d46ef9946aae97ead562fc87cc29b5a4e

Event Timeline

Gerrit Code Review <gerrit@wikimedia.org> committed rMEXTadedc0f3bebe: Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface… (authored by jenkins-bot <jenkins-bot@gerrit.wikimedia.org>).May 24 2015, 3:08 PM