Commit graph

11 commits

Author SHA1 Message Date
Roan Kattouw
a5de04f24a Fix bug in r87497, reported in CR: &modules=foo,bar,baz would look for '.foo', '.ar' and '.az' . Now handling prefixless modules correctly 2011-05-14 13:34:03 +00:00
Roan Kattouw
950cf2cb86 (bug 28840) Commit patch by bawolff that encodes dots in ResourceLoader module names as exclamation marks in the generated URLs, so as to avoid triggering the recently added IE security measure and causing a blank 403 response. This broke RL in various ways for IE users.
This is by no means intended to be permanent, but it's the best way to unbreak RL for IE users while we work out how to fix this properly.
2011-05-09 13:10:06 +00:00
Roan Kattouw
7fee86c38e Per bug 28738 comment 4, pack ResourceLoader URLs by encoding foo.bar|foo.baz|bar.baz|bar.quux as foo.bar,baz|bar.baz,quux
* Expand these URLs in ResourceLoaderContext
* Build and emit these URLs in OutputPage::makeResourceLoaderLink() and in mw.loader
* Throw an exception in ResourceLoader::register() for module names that contain pipe characters or commas. Commas need to be forbidden for this packing feature to work. Pipes were already forbidden but weren't checked for
2011-05-05 13:46:47 +00:00
Roan Kattouw
4d196860f7 Fix logic error in r73204 (!) causing ResourceLoaderContext::getHash() to always return null 2011-02-19 16:48:05 +00:00
Tim Starling
0f821f0dcb Use the content language to set the skin direction, instead of the user language. This makes the content readable and the UI messed up, instead of vice versa.
It's not ideal, but at least it's no worse than it was in 1.16. It's preferable because the content area is more likely to have bidirectional text than the UI area. The UI is split up into short strings, generally in a consistent language, so there is less chance of the UBA moving fragments of text around. 

Ideally, the direction of each div would be set according to the language of the text it contains.
2011-02-07 12:39:10 +00:00
Sam Reed
50b04942e4 Remove some unused variables and globals 2010-11-28 16:13:13 +00:00
Tim Starling
ec2acb239b * In ResourceLoaderContext, lazy-load $this->direction and $this->language, to avoid loading the whole English localisation for load.php requests which never call getHash().
* Interpreted some Trevor-speak in the doc comment of ResourceLoader::preloadModuleInfo().
* Made setMsgBlobMtime() (called from preloadModuleInfo()) actually work, by making getMsgBlobMtime() use the cached blob times if they are available.
2010-11-19 06:52:38 +00:00
Tim Starling
06b2b1bd66 Resource loader minor changes. Fix for r73668 etc.
* Break long lines.
* Convert long or unnecessary ternary operator usages to if/else.
* Fixed excessively clever assignment expressions.
* Rename $cache to $cacheEntry.
* Removed unnecessary web invocation guards. Their perlish form was making me uncomfortable. BTW, unlike in Perl, die() is not a function, it's a special case in the PHP grammar which very roughly simulates the Perl syntax:

die "x"; // works
0 || die("x"); // works
0 || (die); // works
0 || (die "x"); // fail!
2010-11-03 07:58:03 +00:00
Roan Kattouw
3517d951ba Some comment fixes: be consistent between # and //, fix grammar, remove information about internals from Doxygen comment (those are about what the function does, not how). Also make $modules argument to makeModuleResponse() default to array() instead of null 2010-10-20 14:58:35 +00:00
Antoine Musso
9adfb4f0a9 documentation, a couple notes about code and some whitespaces adjustements to make code easier to read. 2010-10-19 20:45:02 +00:00
Trevor Parscal
ef6baa91de Moved ResourceLoader classes to their own folder, preparing to also split ResourceLoaderModule.php into multiple files (it's getting a bit long now) 2010-10-19 18:21:38 +00:00
Renamed from includes/ResourceLoaderContext.php (Browse further)