From 7dabc84e7a1a44e78d9428743ebb9300ef8ac4bd Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 19 Dec 2014 18:08:05 +0100 Subject: [PATCH] Set mw.config wgFileExtensions only on Upload instead of site-wide It is just used by mediawiki.special.upload Change-Id: I433e29866fe184ba80c5dda35722e228e79f9307 --- RELEASE-NOTES-1.25 | 3 ++- includes/resourceloader/ResourceLoaderStartUpModule.php | 1 - includes/specials/SpecialUpload.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index e8b1162c84..08a9c59a7b 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -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) diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index c79554a618..246d4b958d 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -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' ), diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index ee89b0a397..83336d2cc4 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -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(), -- 2.20.1