Since I'm sick of all the mw.user-induced problems, break the dependency between...
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 16 Feb 2012 22:51:06 +0000 (22:51 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 16 Feb 2012 22:51:06 +0000 (22:51 +0000)
commitfcf481423384adecc48fcdc70b9e7708105bc8ae
treec32293b717a0283a715ece485346d16b73c73b4e
parentac552e1990939209741238e3423807e20ad4dfc5
Since I'm sick of all the mw.user-induced problems, break the dependency between mw.user.{options,tokens} and mw.user . With this change, mediawiki.js defines a skeleton object for mw.user containing just the options and tokens maps, and mediawiki.user.js copies those when it sets up the full mw.user object. This way of doing extending is kind of ugly but I don't have time to work on something nicer without breaking backwards compatibility. Because mw.user.{options,tokens} are loaded very early, this also means they're now guaranteed to be available to everything everywhere.
includes/resourceloader/ResourceLoaderUserOptionsModule.php
includes/resourceloader/ResourceLoaderUserTokensModule.php
resources/mediawiki/mediawiki.js
resources/mediawiki/mediawiki.user.js