Updated mediawiki/extensions Project: mediawiki/extensions/DonationInterface a20a8c943b9845c210570532b02d14f289cc85e3
Make configuration testable
Get rid of conditional initialization, this made it impossible to test multiple
Disable all components by default.
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;
- 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.