<?php
/**
- * Module for resource loader initialization.
+ * Module for ResourceLoader initialization.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
'wgResourceLoaderLegacyModules' => self::getLegacyModules(),
'wgForeignUploadTargets' => $conf->get( 'ForeignUploadTargets' ),
'wgEnableUploads' => $conf->get( 'EnableUploads' ),
+ 'wgForeignUploadTestEnabled' => $conf->get( 'ForeignUploadTestEnabled' ),
+ 'wgForeignUploadTestDefault' => $conf->get( 'ForeignUploadTestDefault' ),
);
Hooks::run( 'ResourceLoaderGetConfigVars', array( &$vars ) );
$resourceLoader = $context->getResourceLoader();
$target = $context->getRequest()->getVal( 'target', 'desktop' );
- // Bypass target filter if this request is from a unit test context. To prevent misuse in
- // production, this is only allowed if testing is enabled server-side.
+ // Bypass target filter if this request is Special:JavaScriptTest.
+ // To prevent misuse in production, this is only allowed if testing is enabled server-side.
$byPassTargetFilter = $this->getConfig()->get( 'EnableJavaScriptTest' ) && $target === 'test';
$out = '';
$versionHash = $module->getVersionHash( $context );
if ( strlen( $versionHash ) !== 8 ) {
+ $context->getLogger()->warning(
+ "Module '{module}' produced an invalid version hash: '{version}'.",
+ array(
+ 'module' => $name,
+ 'version' => $versionHash,
+ )
+ );
// Module implementation either broken or deviated from ResourceLoader::makeHash
// Asserted by tests/phpunit/structure/ResourcesTest.
$versionHash = ResourceLoader::makeHash( $versionHash );