User "Krinkle" changed the status of MediaWiki.r101352.

Old Status: new
New Status: resolved

User "Krinkle" also posted a comment on MediaWiki.r101352.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/101352#c25192
Commit summary:

unconditionally register the test modules

Somehow, you really need to have the modules registered globally.
Need to sort it out with Roan :-D

follow up r101346

Comment:

This is exactly why I had the code in ResourceLoader.php instead of in the 
SpecialPage (which is how it was in an earlier version of the patch).

ResourceLoader doesn't can't and should not support loading of modules based on 
the current page because modules must be registered globally in order to allow 
javascript to load them on-demand and from a cached server with a common page 
independent load.php url.

Even if it would always be registered unconditionally, the amount of stuff 
added to the startup module isn't a huge deal, since that's cached anyway. To 
reduce this load it was previously only registered if <code> 
wgEnableJavaScriptTest</code> is true, which doesn't affect regular wikis (only 
wikis intended to be used as test runners, at which most requests will likely 
be to SpecialJavaScriptTest) - production wikis should never enable this mode 
due to the potential destructive nature of unit tests.

I've restored the situation to how it was with commit r101383, I kept it in a 
separate function like you did.

_______________________________________________
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to