Hoi, How much work do you think it will be to repair an extension that needs repair ? For someone who knows the code and for someone who just has to repair his one extension ?? Thanks, GerardM
2009/4/24 Brian Brian.Mingus@colorado.edu
How many non-WMF extensions will this break?
On Thu, Apr 23, 2009 at 9:59 PM, Andrew Garrett <agarrett@wikimedia.org
wrote:
I've branch-merged the new preferences system that I've spent the last few weeks developing.
On the outside, you probably won't notice any difference except a few bugfixes, but the internals have undergone a complete rewrite.
All of the actual preference definitions and utility functions have been separated out into Preferences.php, which holds all business logic for the new system. The UI and submission logic for the system is done in SpecialPreferences.php, which, now only a hundred lines long, wraps a generic class I've written to encourage separation of business and UI logic called 'HTMLForm'.
The advantage of this clear separation is that writing an API module is very simple, and it can be called internally, too!
Extensions must now hook GetPreferences instead of the existing hooks (which were too low-level to maintain compatibility with), I've updated all extensions used on Wikimedia. This new hook allows you to put preferences wherever you want, and a new preference can be added in less than ten lines of code, rather than the hundred-line nightmare that was required in the previous iteration.
I'd like to look towards trimming some of the existing preferences that are no longer relevant, and adding new preferences as common sense dictates.
Feedback, praise and criticism regarding the changes is certainly
welcome!
-- Andrew Garrett Sent from Sydney, Nsw, Australia
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l