'wgSearchType' => $conf->get( 'SearchType' ),
'wgVariantArticlePath' => $conf->get( 'VariantArticlePath' ),
// Force object to avoid "empty" associative array from
- // becoming [] instead of {} in JS (bug 34604)
+ // becoming [] instead of {} in JS (T36604)
'wgActionPaths' => (object)$conf->get( 'ActionPaths' ),
'wgServer' => $conf->get( 'Server' ),
'wgServerName' => $conf->get( 'ServerName' ),
'wgIllegalFileChars' => Title::convertByteClassToUnicodeClass( $illegalFileChars ),
'wgResourceLoaderStorageVersion' => $conf->get( 'ResourceLoaderStorageVersion' ),
'wgResourceLoaderStorageEnabled' => $conf->get( 'ResourceLoaderStorageEnabled' ),
- 'wgResourceLoaderLegacyModules' => self::getLegacyModules(),
'wgForeignUploadTargets' => $conf->get( 'ForeignUploadTargets' ),
'wgEnableUploads' => $conf->get( 'EnableUploads' ),
];
*/
public static function getStartupModulesUrl( ResourceLoaderContext $context ) {
$rl = $context->getResourceLoader();
-
$derivative = new DerivativeResourceLoaderContext( $context );
- $derivative->setModules( self::getStartupModules() );
+ $derivative->setModules( array_merge(
+ self::getStartupModules(),
+ self::getLegacyModules()
+ ) );
$derivative->setOnly( 'scripts' );
// Must setModules() before makeVersionQuery()
$derivative->setVersion( $rl->makeVersionQuery( $derivative ) );
/**
* @param ResourceLoaderContext $context
- * @return string
+ * @return string JavaScript code
*/
public function getScript( ResourceLoaderContext $context ) {
global $IP;