Commit graph

46 commits

Author SHA1 Message Date
Roan Kattouw
acb2d77b4c Remove $wgUseDataURLs as promised by the comment in DefaultSettings.php . Data URL embedding is now always used. 2010-10-07 17:48:46 +00:00
Trevor Parscal
19e0c2b6ac * Fixed mistake made in r74271 where some functions were moved from core jquery.wikiEditor into jquery.wikiEditor.iframe, causing errors for textarea mode. These changes properly split the functions, allowing the iframe to override the textarea functions, and using $.client to only execute them on IE. (tested in IE7)
* Also fixed IE bug, where "delete window.myThing;" fails but "delete myThing;" succeeds.
2010-10-05 20:54:38 +00:00
Brion Vibber
0fac9734de Extract common code in ResourceLoaderUserOptionsModule (sloppy copy-pasting of the originals looks like the cause of the bug fixed in r74145) 2010-10-03 01:03:10 +00:00
Niklas Laxström
e5ee3055cd Fix personal user styles being broken since introduction in r73024 2010-10-02 16:11:44 +00:00
Trevor Parscal
aacab77ced Removed double-encoding of dependencies and group for custom loader scripts. 2010-10-01 20:46:42 +00:00
Niklas Laxström
14f4369f21 Fix timestamp generation for pages broken in r72961. 2010-10-01 06:39:42 +00:00
Trevor Parscal
fc106bf474 * Added support for basic version of ISO_8601 timestamp format (see http://en.wikipedia.org/wiki/ISO_8601)
* Made use of ISO_8601 basic for ResourceLoader
2010-09-30 21:20:09 +00:00
Trevor Parscal
7663a15006 Removed the requirement to define getModifiedTime for a module, the default implementation returns 1 2010-09-29 23:25:07 +00:00
Trevor Parscal
48ece041cd Moved wgDBName out of $wgUseAjax / $wgEnableMWSuggest conditional - this needs to be done in deployment as well. 2010-09-29 21:42:30 +00:00
Trevor Parscal
016fbe7a81 Made ResourceLoader an instantiable object, rather than a static one, making it more modular and testable. 2010-09-29 19:04:04 +00:00
Trevor Parscal
2d8b027219 * Fixed bug #25281 by adding special treatment for modules in the "private" group
* Added $wgResourceLoaderInlinePrivateModules to allow private modules to be either embedded in the HTML output or accessed through ResourceLoader (which will bypass squid cache and check the user paramter against $wgUser)
* Moved more generated javascript functionality to ResourceLoader
* Fixed comment typo made in r73673
* Added documentation for ResoruceLoaderRegisterModules hook
2010-09-24 22:10:25 +00:00
Trevor Parscal
066588f12a Moved more generated javascript to ResourceLoader functions. Cleaned some things up in the startup module. 2010-09-24 21:03:29 +00:00
Trevor Parscal
09d3b2cf1e * Moved registration generation to startup module.
* Moved some javascript code generation to reusable functions (more to do).
* Reduced the code output by using mutliple calling method for mediaWiki.loader.state.
* Moved CSS minification to the end (should be a bit faster than running it for each module).
2010-09-24 18:49:19 +00:00
Roan Kattouw
0d39615e6a Fix r73645: also do negative caching 2010-09-24 18:16:59 +00:00
Trevor Parscal
da50a7fef5 Added early exits when files are used before webstart 2010-09-24 17:31:40 +00:00
Trevor Parscal
52224ff8c8 Fixed issue in r73645 where an unset value was being returned in some cases. 2010-09-24 17:19:27 +00:00
Trevor Parscal
389c3722dd Improved the performance of ResourceLoader by pre-loading module information in a batch query. This was mostly code written by catrope and patched in / gotten working by me. 2010-09-23 21:23:51 +00:00
Trevor Parscal
d825fbb1b8 Added group functionality to ResourceLoaderModule objects. Also fixed a bug that was registering non-ResourceLoaderFileModule objects incorrectly in the startup script. 2010-09-20 21:23:29 +00:00
Tim Starling
004f1edb37 Minor resource loader changes:
* Broke some long lines, converted some overly complex ternary operators to if()
* Added lots of line breaks into the output, for easier debugging.
* Added profiling for various functions.
* wfGetDb -> wfGetDB
* Fixed escaping in ResourceLoaderStartUpModule::getScript(), escape for JS rather than assuming Html::linkedScript() won't have any bad characters in it.
2010-09-17 11:45:49 +00:00
Trevor Parscal
b6ea0c75c2 Removed a bit of testing code that got left in. 2010-09-15 17:58:36 +00:00
Trevor Parscal
1329158215 * Added exporting of user preferences
* Renamed user.preferences to user.options
* Fixed bug that caused anonomous usernames (such as IP addresses) to be used in user style and script requests
* Fixed user options styles not loading for anon users
2010-09-14 21:47:59 +00:00
Niklas Laxström
51df60c351 Fix broken r72956 with another approach 2010-09-14 09:23:43 +00:00
Niklas Laxström
eae0c97c15 Avoid extra query by reusing $wgUser if possible 2010-09-14 07:49:24 +00:00
Niklas Laxström
7e26c3350b Use only single query for determinging highest page_touched, which is not loaded by link batch.
Every query is still executed twice, apparently for different modules, but why?
2010-09-14 07:32:08 +00:00
Trevor Parscal
6941fdffd5 Reduced (dramatically) the number of database queries being performed to evaluate the last modified time of a module by only checking the mr_timestamp table when there are messages in the module. 2010-09-14 00:45:53 +00:00
Trevor Parscal
27a1a67359 * Changed the expiry time strategy, now treating any request to ResourceLoader::respond which does not contain a version parameter as an unversioned request which is responded to with a near-future maxage and smaxage, while those which do contain a version parameter are treated as versioned requests and responded to with a far-future maxage and smaxage.
* Added some release notes for ResourceLoader globals.
* Changed when OutputPage appends timestamps to style/script-only requests - now they are only made into versioned requests if the module is a ResourceLoaderWikiModule or a ResourceLoaderUserPreferencesModule - because they might be changed on-wiki and require immediate feedback. This would only affect logged-in users however, as cached pages will contain the latest version number as of the time they were generated. This strategy may need to be adjusted to work with ESI to add version parameters to everything all the time, but this at least presents a reasonable fallback in the event that ESI is not setup.
2010-09-13 23:19:05 +00:00
Platonides
52e275003a Code cleanup: unused globals, empty statements, typos... 2010-09-11 21:55:21 +00:00
Niklas Laxström
aa41998e0f Quickfix for Fatal error: don't die on anonymous users. 2010-09-11 14:24:28 +00:00
Trevor Parscal
87c6f7ad2b Made CSSMin::remap take both local and remote directory parameters, allowing more felxible configuration. Also made ResourceLoaderFileModule use $wgScriptPath as the base of the remote directory parameter. 2010-09-11 10:20:26 +00:00
Trevor Parscal
623d11f435 Fixed fatal error - now $user is being checked to be sucessfully built before it's used. 2010-09-11 09:09:49 +00:00
Trevor Parscal
b9137a9cf2 Added direction to ResourceLoaderContext hashing (prevents cache mangling), dropped it from the startup module (it's not being passed on anyways - it's really just for debugging). Also enforced sorting of parameters in URLs to make them easier to read and less likely to miss cache unnessecarily. 2010-09-11 08:22:32 +00:00
Trevor Parscal
27fc041226 Moved a config back to Skin::makeGlobalVaiablesScript because it depends on the user object. 2010-09-11 08:06:38 +00:00
Trevor Parscal
ed054b1ace Fixed user scripts/styles and site scripts/styles - they were totally broken in r72772 - but now the refactoring is paying off. 2010-09-11 07:33:16 +00:00
Trevor Parscal
a99f9ec28b Major refactoring of site and user CSS, creating ResourceLoaderUserModule and ResourceLoaderUserPreferenceModule. Also moved as much of the global variables being generated in Skin::makeGlobalVaiablesScript into the ResourceLoaderStartupModule - which will make configuration changes effective site-wide in 5 minutes instead of whenever all pages are purged from cache - what remains embedded in the HTML is article and user specific - two things we don't know by the time we request the startup module. Also, fixed issue where debug=false was being interpreted to be equivilant to debug=true. Finally, finished integrating the introduction of $wgLoadScript, thus fixing overlooked issues in r72763. 2010-09-11 03:26:15 +00:00
Trevor Parscal
eeb5ce5150 Moved some of the logic for generating styles from wiki pages out of ResourceLoaderSiteModule and into ResourceLoaderWikiModule. 2010-09-10 23:28:59 +00:00
Trevor Parscal
7f523d754f Broke part of ResourceLoaderSiteModule into ResourceLoaderWikiModule (abstract parent). This paves the way for ResourceLoaderUserModule which will come next. 2010-09-10 21:40:42 +00:00
Trevor Parscal
000a3d25a2 Removed a comment, which should have been removed in r72743 2010-09-10 21:27:19 +00:00
Trevor Parscal
24ebfb40d8 Removed blank line in array definition. 2010-09-10 21:19:04 +00:00
Trevor Parscal
767a8725fa ResourceLoaderSiteModule now supports CSS too! 2010-09-10 20:18:24 +00:00
Trevor Parscal
931c7ff274 Fixes issue in r72695 where ResourceLoaderFileModule::getStyles was iterating twice over getPrimaryStyles rather than iterating over getPrimaryStyles and then getSkinsStyles. 2010-09-10 18:42:26 +00:00
Trevor Parscal
b3fea2070b Added media-type support for static and dynamic ResourceLoader requests. 2010-09-10 00:21:36 +00:00
Trevor Parscal
15fb95a931 Moved dependency of $wgUseDataURLs out of CSSMin and into ResourceLoaderModule. 2010-09-09 19:48:48 +00:00
Alexandre Emsenhuber
bb6ec5642a Fixed some doxygen warnings 2010-09-05 13:31:34 +00:00
Siebrand Mazeland
3f501420ee Stylize files added in r72349 2010-09-04 12:53:01 +00:00
Trevor Parscal
cad68eb943 Better solution for r72367, this allows file modules to always be written in ltr, while site modules are written in whatever $wgContLang is. 2010-09-04 10:53:57 +00:00
Roan Kattouw
32377424b9 Merging resourceloader branch into trunk. Full documentation is at http://www.mediawiki.org/wiki/ResourceLoader and a general overview has been posted on wikitech-li <http://lists.wikimedia.org/pipermail/wikitech-l/2010-September/049253.html>. One important change is that all JS is now loaded at the bottom, so any scripts assuming things from wikibits or whatever are present will fail. 2010-09-04 04:00:09 +00:00