Merge "Add method parameter type documentation"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderStartUpModule.php
index 5919cde..20f6e0b 100644 (file)
@@ -52,7 +52,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                 */
                $namespaceIds = $wgContLang->getNamespaceIds();
                $caseSensitiveNamespaces = array();
-               foreach( MWNamespace::getCanonicalNamespaces() as $index => $name ) {
+               foreach ( MWNamespace::getCanonicalNamespaces() as $index => $name ) {
                        $namespaceIds[$wgContLang->lc( $name )] = $index;
                        if ( !MWNamespace::isCapitalized( $index ) ) {
                                $caseSensitiveNamespaces[] = $index;
@@ -84,7 +84,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        'wgFormattedNamespaces' => $wgContLang->getFormattedNamespaces(),
                        'wgNamespaceIds' => $namespaceIds,
                        'wgSiteName' => $wgSitename,
-                       'wgFileExtensions' => array_values( $wgFileExtensions ),
+                       'wgFileExtensions' => array_values( array_unique( $wgFileExtensions ) ),
                        'wgDBname' => $wgDBname,
                        // This sucks, it is only needed on Special:Upload, but I could
                        // not find a way to add vars only for a certain module
@@ -95,6 +95,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        'wgCookiePrefix' => $wgCookiePrefix,
                        'wgResourceLoaderMaxQueryLength' => $wgResourceLoaderMaxQueryLength,
                        'wgCaseSensitiveNamespaces' => $caseSensitiveNamespaces,
+                       'wgLegalTitleChars' => Title::convertByteClassToUnicodeClass( Title::legalChars() ),
                );
 
                wfRunHooks( 'ResourceLoaderGetConfigVars', array( &$vars ) );