Made ResourceLoader an instantiable object, rather than a static one, making it more modular and testable.

This commit is contained in:
Trevor Parscal 2010-09-29 19:04:04 +00:00
parent 3bf3f43839
commit 00a8966b90

View file

@ -687,9 +687,9 @@ class WikiEditorHooks {
*
* Adds modules to ResourceLoader
*/
public static function resourceLoaderRegisterModules() {
public static function resourceLoaderRegisterModules( &$resourceLoader ) {
foreach ( self::$modules as $name => $resources ) {
ResourceLoader::register( $name, new ResourceLoaderFileModule( $resources ) );
$resourceLoader->register( $name, new ResourceLoaderFileModule( $resources ) );
}
return true;
}