Set mw.config wgFileExtensions only on Upload instead of site-wide
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 19 Dec 2014 17:08:05 +0000 (18:08 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Fri, 19 Dec 2014 17:08:05 +0000 (18:08 +0100)
It is just used by mediawiki.special.upload

Change-Id: I433e29866fe184ba80c5dda35722e228e79f9307

RELEASE-NOTES-1.25
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/specials/SpecialUpload.php

index e8b1162..08a9c59 100644 (file)
@@ -222,7 +222,8 @@ changes to languages because of Bugzilla reports.
 * The skin autodiscovery mechanism, deprecated in MediaWiki 1.23, has been
   removed. See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for
   migration guide for creators and users of custom skins that relied on it.
-* Javascript variable 'wgFileCanRotate' now only available on Special:Upload.
+* Javascript variable 'wgFileCanRotate' and 'wgFileExtensions' now only
+  available on Special:Upload.
 * (T58257) Set site logo from mediawiki.skinning.interface module instead of
   inline styles in the HTML.
 * Removed ApiQueryUsers::getAutoGroups(). (deprecated since 1.20)
index c79554a..246d4b9 100644 (file)
@@ -90,7 +90,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        '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' ),
index ee89b0a..83336d2 100644 (file)
@@ -1140,6 +1140,7 @@ class UploadForm extends HTMLForm {
                                $this->mDestFile === '',
                        'wgUploadSourceIds' => $this->mSourceIds,
                        'wgStrictFileExtensions' => $config->get( 'StrictFileExtensions' ),
+                       'wgFileExtensions' => array_values( array_unique( $config->get( 'FileExtensions' ) ) ),
                        'wgCapitalizeUploads' => MWNamespace::isCapitalized( NS_FILE ),
                        'wgMaxUploadSize' => $this->mMaxUploadSize,
                        'wgFileCanRotate' => SpecialUpload::rotationEnabled(),