diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /includes/resourceloader/ResourceLoaderModule.php | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'includes/resourceloader/ResourceLoaderModule.php')
-rw-r--r-- | includes/resourceloader/ResourceLoaderModule.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 1a232ec2..9c49c45f 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -1,5 +1,7 @@ <?php /** + * Abstraction for resource loader modules. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -170,7 +172,9 @@ abstract class ResourceLoaderModule { * Get all CSS for this module for a given skin. * * @param $context ResourceLoaderContext: Context object - * @return Array: List of CSS strings keyed by media type + * @return Array: List of CSS strings or array of CSS strings keyed by media type. + * like array( 'screen' => '.foo { width: 0 }' ); + * or array( 'screen' => array( '.foo { width: 0 }' ) ); */ public function getStyles( ResourceLoaderContext $context ) { // Stub, override expected @@ -235,8 +239,8 @@ abstract class ResourceLoaderModule { /** * Where on the HTML page should this module's JS be loaded? - * 'top': in the <head> - * 'bottom': at the bottom of the <body> + * - 'top': in the "<head>" + * - 'bottom': at the bottom of the "<body>" * * @return string */ @@ -245,6 +249,17 @@ abstract class ResourceLoaderModule { } /** + * Whether this module's JS expects to work without the client-side ResourceLoader module. + * Returning true from this function will prevent mw.loader.state() call from being + * appended to the bottom of the script. + * + * @return bool + */ + public function isRaw() { + return false; + } + + /** * Get the loader JS for this module, if set. * * @return Mixed: JavaScript loader code as a string or boolean false if no custom loader set |