(bug 32537) Pre-register default-loaded RL modules in the client-side
authorlupo <lupo.bugzilla@gmail.com>
Wed, 25 Apr 2012 18:24:03 +0000 (20:24 +0200)
committerlupo <lupo.bugzilla@gmail.com>
Wed, 25 Apr 2012 18:24:03 +0000 (20:24 +0200)
commit9ab7ec0a9f36cfc458ff9dc5e60003b8ed07903f
treee93ab86151f573ddf872e35d1f69d146bb3d94a8
parent7727f6633289f63e948c7dbe877d7f290398c472
(bug 32537) Pre-register default-loaded RL modules in the client-side
loader.

Site, user, and user.groups modules are pre-registered in JS client-side
loader. This prevents loading them again if they're given as explicit
dependencies of some other module.

Enabled modules are registered as "loading", disabled ones as "missing".
Empty modules register themselves as "ready".

Also adapt the client-side mw.loader.state to ensure that dependencies
are tracked if called with state "ready".

Note the FIXME in OutputPage.php; methinks this is an already existing
issue not fixed by this change.

Changeset 2: fix bug number in commit message (32537, not 32357!)

Changeset 3: change 'ready' registration as discussed; adapt line
lengths; clean up client-side code.

Changeset 4: "missing" status for disabled modules.

Change-Id: I595b3af1900d4bec0c35940ef51a19c8a7440faa
includes/OutputPage.php
resources/mediawiki/mediawiki.js