Index: trunk/phase3/includes/ResourceLoader.php |
— | — | @@ -149,7 +149,9 @@ |
150 | 150 | foreach ( self::$modules as $name => $module ) { |
151 | 151 | // Support module loader scripts |
152 | 152 | if ( ( $loader = $module->getLoaderScript() ) !== false ) { |
153 | | - $scripts .= $loader; |
| 153 | + $deps = json_encode( $module->getDependencies() ); |
| 154 | + $version = wfTimestamp( TS_ISO_8601, round( $module->getModifiedTime( $context ), -2 ) ); |
| 155 | + $scripts .= "( function( name, version, dependencies ) { $loader } )( '$name', '$version', $deps )"; |
154 | 156 | } |
155 | 157 | // Automatically register module |
156 | 158 | else { |