resourceloader: Only conditional-wrap script responses with only=scripts
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 13 Aug 2014 18:06:10 +0000 (19:06 +0100)
committerKrinkle <krinklemail@gmail.com>
Fri, 22 Aug 2014 01:15:49 +0000 (01:15 +0000)
commit03c503da222360a3f8065078907da65b6435721a
tree8bb0b14e8031c358137c716e1d2b9f85d4f72442
parent8149789274c7eb07c365f783352357586efe1aff
resourceloader: Only conditional-wrap script responses with only=scripts

Follows-up 9272bc6c4721225. The shouldIncludeScripts method returns
true for only=scripts, but also for other responses (except for
only=styles, naturally).

Regular load.php responses that load both scripts and styles don't
need the conditional wrap because those requests should only be
made from the mw.loader client which inherently means the
environment has been provided already.

It's merely unnecessary and shouldn't have caused any issues since
it simply evaluates to true always. It was already correctly being
excluded from raw modules that run before the environment is
provided (such as startup, jquery and mediawiki).

Change-Id: I375a7a8039f9b3ad4909e76005725f7d975d8a5e
includes/resourceloader/ResourceLoader.php
tests/phpunit/includes/OutputPageTest.php