}
$illegalFileChars = $conf->get( 'IllegalFileChars' );
+ $oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD;
// Build list of variables
$vars = [
'wgResourceLoaderStorageEnabled' => $conf->get( 'ResourceLoaderStorageEnabled' ),
'wgForeignUploadTargets' => $conf->get( 'ForeignUploadTargets' ),
'wgEnableUploads' => $conf->get( 'EnableUploads' ),
+ 'wgCommentByteLimit' => $oldCommentSchema ? 255 : null,
+ 'wgCommentCodePointLimit' => $oldCommentSchema ? null : CommentStore::COMMENT_CHARACTER_LIMIT,
];
Hooks::run( 'ResourceLoaderGetConfigVars', [ &$vars ] );
return true;
}
+ /**
+ * @param ResourceLoaderContext $context
+ * @return array
+ */
+ public function getPreloadLinks( ResourceLoaderContext $context ) {
+ $url = self::getStartupModulesUrl( $context );
+ return [
+ $url => [ 'as' => 'script' ]
+ ];
+ }
+
/**
* Base modules required for the base environment of ResourceLoader
*
}, [
'$VARS.wgLegacyJavaScriptGlobals' => $this->getConfig()->get( 'LegacyJavaScriptGlobals' ),
'$VARS.configuration' => $this->getConfigSettings( $context ),
+ // This url may be preloaded. See getPreloadLinks().
'$VARS.baseModulesUri' => self::getStartupModulesUrl( $context ),
] );
$pairs['$CODE.registrations()'] = str_replace(