'wgNamespaceIds' => $namespaceIds,
'wgContentNamespaces' => MWNamespace::getContentNamespaces(),
'wgSiteName' => $conf->get( 'Sitename' ),
- 'wgFileExtensions' => array_values( array_unique( $conf->get( 'FileExtensions' ) ) ),
'wgDBname' => $conf->get( 'DBname' ),
'wgAvailableSkins' => Skin::getSkinNames(),
'wgExtensionAssetsPath' => $conf->get( 'ExtensionAssetsPath' ),
* @return string JavaScript code for registering all modules with the client loader
*/
public function getModuleRegistrations( ResourceLoaderContext $context ) {
- wfProfileIn( __METHOD__ );
$resourceLoader = $context->getResourceLoader();
$target = $context->getRequest()->getVal( 'target', 'desktop' );
// Register modules
$out .= ResourceLoader::makeLoaderRegisterScript( $registrations );
- wfProfileOut( __METHOD__ );
return $out;
}
}
/**
- * Base modules required for the the base environment of ResourceLoader
+ * Base modules required for the base environment of ResourceLoader
*
* @return array
*/
);
$mwConfigSetJsCall = Xml::encodeJsCall(
'mw.config.set',
- array( $configuration )
+ array( $configuration ),
+ ResourceLoader::inDebugMode()
);
$out .= "var startUp = function () {\n" .
$scriptTag = Html::linkedScript( self::getStartupModulesUrl( $context ) );
$out .= "if ( isCompatible() ) {\n" .
"\t" . Xml::encodeJsCall( 'document.write', array( $scriptTag ) ) .
- "}";
+ "\n}";
}
return $out;
// ATTENTION!: Because of the line below, this is not going to cause
// infinite recursion - think carefully before making changes to this
// code!
- // Pre-populate modifiedTime with something because the the loop over
- // all modules below includes the the startup module (this module).
+ // Pre-populate modifiedTime with something because the loop over
+ // all modules below includes the startup module (this module).
$this->modifiedTime[$hash] = 1;
foreach ( $loader->getModuleNames() as $name ) {