Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -81,6 +81,9 @@ |
82 | 82 | |
83 | 83 | // Since 0.7 |
84 | 84 | $wgHooks['SkinAfterBottomScripts'][] = 'MapsHooks::addOnloadFunction'; |
| 85 | + |
| 86 | + // Since 0.7 |
| 87 | + $wgHooks['ResourceLoaderRegisterModules'][] = 'MapsHooks::registerResourceLoaderModules'; |
85 | 88 | } |
86 | 89 | |
87 | 90 | /** |
Index: trunk/extensions/Maps/Maps.hooks.php |
— | — | @@ -57,6 +57,30 @@ |
58 | 58 | } |
59 | 59 | |
60 | 60 | return true; |
| 61 | + } |
| 62 | + |
| 63 | + /** |
| 64 | + * Register the resource modules for the resource loader. |
| 65 | + * |
| 66 | + * @since 0.7 |
| 67 | + * |
| 68 | + * @param ResourceLoader $resourceLoader |
| 69 | + * |
| 70 | + * @return true |
| 71 | + */ |
| 72 | + public static function registerResourceLoaderModules( ResourceLoader &$resourceLoader ) { |
| 73 | + global $smwgScriptPath, $wgContLang; |
| 74 | + |
| 75 | + $modules = array( |
| 76 | + ); |
| 77 | + |
| 78 | + foreach ( $modules as $name => $resources ) { |
| 79 | + $resourceLoader->register( $name, new ResourceLoaderFileModule( |
| 80 | + array_merge_recursive( $resources, array( 'group' => 'ext.maps' ) ) |
| 81 | + ) ); |
| 82 | + } |
| 83 | + |
| 84 | + return true; |
61 | 85 | } |
62 | 86 | |
63 | 87 | } |
\ No newline at end of file |