X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderStartUpModule.php;h=ae9520d1a6674cd1101b60e78490691b3facb192;hb=a8bdc1685629bee543fcf215482c2a78aa1b9727;hp=8b9feeb8f04122a2725996b13e14184d432a1b82;hpb=03cd9495a4dac1c1cda738d52e74b553b977beb8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 8b9feeb8f0..ae9520d1a6 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -1,7 +1,5 @@ + * + * The startup module, as being called only from ResourceLoaderClientHtml, has + * the ability to vary based extra query parameters, in addition to those + * from ResourceLoaderContext: + * + * - target: Only register modules in the client allowed within this target. + * Default: "desktop". + * See also: OutputPage::setTarget(), ResourceLoaderModule::getTargets(). + */ class ResourceLoaderStartUpModule extends ResourceLoaderModule { // Cache for getConfigSettings() as it's called by multiple methods @@ -66,6 +77,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { } $illegalFileChars = $conf->get( 'IllegalFileChars' ); + $oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD; // Build list of variables $vars = [ @@ -113,6 +125,8 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { '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 ] );