OutputPage: Restore ResourceLoader condition wrap for embedded modules
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 2 Sep 2014 01:25:13 +0000 (03:25 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 2 Sep 2014 09:05:13 +0000 (11:05 +0200)
commit5553be79b9ae97318dcdf816ec99c10126369f42
treec89e9cdbbbf3230c23c7e0ae4967503ccb9f7776
parentb7fce5bc0638aa95b6c15ef891e0a6ca4ac8dbc2
OutputPage: Restore ResourceLoader condition wrap for embedded modules

Follows-up 9272bc6c4703c503da22.

* In 9272bc6c47, the condition wrap was removed from
  OutputPage for no reason. This went unnnoticed as I had also
  accidentally made the cond wrap in makeModuleResponse apply
  to both only=scripts and regular (faux) responses, such as by
  OutputPage embedding private modules.

* In 03c503da22, the latter bug was fixed, thus exposing the former.

This wrapper belongs in OutputPage, not in ResourceLoader. It's
OutputPage making the loader request. And just like in other places,
it's the "client"'s responsibility to ensure the request is either not
made or wrapped appropriately.

The test for "private module (only=scripts)" could be removed but
I'll keep it so we can see how this changes in the future. It's
a case that can't ever happen, but if it would, it currently gets
a double condition wrapper, which is fine.

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