Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2290,6 +2290,16 @@ |
2291 | 2291 | } |
2292 | 2292 | |
2293 | 2293 | /** |
| 2294 | + * Get a ResourceLoader object associated with this OutputPage |
| 2295 | + */ |
| 2296 | + public function getResourceLoader() { |
| 2297 | + if ( is_null( $this->mResourceLoader ) ) { |
| 2298 | + $this->mResourceLoader = new ResourceLoader(); |
| 2299 | + } |
| 2300 | + return $this->mResourceLoader; |
| 2301 | + } |
| 2302 | + |
| 2303 | + /** |
2294 | 2304 | * TODO: Document |
2295 | 2305 | * @param $skin Skin |
2296 | 2306 | * @param $modules Array/string with the module name |
— | — | @@ -2301,9 +2311,6 @@ |
2302 | 2312 | global $wgUser, $wgLang, $wgLoadScript, $wgResourceLoaderUseESI, |
2303 | 2313 | $wgResourceLoaderInlinePrivateModules; |
2304 | 2314 | // Lazy-load ResourceLoader |
2305 | | - if ( is_null( $this->mResourceLoader ) ) { |
2306 | | - $this->mResourceLoader = new ResourceLoader(); |
2307 | | - } |
2308 | 2315 | // TODO: Should this be a static function of ResourceLoader instead? |
2309 | 2316 | // TODO: Divide off modules starting with "user", and add the user parameter to them |
2310 | 2317 | $query = array( |
— | — | @@ -2335,8 +2342,9 @@ |
2336 | 2343 | |
2337 | 2344 | // Create keyed-by-group list of module objects from modules list |
2338 | 2345 | $groups = array(); |
| 2346 | + $resourceLoader = $this->getResourceLoader(); |
2339 | 2347 | foreach ( (array) $modules as $name ) { |
2340 | | - $module = $this->mResourceLoader->getModule( $name ); |
| 2348 | + $module = $resourceLoader->getModule( $name ); |
2341 | 2349 | $group = $module->getGroup(); |
2342 | 2350 | if ( !isset( $groups[$group] ) ) { |
2343 | 2351 | $groups[$group] = array(); |
— | — | @@ -2352,15 +2360,15 @@ |
2353 | 2361 | } |
2354 | 2362 | // Support inlining of private modules if configured as such |
2355 | 2363 | if ( $group === 'private' && $wgResourceLoaderInlinePrivateModules ) { |
2356 | | - $context = new ResourceLoaderContext( $this->mResourceLoader, new FauxRequest( $query ) ); |
| 2364 | + $context = new ResourceLoaderContext( $resourceLoader, new FauxRequest( $query ) ); |
2357 | 2365 | if ( $only == 'styles' ) { |
2358 | 2366 | $links .= Html::inlineStyle( |
2359 | | - $this->mResourceLoader->makeModuleResponse( $context, $modules ) |
| 2367 | + $resourceLoader->makeModuleResponse( $context, $modules ) |
2360 | 2368 | ); |
2361 | 2369 | } else { |
2362 | 2370 | $links .= Html::inlineScript( |
2363 | 2371 | ResourceLoader::makeLoaderConditionalScript( |
2364 | | - $this->mResourceLoader->makeModuleResponse( $context, $modules ) |
| 2372 | + $resourceLoader->makeModuleResponse( $context, $modules ) |
2365 | 2373 | ) |
2366 | 2374 | ); |
2367 | 2375 | } |
— | — | @@ -2371,7 +2379,7 @@ |
2372 | 2380 | // we can ensure cache misses on change |
2373 | 2381 | if ( $group === 'user' || $group === 'site' ) { |
2374 | 2382 | // Create a fake request based on the one we are about to make so modules return correct times |
2375 | | - $context = new ResourceLoaderContext( $this->mResourceLoader, new FauxRequest( $query ) ); |
| 2383 | + $context = new ResourceLoaderContext( $resourceLoader, new FauxRequest( $query ) ); |
2376 | 2384 | // Get the maximum timestamp |
2377 | 2385 | $timestamp = 1; |
2378 | 2386 | foreach ( $modules as $module ) { |
Index: trunk/phase3/includes/resourceloader/ResourceLoader.php |
— | — | @@ -32,6 +32,8 @@ |
33 | 33 | |
34 | 34 | /** Array: List of module name/ResourceLoaderModule object pairs */ |
35 | 35 | protected $modules = array(); |
| 36 | + /** Associative array mapping module name to info associative array */ |
| 37 | + protected $moduleInfos = array(); |
36 | 38 | |
37 | 39 | /* Protected Methods */ |
38 | 40 | |
— | — | @@ -67,7 +69,7 @@ |
68 | 70 | // Set modules' dependecies |
69 | 71 | $modulesWithDeps = array(); |
70 | 72 | foreach ( $res as $row ) { |
71 | | - $this->modules[$row->md_module]->setFileDependencies( $skin, |
| 73 | + $this->getModule( $row->md_module )->setFileDependencies( $skin, |
72 | 74 | FormatJson::decode( $row->md_deps, true ) |
73 | 75 | ); |
74 | 76 | $modulesWithDeps[] = $row->md_module; |
— | — | @@ -75,14 +77,14 @@ |
76 | 78 | |
77 | 79 | // Register the absence of a dependency row too |
78 | 80 | foreach ( array_diff( $modules, $modulesWithDeps ) as $name ) { |
79 | | - $this->modules[$name]->setFileDependencies( $skin, array() ); |
| 81 | + $this->getModule( $name )->setFileDependencies( $skin, array() ); |
80 | 82 | } |
81 | 83 | |
82 | 84 | // Get message blob mtimes. Only do this for modules with messages |
83 | 85 | $modulesWithMessages = array(); |
84 | 86 | $modulesWithoutMessages = array(); |
85 | 87 | foreach ( $modules as $name ) { |
86 | | - if ( count( $this->modules[$name]->getMessages() ) ) { |
| 88 | + if ( count( $this->getModule( $name )->getMessages() ) ) { |
87 | 89 | $modulesWithMessages[] = $name; |
88 | 90 | } else { |
89 | 91 | $modulesWithoutMessages[] = $name; |
— | — | @@ -95,11 +97,11 @@ |
96 | 98 | ), __METHOD__ |
97 | 99 | ); |
98 | 100 | foreach ( $res as $row ) { |
99 | | - $this->modules[$row->mr_resource]->setMsgBlobMtime( $lang, $row->mr_timestamp ); |
| 101 | + $this->getModule( $row->mr_resource )->setMsgBlobMtime( $lang, $row->mr_timestamp ); |
100 | 102 | } |
101 | 103 | } |
102 | 104 | foreach ( $modulesWithoutMessages as $name ) { |
103 | | - $this->modules[$name]->setMsgBlobMtime( $lang, 0 ); |
| 105 | + $this->getModule( $name )->setMsgBlobMtime( $lang, 0 ); |
104 | 106 | } |
105 | 107 | } |
106 | 108 | |
— | — | @@ -172,7 +174,7 @@ |
173 | 175 | * Registers core modules and runs registration hooks. |
174 | 176 | */ |
175 | 177 | public function __construct() { |
176 | | - global $IP; |
| 178 | + global $IP, $wgResourceModules; |
177 | 179 | |
178 | 180 | wfProfileIn( __METHOD__ ); |
179 | 181 | |
— | — | @@ -180,6 +182,7 @@ |
181 | 183 | $this->register( include( "$IP/resources/Resources.php" ) ); |
182 | 184 | // Register extension modules |
183 | 185 | wfRunHooks( 'ResourceLoaderRegisterModules', array( &$this ) ); |
| 186 | + $this->register( $wgResourceModules ); |
184 | 187 | |
185 | 188 | wfProfileOut( __METHOD__ ); |
186 | 189 | } |
— | — | @@ -188,30 +191,27 @@ |
189 | 192 | * Registers a module with the ResourceLoader system. |
190 | 193 | * |
191 | 194 | * @param $name Mixed: Name of module as a string or List of name/object pairs as an array |
192 | | - * @param $object ResourceLoaderModule: Module object (optional when using |
193 | | - * multiple-registration calling style) |
| 195 | + * @param $info Module info array. For backwards compatibility with 1.17alpha, |
| 196 | + * this may also be a ResourceLoaderModule object. Optional when using |
| 197 | + * multiple-registration calling style. |
194 | 198 | * @throws MWException: If a duplicate module registration is attempted |
195 | 199 | * @throws MWException: If something other than a ResourceLoaderModule is being registered |
196 | 200 | * @return Boolean: False if there were any errors, in which case one or more modules were not |
197 | 201 | * registered |
198 | 202 | */ |
199 | | - public function register( $name, ResourceLoaderModule $object = null ) { |
200 | | - |
| 203 | + public function register( $name, $info = null ) { |
201 | 204 | wfProfileIn( __METHOD__ ); |
202 | 205 | |
203 | 206 | // Allow multiple modules to be registered in one call |
204 | | - if ( is_array( $name ) && !isset( $object ) ) { |
| 207 | + if ( is_array( $name ) ) { |
205 | 208 | foreach ( $name as $key => $value ) { |
206 | 209 | $this->register( $key, $value ); |
207 | 210 | } |
208 | | - |
209 | | - wfProfileOut( __METHOD__ ); |
210 | | - |
211 | 211 | return; |
212 | 212 | } |
213 | 213 | |
214 | 214 | // Disallow duplicate registrations |
215 | | - if ( isset( $this->modules[$name] ) ) { |
| 215 | + if ( isset( $this->moduleInfos[$name] ) ) { |
216 | 216 | // A module has already been registered by this name |
217 | 217 | throw new MWException( |
218 | 218 | 'ResourceLoader duplicate registration error. ' . |
— | — | @@ -219,26 +219,32 @@ |
220 | 220 | ); |
221 | 221 | } |
222 | 222 | |
223 | | - // Validate the input (type hinting lets null through) |
224 | | - if ( !( $object instanceof ResourceLoaderModule ) ) { |
225 | | - throw new MWException( 'ResourceLoader invalid module error. ' . |
226 | | - 'Instances of ResourceLoaderModule expected.' ); |
| 223 | + // Attach module |
| 224 | + if ( is_object( $info ) ) { |
| 225 | + // Old calling convention |
| 226 | + // Validate the input |
| 227 | + if ( !( $info instanceof ResourceLoaderModule ) ) { |
| 228 | + throw new MWException( 'ResourceLoader invalid module error. ' . |
| 229 | + 'Instances of ResourceLoaderModule expected.' ); |
| 230 | + } |
| 231 | + |
| 232 | + $this->moduleInfos[$name] = array( 'object' => $info ); |
| 233 | + $this->modules[$name] = $info; |
| 234 | + } else { |
| 235 | + // New calling convention |
| 236 | + $this->moduleInfos[$name] = $info; |
227 | 237 | } |
228 | 238 | |
229 | | - // Attach module |
230 | | - $this->modules[$name] = $object; |
231 | | - $object->setName( $name ); |
232 | | - |
233 | 239 | wfProfileOut( __METHOD__ ); |
234 | 240 | } |
235 | 241 | |
236 | | - /** |
237 | | - * Gets a map of all modules and their options |
| 242 | + /** |
| 243 | + * Get a list of module names |
238 | 244 | * |
239 | | - * @return Array: List of modules keyed by module name |
| 245 | + * @return Array: List of module names |
240 | 246 | */ |
241 | | - public function getModules() { |
242 | | - return $this->modules; |
| 247 | + public function getModuleNames() { |
| 248 | + return array_keys( $this->moduleInfos ); |
243 | 249 | } |
244 | 250 | |
245 | 251 | /** |
— | — | @@ -248,7 +254,29 @@ |
249 | 255 | * @return Mixed: ResourceLoaderModule if module has been registered, null otherwise |
250 | 256 | */ |
251 | 257 | public function getModule( $name ) { |
252 | | - return isset( $this->modules[$name] ) ? $this->modules[$name] : null; |
| 258 | + if ( !isset( $this->modules[$name] ) ) { |
| 259 | + if ( !isset( $this->moduleInfos[$name] ) ) { |
| 260 | + // No such module |
| 261 | + return null; |
| 262 | + } |
| 263 | + // Construct the requested object |
| 264 | + $info = $this->moduleInfos[$name]; |
| 265 | + if ( isset( $info['object'] ) ) { |
| 266 | + // Object given in info array |
| 267 | + $object = $info['object']; |
| 268 | + } else { |
| 269 | + if ( !isset( $info['class'] ) ) { |
| 270 | + $class = 'ResourceLoaderFileModule'; |
| 271 | + } else { |
| 272 | + $class = $info['class']; |
| 273 | + } |
| 274 | + $object = new $class( $info ); |
| 275 | + } |
| 276 | + $object->setName( $name ); |
| 277 | + $this->modules[$name] = $object; |
| 278 | + } |
| 279 | + |
| 280 | + return $this->modules[$name]; |
253 | 281 | } |
254 | 282 | |
255 | 283 | /** |
— | — | @@ -265,8 +293,8 @@ |
266 | 294 | $modules = array(); |
267 | 295 | $missing = array(); |
268 | 296 | foreach ( $context->getModules() as $name ) { |
269 | | - if ( isset( $this->modules[$name] ) ) { |
270 | | - $modules[$name] = $this->modules[$name]; |
| 297 | + if ( isset( $this->moduleInfos[$name] ) ) { |
| 298 | + $modules[$name] = $this->getModule( $name ); |
271 | 299 | } else { |
272 | 300 | $missing[] = $name; |
273 | 301 | } |
— | — | @@ -376,7 +404,7 @@ |
377 | 405 | if ( $context->shouldIncludeStyles() ) { |
378 | 406 | $styles = $module->getStyles( $context ); |
379 | 407 | // Flip CSS on a per-module basis |
380 | | - if ( $styles && $this->modules[$name]->getFlip( $context ) ) { |
| 408 | + if ( $styles && $module->getFlip( $context ) ) { |
381 | 409 | foreach ( $styles as $media => $style ) { |
382 | 410 | $styles[$media] = $this->filter( 'flip-css', $style ); |
383 | 411 | } |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php |
— | — | @@ -105,6 +105,12 @@ |
106 | 106 | * |
107 | 107 | * @example $options |
108 | 108 | * array( |
| 109 | + * // Base path to prepend to all local paths in $options. Defaults to $IP |
| 110 | + * 'localBasePath' => [base path], |
| 111 | + * // Base path to prepend to all remote paths in $options. Defaults to $wgScriptPath |
| 112 | + * 'remoteBasePath' => [base path], |
| 113 | + * // Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath |
| 114 | + * 'remoteExtPath' => [base path], |
109 | 115 | * // Scripts to always include |
110 | 116 | * 'scripts' => [file path string or array of file path strings], |
111 | 117 | * // Scripts to include in specific language contexts |
— | — | @@ -139,6 +145,12 @@ |
140 | 146 | global $IP, $wgScriptPath; |
141 | 147 | $this->localBasePath = $localBasePath === null ? $IP : $localBasePath; |
142 | 148 | $this->remoteBasePath = $remoteBasePath === null ? $wgScriptPath : $remoteBasePath; |
| 149 | + |
| 150 | + if ( isset( $options['remoteExtPath'] ) ) { |
| 151 | + global $wgExtensionAssetsPath; |
| 152 | + $this->remoteBasePath = $wgExtensionAssetsPath . '/' . $options['remoteExtPath']; |
| 153 | + } |
| 154 | + |
143 | 155 | foreach ( $options as $member => $option ) { |
144 | 156 | switch ( $member ) { |
145 | 157 | // Lists of file paths |
— | — | @@ -175,6 +187,8 @@ |
176 | 188 | break; |
177 | 189 | // Single strings |
178 | 190 | case 'group': |
| 191 | + case 'localBasePath': |
| 192 | + case 'remoteBasePath': |
179 | 193 | $this->{$member} = (string) $option; |
180 | 194 | break; |
181 | 195 | // Single booleans |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php |
— | — | @@ -101,7 +101,9 @@ |
102 | 102 | |
103 | 103 | $out = ''; |
104 | 104 | $registrations = array(); |
105 | | - foreach ( $context->getResourceLoader()->getModules() as $name => $module ) { |
| 105 | + $resourceLoader = $context->getResourceLoader(); |
| 106 | + foreach ( $resourceLoader->getModuleNames() as $name ) { |
| 107 | + $module = $resourceLoader->getModule( $name ); |
106 | 108 | // Support module loader scripts |
107 | 109 | $loader = $module->getLoaderScript(); |
108 | 110 | if ( $loader !== false ) { |
— | — | @@ -193,7 +195,9 @@ |
194 | 196 | // infinite recursion - think carefully before making changes to this |
195 | 197 | // code! |
196 | 198 | $time = wfTimestamp( TS_UNIX, $wgCacheEpoch ); |
197 | | - foreach ( $context->getResourceLoader()->getModules() as $module ) { |
| 199 | + $loader = $context->getResourceLoader(); |
| 200 | + foreach ( $loader->getModuleNames() as $name ) { |
| 201 | + $module = $loader->getModule( $name ); |
198 | 202 | $time = max( $time, $module->getModifiedTime( $context ) ); |
199 | 203 | } |
200 | 204 | return $this->modifiedTime[$hash] = $time; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1646,42 +1646,6 @@ |
1647 | 1647 | */ |
1648 | 1648 | $wgClockSkewFudge = 5; |
1649 | 1649 | |
1650 | | -/** |
1651 | | - * Maximum time in seconds to cache resources served by the resource loader |
1652 | | - */ |
1653 | | -$wgResourceLoaderMaxage = array( |
1654 | | - 'versioned' => array( |
1655 | | - // Squid/Varnish but also any other public proxy cache between the client and MediaWiki |
1656 | | - 'server' => 30 * 24 * 60 * 60, // 30 days |
1657 | | - // On the client side (e.g. in the browser cache). |
1658 | | - 'client' => 30 * 24 * 60 * 60, // 30 days |
1659 | | - ), |
1660 | | - 'unversioned' => array( |
1661 | | - 'server' => 5 * 60, // 5 minutes |
1662 | | - 'client' => 5 * 60, // 5 minutes |
1663 | | - ), |
1664 | | -); |
1665 | | - |
1666 | | -/** |
1667 | | - * Whether to embed private modules inline with HTML output or to bypass |
1668 | | - * caching and check the user parameter against $wgUser to prevent |
1669 | | - * unauthorized access to private modules. |
1670 | | - */ |
1671 | | -$wgResourceLoaderInlinePrivateModules = true; |
1672 | | - |
1673 | | -/** |
1674 | | - * The default debug mode (on/off) for of ResourceLoader requests. This will still |
1675 | | - * be overridden when the debug URL parameter is used. |
1676 | | - */ |
1677 | | -$wgResourceLoaderDebug = false; |
1678 | | - |
1679 | | -/** |
1680 | | - * Enable embedding of certain resources using Edge Side Includes. This will |
1681 | | - * improve performance but only works if there is something in front of the |
1682 | | - * web server (e..g a Squid or Varnish server) configured to process the ESI. |
1683 | | - */ |
1684 | | -$wgResourceLoaderUseESI = false; |
1685 | | - |
1686 | 1650 | /** @} */ # end of cache settings |
1687 | 1651 | |
1688 | 1652 | /************************************************************************//** |
— | — | @@ -2320,6 +2284,65 @@ |
2321 | 2285 | /** @} */ # End of output format settings } |
2322 | 2286 | |
2323 | 2287 | /*************************************************************************//** |
| 2288 | + * @name Resource loader settings |
| 2289 | + * @{ |
| 2290 | + */ |
| 2291 | + |
| 2292 | +/** |
| 2293 | + * Client-side resource modules. Extensions should add their module definitions |
| 2294 | + * here. |
| 2295 | + * |
| 2296 | + * Example: |
| 2297 | + * $wgResourceModules['ext.myExtension'] = array( |
| 2298 | + * 'scripts' => 'myExtension.js', |
| 2299 | + * 'styles' => 'myExtension.css', |
| 2300 | + * 'dependencies' => array( 'jquery.cookie', 'jquery.tabIndex' ), |
| 2301 | + * 'localBasePath' => dirname( __FILE ), |
| 2302 | + * 'remoteExtPath' => 'MyExtension', |
| 2303 | + * ); |
| 2304 | + */ |
| 2305 | +$wgResourceModules = array(); |
| 2306 | + |
| 2307 | +/** |
| 2308 | + * Maximum time in seconds to cache resources served by the resource loader |
| 2309 | + */ |
| 2310 | +$wgResourceLoaderMaxage = array( |
| 2311 | + 'versioned' => array( |
| 2312 | + // Squid/Varnish but also any other public proxy cache between the client and MediaWiki |
| 2313 | + 'server' => 30 * 24 * 60 * 60, // 30 days |
| 2314 | + // On the client side (e.g. in the browser cache). |
| 2315 | + 'client' => 30 * 24 * 60 * 60, // 30 days |
| 2316 | + ), |
| 2317 | + 'unversioned' => array( |
| 2318 | + 'server' => 5 * 60, // 5 minutes |
| 2319 | + 'client' => 5 * 60, // 5 minutes |
| 2320 | + ), |
| 2321 | +); |
| 2322 | + |
| 2323 | +/** |
| 2324 | + * Whether to embed private modules inline with HTML output or to bypass |
| 2325 | + * caching and check the user parameter against $wgUser to prevent |
| 2326 | + * unauthorized access to private modules. |
| 2327 | + */ |
| 2328 | +$wgResourceLoaderInlinePrivateModules = true; |
| 2329 | + |
| 2330 | +/** |
| 2331 | + * The default debug mode (on/off) for of ResourceLoader requests. This will still |
| 2332 | + * be overridden when the debug URL parameter is used. |
| 2333 | + */ |
| 2334 | +$wgResourceLoaderDebug = false; |
| 2335 | + |
| 2336 | +/** |
| 2337 | + * Enable embedding of certain resources using Edge Side Includes. This will |
| 2338 | + * improve performance but only works if there is something in front of the |
| 2339 | + * web server (e..g a Squid or Varnish server) configured to process the ESI. |
| 2340 | + */ |
| 2341 | +$wgResourceLoaderUseESI = false; |
| 2342 | + |
| 2343 | +/** @} */ # End of resource loader settings } |
| 2344 | + |
| 2345 | + |
| 2346 | +/*************************************************************************//** |
2324 | 2347 | * @name Page title and interwiki link settings |
2325 | 2348 | * @{ |
2326 | 2349 | */ |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -4,89 +4,85 @@ |
5 | 5 | |
6 | 6 | /* Special resources who have their own classes */ |
7 | 7 | |
8 | | - 'site' => new ResourceLoaderSiteModule, |
9 | | - 'startup' => new ResourceLoaderStartUpModule, |
10 | | - 'user' => new ResourceLoaderUserModule, |
11 | | - 'user.options' => new ResourceLoaderUserOptionsModule, |
| 8 | + 'site' => array( 'class' => 'ResourceLoaderSiteModule' ), |
| 9 | + 'startup' => array( 'class' => 'ResourceLoaderStartUpModule' ), |
| 10 | + 'user' => array( 'class' => 'ResourceLoaderUserModule' ), |
| 11 | + 'user.options' => array( 'class' => 'ResourceLoaderUserOptionsModule' ), |
12 | 12 | |
13 | 13 | /* Skins */ |
14 | 14 | |
15 | | - 'skins.vector' => new ResourceLoaderFileModule( |
16 | | - array( 'styles' => array( 'skins/vector/screen.css' => array( 'media' => 'screen' ) ) ) |
| 15 | + 'skins.vector' => array( |
| 16 | + 'styles' => array( 'skins/vector/screen.css' => array( 'media' => 'screen' ) ) |
17 | 17 | ), |
18 | | - 'skins.monobook' => new ResourceLoaderFileModule( |
19 | | - array( 'styles' => array( |
20 | | - 'skins/monobook/main.css' => array( 'media' => 'screen' ), |
21 | | - // Honor $wgHandheldStyle. This is kind of evil |
22 | | - //$GLOBALS['wgHandheldStyle'] => array( 'media' => 'handheld' ) |
23 | | - ) |
| 18 | + 'skins.monobook' => array( |
| 19 | + 'styles' => array( |
| 20 | + 'skins/monobook/main.css' => array( 'media' => 'screen' ), |
| 21 | + // Honor $wgHandheldStyle. This is kind of evil |
| 22 | + //$GLOBALS['wgHandheldStyle'] => array( 'media' => 'handheld' ) |
24 | 23 | ) |
25 | 24 | ), |
26 | 25 | |
27 | 26 | /* jQuery */ |
28 | 27 | |
29 | | - 'jquery' => new ResourceLoaderFileModule( |
30 | | - array( 'scripts' => 'resources/jquery/jquery.js', 'debugRaw' => false ) |
| 28 | + 'jquery' => array( |
| 29 | + 'scripts' => 'resources/jquery/jquery.js', |
| 30 | + 'debugRaw' => false |
31 | 31 | ), |
32 | 32 | |
33 | 33 | /* jQuery Plugins */ |
34 | 34 | |
35 | | - 'jquery.async' => new ResourceLoaderFileModule( |
36 | | - array( 'scripts' => 'resources/jquery/jquery.async.js' ) |
| 35 | + 'jquery.async' => array( |
| 36 | + 'scripts' => 'resources/jquery/jquery.async.js' |
37 | 37 | ), |
38 | | - 'jquery.autoEllipsis' => new ResourceLoaderFileModule( |
39 | | - array( 'scripts' => 'resources/jquery/jquery.autoEllipsis.js' ) |
| 38 | + 'jquery.autoEllipsis' => array( |
| 39 | + 'scripts' => 'resources/jquery/jquery.autoEllipsis.js' |
40 | 40 | ), |
41 | | - 'jquery.checkboxShiftClick' => new ResourceLoaderFileModule( |
42 | | - array( 'scripts' => 'resources/jquery/jquery.checkboxShiftClick.js' ) |
| 41 | + 'jquery.checkboxShiftClick' => array( |
| 42 | + 'scripts' => 'resources/jquery/jquery.checkboxShiftClick.js' |
43 | 43 | ), |
44 | | - 'jquery.client' => new ResourceLoaderFileModule( |
45 | | - array( 'scripts' => 'resources/jquery/jquery.client.js' ) |
| 44 | + 'jquery.client' => array( |
| 45 | + 'scripts' => 'resources/jquery/jquery.client.js', |
46 | 46 | ), |
47 | | - 'jquery.collapsibleTabs' => new ResourceLoaderFileModule( |
48 | | - array( 'scripts' => 'resources/jquery/jquery.collapsibleTabs.js' ) |
| 47 | + 'jquery.collapsibleTabs' => array( |
| 48 | + 'scripts' => 'resources/jquery/jquery.collapsibleTabs.js' |
49 | 49 | ), |
50 | | - 'jquery.color' => new ResourceLoaderFileModule( |
51 | | - array( 'scripts' => 'resources/jquery/jquery.color.js' ) |
| 50 | + 'jquery.color' => array( |
| 51 | + 'scripts' => 'resources/jquery/jquery.color.js' |
52 | 52 | ), |
53 | | - 'jquery.cookie' => new ResourceLoaderFileModule( |
54 | | - array( 'scripts' => 'resources/jquery/jquery.cookie.js' ) |
| 53 | + 'jquery.cookie' => array( |
| 54 | + 'scripts' => 'resources/jquery/jquery.cookie.js' |
55 | 55 | ), |
56 | | - 'jquery.delayedBind' => new ResourceLoaderFileModule( |
57 | | - array( 'scripts' => 'resources/jquery/jquery.delayedBind.js' ) |
| 56 | + 'jquery.delayedBind' => array( |
| 57 | + 'scripts' => 'resources/jquery/jquery.delayedBind.js' |
58 | 58 | ), |
59 | | - 'jquery.expandableField' => new ResourceLoaderFileModule( |
60 | | - array( 'scripts' => 'resources/jquery/jquery.expandableField.js' ) |
| 59 | + 'jquery.expandableField' => array( |
| 60 | + 'scripts' => 'resources/jquery/jquery.expandableField.js' |
61 | 61 | ), |
62 | | - 'jquery.highlightText' => new ResourceLoaderFileModule( |
63 | | - array( 'scripts' => 'resources/jquery/jquery.highlightText.js' ) |
| 62 | + 'jquery.highlightText' => array( |
| 63 | + 'scripts' => 'resources/jquery/jquery.highlightText.js' |
64 | 64 | ), |
65 | | - 'jquery.placeholder' => new ResourceLoaderFileModule( |
66 | | - array( 'scripts' => 'resources/jquery/jquery.placeholder.js' ) |
| 65 | + 'jquery.placeholder' => array( |
| 66 | + 'scripts' => 'resources/jquery/jquery.placeholder.js' |
67 | 67 | ), |
68 | | - 'jquery.suggestions' => new ResourceLoaderFileModule( |
69 | | - array( |
70 | | - 'scripts' => 'resources/jquery/jquery.suggestions.js', |
71 | | - 'styles' => 'resources/jquery/jquery.suggestions.css', |
72 | | - ) |
| 68 | + 'jquery.suggestions' => array( |
| 69 | + 'scripts' => 'resources/jquery/jquery.suggestions.js', |
| 70 | + 'styles' => 'resources/jquery/jquery.suggestions.css', |
73 | 71 | ), |
74 | | - 'jquery.tabIndex' => new ResourceLoaderFileModule( |
75 | | - array( 'scripts' => 'resources/jquery/jquery.tabIndex.js' ) |
| 72 | + 'jquery.tabIndex' => array( |
| 73 | + 'scripts' => 'resources/jquery/jquery.tabIndex.js' |
76 | 74 | ), |
77 | | - 'jquery.textSelection' => new ResourceLoaderFileModule( |
78 | | - array( 'scripts' => 'resources/jquery/jquery.textSelection.js' ) |
| 75 | + 'jquery.textSelection' => array( |
| 76 | + 'scripts' => 'resources/jquery/jquery.textSelection.js' |
79 | 77 | ), |
80 | | - 'jquery.tipsy' => new ResourceLoaderFileModule( |
81 | | - array( |
82 | | - 'scripts' => 'resources/jquery.tipsy/jquery.tipsy.js', |
83 | | - 'styles' => 'resources/jquery.tipsy/jquery.tipsy.css', |
84 | | - ) |
| 78 | + 'jquery.tipsy' => array( |
| 79 | + 'scripts' => 'resources/jquery.tipsy/jquery.tipsy.js', |
| 80 | + 'styles' => 'resources/jquery.tipsy/jquery.tipsy.css', |
85 | 81 | ), |
86 | 82 | |
87 | 83 | /* jQuery UI */ |
88 | 84 | |
89 | 85 | // Core |
90 | | - 'jquery.ui.core' => new ResourceLoaderFileModule( array( |
| 86 | + 'jquery.ui.core' => array( |
91 | 87 | 'scripts' => 'resources/jquery.ui/jquery.ui.core.js', |
92 | 88 | 'skinStyles' => array( |
93 | 89 | 'default' => array( |
— | — | @@ -99,74 +95,74 @@ |
100 | 96 | ), |
101 | 97 | ), |
102 | 98 | 'dependencies' => 'jquery', |
103 | | - ) ), |
104 | | - 'jquery.ui.widget' => new ResourceLoaderFileModule( array( |
| 99 | + ), |
| 100 | + 'jquery.ui.widget' => array( |
105 | 101 | 'scripts' => 'resources/jquery.ui/jquery.ui.widget.js', |
106 | | - ) ), |
107 | | - 'jquery.ui.mouse' => new ResourceLoaderFileModule( array( |
| 102 | + ), |
| 103 | + 'jquery.ui.mouse' => array( |
108 | 104 | 'scripts' => 'resources/jquery.ui/jquery.ui.mouse.js', |
109 | 105 | 'dependencies' => 'jquery.ui.widget', |
110 | | - ) ), |
111 | | - 'jquery.ui.position' => new ResourceLoaderFileModule( array( |
| 106 | + ), |
| 107 | + 'jquery.ui.position' => array( |
112 | 108 | 'scripts' => 'resources/jquery.ui/jquery.ui.position.js', |
113 | | - ) ), |
| 109 | + ), |
114 | 110 | // Interactions |
115 | | - 'jquery.ui.draggable' => new ResourceLoaderFileModule( array( |
| 111 | + 'jquery.ui.draggable' => array( |
116 | 112 | 'scripts' => 'resources/jquery.ui/jquery.ui.draggable.js', |
117 | 113 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.mouse', 'jquery.ui.widget' ), |
118 | | - ) ), |
119 | | - 'jquery.ui.droppable' => new ResourceLoaderFileModule( array( |
| 114 | + ), |
| 115 | + 'jquery.ui.droppable' => array( |
120 | 116 | 'scripts' => 'resources/jquery.ui/jquery.ui.droppable.js', |
121 | 117 | 'dependencies' => array( |
122 | 118 | 'jquery.ui.core', 'jquery.ui.mouse', 'jquery.ui.widget', 'jquery.ui.draggable' |
123 | 119 | ), |
124 | | - ) ), |
125 | | - 'jquery.ui.resizable' => new ResourceLoaderFileModule( array( |
| 120 | + ), |
| 121 | + 'jquery.ui.resizable' => array( |
126 | 122 | 'scripts' => 'resources/jquery.ui/jquery.ui.resizable.js', |
127 | 123 | 'skinStyles' => array( |
128 | 124 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.resizable.css', |
129 | 125 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.resizable.css', |
130 | 126 | ), |
131 | 127 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), |
132 | | - ) ), |
133 | | - 'jquery.ui.selectable' => new ResourceLoaderFileModule( array( |
| 128 | + ), |
| 129 | + 'jquery.ui.selectable' => array( |
134 | 130 | 'scripts' => 'resources/jquery.ui/jquery.ui.selectable.js', |
135 | 131 | 'skinStyles' => array( |
136 | 132 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.selectable.css', |
137 | 133 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.selectable.css', |
138 | 134 | ), |
139 | 135 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), |
140 | | - ) ), |
141 | | - 'jquery.ui.sortable' => new ResourceLoaderFileModule( array( |
| 136 | + ), |
| 137 | + 'jquery.ui.sortable' => array( |
142 | 138 | 'scripts' => 'resources/jquery.ui/jquery.ui.sortable.js', |
143 | 139 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), |
144 | | - ) ), |
| 140 | + ), |
145 | 141 | // Widgets |
146 | | - 'jquery.ui.accordion' => new ResourceLoaderFileModule( array( |
| 142 | + 'jquery.ui.accordion' => array( |
147 | 143 | 'scripts' => 'resources/jquery.ui/jquery.ui.accordion.js', |
148 | 144 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), |
149 | 145 | 'skinStyles' => array( |
150 | 146 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.accordion.css', |
151 | 147 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.accordion.css', |
152 | 148 | ), |
153 | | - ) ), |
154 | | - 'jquery.ui.autocomplete' => new ResourceLoaderFileModule( array( |
| 149 | + ), |
| 150 | + 'jquery.ui.autocomplete' => array( |
155 | 151 | 'scripts' => 'resources/jquery.ui/jquery.ui.autocomplete.js', |
156 | 152 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.position' ), |
157 | 153 | 'skinStyles' => array( |
158 | 154 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.autocomplete.css', |
159 | 155 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css', |
160 | 156 | ), |
161 | | - ) ), |
162 | | - 'jquery.ui.button' => new ResourceLoaderFileModule( array( |
| 157 | + ), |
| 158 | + 'jquery.ui.button' => array( |
163 | 159 | 'scripts' => 'resources/jquery.ui/jquery.ui.button.js', |
164 | 160 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), |
165 | 161 | 'skinStyles' => array( |
166 | 162 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.button.css', |
167 | 163 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.button.css', |
168 | 164 | ), |
169 | | - ) ), |
170 | | - 'jquery.ui.datepicker' => new ResourceLoaderFileModule( array( |
| 165 | + ), |
| 166 | + 'jquery.ui.datepicker' => array( |
171 | 167 | 'scripts' => 'resources/jquery.ui/jquery.ui.datepicker.js', |
172 | 168 | 'dependencies' => 'jquery.ui.core', |
173 | 169 | 'skinStyles' => array( |
— | — | @@ -227,8 +223,8 @@ |
228 | 224 | 'zh-hk' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-zh-HK.js', |
229 | 225 | 'zh-tw' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js' |
230 | 226 | ), |
231 | | - ) ), |
232 | | - 'jquery.ui.dialog' => new ResourceLoaderFileModule( array( |
| 227 | + ), |
| 228 | + 'jquery.ui.dialog' => array( |
233 | 229 | 'scripts' => 'resources/jquery.ui/jquery.ui.dialog.js', |
234 | 230 | 'dependencies' => array( |
235 | 231 | 'jquery.ui.core', |
— | — | @@ -243,112 +239,112 @@ |
244 | 240 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.dialog.css', |
245 | 241 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.dialog.css', |
246 | 242 | ), |
247 | | - ) ), |
248 | | - 'jquery.ui.progressbar' => new ResourceLoaderFileModule( array( |
| 243 | + ), |
| 244 | + 'jquery.ui.progressbar' => array( |
249 | 245 | 'scripts' => 'resources/jquery.ui/jquery.ui.progressbar.js', |
250 | 246 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), |
251 | 247 | 'skinStyles' => array( |
252 | 248 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.progressbar.css', |
253 | 249 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.progressbar.css', |
254 | 250 | ), |
255 | | - ) ), |
256 | | - 'jquery.ui.slider' => new ResourceLoaderFileModule( array( |
| 251 | + ), |
| 252 | + 'jquery.ui.slider' => array( |
257 | 253 | 'scripts' => 'resources/jquery.ui/jquery.ui.slider.js', |
258 | 254 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), |
259 | 255 | 'skinStyles' => array( |
260 | 256 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.slider.css', |
261 | 257 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.slider.css', |
262 | 258 | ), |
263 | | - ) ), |
264 | | - 'jquery.ui.tabs' => new ResourceLoaderFileModule( array( |
| 259 | + ), |
| 260 | + 'jquery.ui.tabs' => array( |
265 | 261 | 'scripts' => 'resources/jquery.ui/jquery.ui.tabs.js', |
266 | 262 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), |
267 | 263 | 'skinStyles' => array( |
268 | 264 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.tabs.css', |
269 | 265 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.tabs.css', |
270 | 266 | ), |
271 | | - ) ), |
| 267 | + ), |
272 | 268 | // Effects |
273 | | - 'jquery.effects.core' => new ResourceLoaderFileModule( array( |
| 269 | + 'jquery.effects.core' => array( |
274 | 270 | 'scripts' => 'resources/jquery.effects/jquery.effects.core.js', |
275 | 271 | 'dependencies' => 'jquery', |
276 | | - ) ), |
277 | | - 'jquery.effects.blind' => new ResourceLoaderFileModule( array( |
| 272 | + ), |
| 273 | + 'jquery.effects.blind' => array( |
278 | 274 | 'scripts' => 'resources/jquery.effects/jquery.effects.blind.js', |
279 | 275 | 'dependencies' => 'jquery.effects.core', |
280 | | - ) ), |
281 | | - 'jquery.effects.bounce' => new ResourceLoaderFileModule( array( |
| 276 | + ), |
| 277 | + 'jquery.effects.bounce' => array( |
282 | 278 | 'scripts' => 'resources/jquery.effects/jquery.effects.bounce.js', |
283 | 279 | 'dependencies' => 'jquery.effects.core', |
284 | | - ) ), |
285 | | - 'jquery.effects.clip' => new ResourceLoaderFileModule( array( |
| 280 | + ), |
| 281 | + 'jquery.effects.clip' => array( |
286 | 282 | 'scripts' => 'resources/jquery.effects/jquery.effects.clip.js', |
287 | 283 | 'dependencies' => 'jquery.effects.core', |
288 | | - ) ), |
289 | | - 'jquery.effects.drop' => new ResourceLoaderFileModule( array( |
| 284 | + ), |
| 285 | + 'jquery.effects.drop' => array( |
290 | 286 | 'scripts' => 'resources/jquery.effects/jquery.effects.drop.js', |
291 | 287 | 'dependencies' => 'jquery.effects.core', |
292 | | - ) ), |
293 | | - 'jquery.effects.explode' => new ResourceLoaderFileModule( array( |
| 288 | + ), |
| 289 | + 'jquery.effects.explode' => array( |
294 | 290 | 'scripts' => 'resources/jquery.effects/jquery.effects.explode.js', |
295 | 291 | 'dependencies' => 'jquery.effects.core', |
296 | | - ) ), |
297 | | - 'jquery.effects.fold' => new ResourceLoaderFileModule( array( |
| 292 | + ), |
| 293 | + 'jquery.effects.fold' => array( |
298 | 294 | 'scripts' => 'resources/jquery.effects/jquery.effects.fold.js', |
299 | 295 | 'dependencies' => 'jquery.effects.core', |
300 | | - ) ), |
301 | | - 'jquery.effects.highlight' => new ResourceLoaderFileModule( array( |
| 296 | + ), |
| 297 | + 'jquery.effects.highlight' => array( |
302 | 298 | 'scripts' => 'resources/jquery.effects/jquery.effects.highlight.js', |
303 | 299 | 'dependencies' => 'jquery.effects.core', |
304 | | - ) ), |
305 | | - 'jquery.effects.pulsate' => new ResourceLoaderFileModule( array( |
| 300 | + ), |
| 301 | + 'jquery.effects.pulsate' => array( |
306 | 302 | 'scripts' => 'resources/jquery.effects/jquery.effects.pulsate.js', |
307 | 303 | 'dependencies' => 'jquery.effects.core', |
308 | | - ) ), |
309 | | - 'jquery.effects.scale' => new ResourceLoaderFileModule( array( |
| 304 | + ), |
| 305 | + 'jquery.effects.scale' => array( |
310 | 306 | 'scripts' => 'resources/jquery.effects/jquery.effects.scale.js', |
311 | 307 | 'dependencies' => 'jquery.effects.core', |
312 | | - ) ), |
313 | | - 'jquery.effects.shake' => new ResourceLoaderFileModule( array( |
| 308 | + ), |
| 309 | + 'jquery.effects.shake' => array( |
314 | 310 | 'scripts' => 'resources/jquery.effects/jquery.effects.shake.js', |
315 | 311 | 'dependencies' => 'jquery.effects.core', |
316 | | - ) ), |
317 | | - 'jquery.effects.slide' => new ResourceLoaderFileModule( array( |
| 312 | + ), |
| 313 | + 'jquery.effects.slide' => array( |
318 | 314 | 'scripts' => 'resources/jquery.effects/jquery.effects.slide.js', |
319 | 315 | 'dependencies' => 'jquery.effects.core', |
320 | | - ) ), |
321 | | - 'jquery.effects.transfer' => new ResourceLoaderFileModule( array( |
| 316 | + ), |
| 317 | + 'jquery.effects.transfer' => array( |
322 | 318 | 'scripts' => 'resources/jquery.effects/jquery.effects.transfer.js', |
323 | 319 | 'dependencies' => 'jquery.effects.core', |
324 | | - ) ), |
| 320 | + ), |
325 | 321 | |
326 | 322 | /* MediaWiki */ |
327 | 323 | |
328 | | - 'mediawiki' => new ResourceLoaderFileModule( array( |
| 324 | + 'mediawiki' => array( |
329 | 325 | 'scripts' => 'resources/mediawiki/mediawiki.js', |
330 | 326 | 'debugScripts' => 'resources/mediawiki/mediawiki.log.js', |
331 | 327 | 'debugRaw' => false |
332 | | - ) ), |
333 | | - 'mediawiki.util' => new ResourceLoaderFileModule( array( |
| 328 | + ), |
| 329 | + 'mediawiki.util' => array( |
334 | 330 | 'scripts' => 'resources/mediawiki.util/mediawiki.util.js', |
335 | 331 | 'dependencies' => array( 'jquery.checkboxShiftClick', 'jquery.client' ), |
336 | 332 | 'debugScripts' => 'resources/mediawiki.util/mediawiki.util.test.js', |
337 | | - ) ), |
338 | | - 'mediawiki.action.view.rightClickEdit' => new ResourceLoaderFileModule( array( |
| 333 | + ), |
| 334 | + 'mediawiki.action.view.rightClickEdit' => array( |
339 | 335 | 'scripts' => 'resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js', |
340 | | - ) ), |
341 | | - 'mediawiki.special.preferences' => new ResourceLoaderFileModule( array( |
| 336 | + ), |
| 337 | + 'mediawiki.special.preferences' => array( |
342 | 338 | 'scripts' => 'resources/mediawiki.special/mediawiki.special.preferences.js', |
343 | 339 | 'styles' => 'resources/mediawiki.special/mediawiki.special.preferences.css', |
344 | | - ) ), |
345 | | - 'mediawiki.special.search' => new ResourceLoaderFileModule( array( |
| 340 | + ), |
| 341 | + 'mediawiki.special.search' => array( |
346 | 342 | 'scripts' => 'resources/mediawiki.special/mediawiki.special.search.js', |
347 | | - ) ), |
348 | | - 'mediawiki.action.history' => new ResourceLoaderFileModule( array( |
| 343 | + ), |
| 344 | + 'mediawiki.action.history' => array( |
349 | 345 | 'scripts' => 'resources/mediawiki.action/mediawiki.action.history.js', |
350 | 346 | 'dependencies' => 'mediawiki.legacy.history', |
351 | | - ) ), |
352 | | - 'mediawiki.language' => new ResourceLoaderFileModule( array( |
| 347 | + ), |
| 348 | + 'mediawiki.language' => array( |
353 | 349 | 'scripts' => 'resources/mediawiki.language/mediawiki.language.js', |
354 | 350 | 'languageScripts' => array( |
355 | 351 | 'am' => 'resources/mediawiki.language/languages/am.js', |
— | — | @@ -397,111 +393,111 @@ |
398 | 394 | 'uk' => 'resources/mediawiki.language/languages/uk.js', |
399 | 395 | 'wa' => 'resources/mediawiki.language/languages/wa.js', |
400 | 396 | ), |
401 | | - ) ), |
| 397 | + ), |
402 | 398 | |
403 | 399 | /* mediawiki Legacy */ |
404 | 400 | |
405 | | - 'mediawiki.legacy.ajax' => new ResourceLoaderFileModule( array( |
| 401 | + 'mediawiki.legacy.ajax' => array( |
406 | 402 | 'scripts' => 'skins/common/ajax.js', |
407 | 403 | 'messages' => array( |
408 | 404 | 'watch', 'unwatch', 'watching', 'unwatching', 'tooltip-ca-watch', |
409 | 405 | 'tooltip-ca-unwatch' |
410 | 406 | ), |
411 | 407 | 'dependencies' => 'mediawiki.legacy.wikibits', |
412 | | - ) ), |
413 | | - 'mediawiki.legacy.ajaxwatch' => new ResourceLoaderFileModule( array( |
| 408 | + ), |
| 409 | + 'mediawiki.legacy.ajaxwatch' => array( |
414 | 410 | 'scripts' => 'skins/common/ajaxwatch.js', |
415 | 411 | 'dependencies' => 'mediawiki.legacy.wikibits', |
416 | | - ) ), |
417 | | - 'mediawiki.legacy.block' => new ResourceLoaderFileModule( array( |
| 412 | + ), |
| 413 | + 'mediawiki.legacy.block' => array( |
418 | 414 | 'scripts' => 'skins/common/block.js', |
419 | 415 | 'dependencies' => 'mediawiki.legacy.wikibits', |
420 | | - ) ), |
421 | | - 'mediawiki.legacy.changepassword' => new ResourceLoaderFileModule( array( |
| 416 | + ), |
| 417 | + 'mediawiki.legacy.changepassword' => array( |
422 | 418 | 'scripts' => 'skins/common/changepassword.js', |
423 | 419 | 'dependencies' => 'mediawiki.legacy.wikibits', |
424 | | - ) ), |
425 | | - 'mediawiki.legacy.commonPrint' => new ResourceLoaderFileModule( array( |
| 420 | + ), |
| 421 | + 'mediawiki.legacy.commonPrint' => array( |
426 | 422 | 'styles' => array( 'skins/common/commonPrint.css' => array( 'media' => 'print' ) ), |
427 | | - ) ), |
428 | | - 'mediawiki.legacy.config' => new ResourceLoaderFileModule( array( |
| 423 | + ), |
| 424 | + 'mediawiki.legacy.config' => array( |
429 | 425 | 'scripts' => 'skins/common/config.js', |
430 | 426 | 'styles' => array( 'skins/common/config.css', 'skins/common/config-cc.css' ), |
431 | 427 | 'dependencies' => 'mediawiki.legacy.wikibits', |
432 | | - ) ), |
433 | | - 'mediawiki.legacy.diff' => new ResourceLoaderFileModule( array( |
| 428 | + ), |
| 429 | + 'mediawiki.legacy.diff' => array( |
434 | 430 | 'scripts' => 'skins/common/diff.js', |
435 | 431 | 'styles' => 'skins/common/diff.css', |
436 | 432 | 'dependencies' => 'mediawiki.legacy.wikibits', |
437 | | - ) ), |
438 | | - 'mediawiki.legacy.edit' => new ResourceLoaderFileModule( array( |
| 433 | + ), |
| 434 | + 'mediawiki.legacy.edit' => array( |
439 | 435 | 'scripts' => 'skins/common/edit.js', |
440 | 436 | 'dependencies' => 'mediawiki.legacy.wikibits', |
441 | | - ) ), |
442 | | - 'mediawiki.legacy.enhancedchanges' => new ResourceLoaderFileModule( array( |
| 437 | + ), |
| 438 | + 'mediawiki.legacy.enhancedchanges' => array( |
443 | 439 | 'scripts' => 'skins/common/enhancedchanges.js', |
444 | 440 | 'dependencies' => 'mediawiki.legacy.wikibits', |
445 | | - ) ), |
446 | | - 'mediawiki.legacy.history' => new ResourceLoaderFileModule( array( |
| 441 | + ), |
| 442 | + 'mediawiki.legacy.history' => array( |
447 | 443 | 'scripts' => 'skins/common/history.js', |
448 | 444 | 'dependencies' => 'mediawiki.legacy.wikibits', |
449 | | - ) ), |
450 | | - 'mediawiki.legacy.htmlform' => new ResourceLoaderFileModule( array( |
| 445 | + ), |
| 446 | + 'mediawiki.legacy.htmlform' => array( |
451 | 447 | 'scripts' => 'skins/common/htmlform.js', |
452 | 448 | 'dependencies' => 'mediawiki.legacy.wikibits', |
453 | | - ) ), |
454 | | - 'mediawiki.legacy.IEFixes' => new ResourceLoaderFileModule( array( |
| 449 | + ), |
| 450 | + 'mediawiki.legacy.IEFixes' => array( |
455 | 451 | 'scripts' => 'skins/common/IEFixes.js', |
456 | 452 | 'dependencies' => 'mediawiki.legacy.wikibits', |
457 | | - ) ), |
458 | | - 'mediawiki.legacy.metadata' => new ResourceLoaderFileModule( array( |
| 453 | + ), |
| 454 | + 'mediawiki.legacy.metadata' => array( |
459 | 455 | 'scripts' => 'skins/common/metadata.js', |
460 | 456 | 'dependencies' => 'mediawiki.legacy.wikibits', |
461 | 457 | 'messages' => array( 'metadata-expand', 'metadata-collapse' ), |
462 | | - ) ), |
463 | | - 'mediawiki.legacy.mwsuggest' => new ResourceLoaderFileModule( array( |
| 458 | + ), |
| 459 | + 'mediawiki.legacy.mwsuggest' => array( |
464 | 460 | 'scripts' => 'skins/common/mwsuggest.js', |
465 | 461 | 'dependencies' => 'mediawiki.legacy.wikibits', |
466 | 462 | 'messages' => array( 'search-mwsuggest-enabled', 'search-mwsuggest-disabled' ), |
467 | | - ) ), |
468 | | - 'mediawiki.legacy.password' => new ResourceLoaderFileModule( array( |
| 463 | + ), |
| 464 | + 'mediawiki.legacy.password' => array( |
469 | 465 | 'scripts' => 'skins/common/password.js', |
470 | 466 | 'styles' => 'skins/common/password.css', |
471 | 467 | 'dependencies' => 'mediawiki.legacy.wikibits', |
472 | | - ) ), |
473 | | - 'mediawiki.legacy.prefs' => new ResourceLoaderFileModule( array( |
| 468 | + ), |
| 469 | + 'mediawiki.legacy.prefs' => array( |
474 | 470 | 'scripts' => 'skins/common/prefs.js', |
475 | 471 | 'dependencies' => array( 'mediawiki.legacy.wikibits', 'mediawiki.legacy.htmlform' ), |
476 | | - ) ), |
477 | | - 'mediawiki.legacy.preview' => new ResourceLoaderFileModule( array( |
| 472 | + ), |
| 473 | + 'mediawiki.legacy.preview' => array( |
478 | 474 | 'scripts' => 'skins/common/preview.js', |
479 | 475 | 'dependencies' => 'mediawiki.legacy.wikibits', |
480 | | - ) ), |
481 | | - 'mediawiki.legacy.protect' => new ResourceLoaderFileModule( array( |
| 476 | + ), |
| 477 | + 'mediawiki.legacy.protect' => array( |
482 | 478 | 'scripts' => 'skins/common/protect.js', |
483 | 479 | 'dependencies' => 'mediawiki.legacy.wikibits', |
484 | | - ) ), |
485 | | - 'mediawiki.legacy.search' => new ResourceLoaderFileModule( array( |
| 480 | + ), |
| 481 | + 'mediawiki.legacy.search' => array( |
486 | 482 | 'scripts' => 'skins/common/search.js', |
487 | 483 | 'styles' => 'skins/common/search.css', |
488 | 484 | 'dependencies' => 'mediawiki.legacy.wikibits', |
489 | | - ) ), |
490 | | - 'mediawiki.legacy.shared' => new ResourceLoaderFileModule( array( |
| 485 | + ), |
| 486 | + 'mediawiki.legacy.shared' => array( |
491 | 487 | 'styles' => array( 'skins/common/shared.css' => array( 'media' => 'screen' ) ), |
492 | | - ) ), |
493 | | - 'mediawiki.legacy.oldshared' => new ResourceLoaderFileModule( array( |
| 488 | + ), |
| 489 | + 'mediawiki.legacy.oldshared' => array( |
494 | 490 | 'styles' => array( 'skins/common/oldshared.css' => array( 'media' => 'screen' ) ), |
495 | | - ) ), |
496 | | - 'mediawiki.legacy.upload' => new ResourceLoaderFileModule( array( |
| 491 | + ), |
| 492 | + 'mediawiki.legacy.upload' => array( |
497 | 493 | 'scripts' => 'skins/common/upload.js', |
498 | 494 | 'dependencies' => 'mediawiki.legacy.wikibits', |
499 | | - ) ), |
500 | | - 'mediawiki.legacy.wikibits' => new ResourceLoaderFileModule( array( |
| 495 | + ), |
| 496 | + 'mediawiki.legacy.wikibits' => array( |
501 | 497 | 'scripts' => 'skins/common/wikibits.js', |
502 | 498 | 'dependencies' => 'mediawiki.language', |
503 | 499 | 'messages' => array( 'showtoc', 'hidetoc' ), |
504 | | - ) ), |
505 | | - 'mediawiki.legacy.wikiprintable' => new ResourceLoaderFileModule( array( |
| 500 | + ), |
| 501 | + 'mediawiki.legacy.wikiprintable' => array( |
506 | 502 | 'styles' => array( 'skins/common/wikiprintable.css' => array( 'media' => 'print' ) ), |
507 | | - ) ), |
| 503 | + ), |
508 | 504 | ); |