OutputPage: Condition-wrap the <script> for 'user.groups'
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 6 Mar 2015 02:12:49 +0000 (03:12 +0100)
committerOri.livneh <ori@wikimedia.org>
Wed, 11 Mar 2015 19:33:24 +0000 (19:33 +0000)
commit3ed7b27f7baae87af57cdc2f2d467b52da6d9e1a
tree312284664e959705bd79214bc224e4258993f878
parent353659085c527e12f8c66ce20753844e780583f5
OutputPage: Condition-wrap the <script> for 'user.groups'

Follows-up 9d390a09cdfb. It already wraps the only=script requests
for 'site' and 'user', but forgot about 'user.groups' which is
not 'scripts' but 'combined' (as regular module requests).

That request responds with mw.loader.implement whih will be absent
if the environment is unsupported.

With normal module requests, this is naturally covered by those
requests not being fired from mw.loader in the first place but
with hardcoded requests like these the condition wrap with
document.write is unfortunately required in the current reality.

Change-Id: Ib3a7378d0c44e601760fbbc5174da09bd7b7f492
includes/OutputPage.php
tests/phpunit/includes/OutputPageTest.php