mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-01 02:37:05 +00:00
4449235516
I177dad88 introduced the skin version user preference field and associated configuration values. Per T242381, the field is to presented as a checkbox with the implied storage type of a boolean where a string is needed. A PreferencesFormPreSave hook handler was added to adapt values of either data type to the other. While this was a neat solution to a minor nit, the adapter's implementation is incompatible with the GlobalPreferences extension as the PreferencesFormPreSave hook isn't run whilst saving global preferences. Rather than adding an equivalent hook to the GlobalPreferences extension, create a custom field based on a checkbox with the adapter included. This allows us to: - Separate the business logic concerned with preserving the user's VectorSkinVersion preference if they've simply disabled Vector from the adapter - Simplify the adapter's implementation - Forego adding hooks to the GlobalPreferences codebase Additional changes: - Replace repeated string literals with equivalent constants in tests/phpunit/integration/VectorHooksTest.php Bug: T258493 Change-Id: I628435a4ad676f55534191b8c10147be28be5d73 |
||
---|---|---|
.. | ||
HTMLLegacySkinVersionField.php |