OutputPage: Don't set 'user' module state if filtered out
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 14 Sep 2016 04:54:57 +0000 (21:54 -0700)
committerKrinkle <krinklemail@gmail.com>
Wed, 14 Sep 2016 05:02:22 +0000 (05:02 +0000)
commitdbbc3c2329757987f71e63ce83b17541e61ed0f3
treeee4c8aa6b5417fc813be6ca06997368344a7fb89
parent6e014bb7537320d69f58d3e7fbf6320488c4087e
OutputPage: Don't set 'user' module state if filtered out

On pages where the 'user' module is filtered out (e.g.
on Special:Preferences) it would export state 'loading' (or state
'ready') eventhough the actual call to makeResourceLoader() later
in getBottomScripts() would be a no-op due to filtering.

This would cause either an indefinite state of "loading" or a
state "ready" that wasn't true.

This restores status quo as it was before 80e5b160 and 3e7a50d5f.

Test plan:
* Logged-in with non-empty user page common.js.
* View Special:Preferences.
* Verify in <head> source code, or via mw.loader.getState('user')
  that it has state "registered" (the default initial state) and
  not state "loading" or "ready".

Change-Id: I9b360d7e12703bddb80793aef47296fd63032c3d
includes/OutputPage.php