From: Fomafix Date: Thu, 18 Sep 2014 21:00:52 +0000 (+0000) Subject: Set mw.config wgFileCanRotate only on Special:Upload instead of X-Git-Tag: 1.31.0-rc.0~13914 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=900b772ed89492be9833a4c7f6570c0dea49cfb4;p=lhc%2Fweb%2Fwiklou.git Set mw.config wgFileCanRotate only on Special:Upload instead of site-wide UploadWizard also uses wgFileCanRotate and set the variable by I3c50b56e6a11742cfc1c02d3d8dbeb0c151b0e91 itself. Change-Id: Iff6a952c8f4f21c0e27bd6b4191f3b0b453eec03 --- diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index 3f91520327..c935ffeb39 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -26,6 +26,7 @@ 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. == Compatibility == diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 78fe8e0186..2f3d3f8975 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -92,9 +92,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { 'wgSiteName' => $conf->get( 'Sitename' ), 'wgFileExtensions' => array_values( array_unique( $conf->get( 'FileExtensions' ) ) ), 'wgDBname' => $conf->get( 'DBname' ), - // This sucks, it is only needed on Special:Upload, but I could - // not find a way to add vars only for a certain module - 'wgFileCanRotate' => SpecialUpload::rotationEnabled(), 'wgAvailableSkins' => Skin::getSkinNames(), 'wgExtensionAssetsPath' => $conf->get( 'ExtensionAssetsPath' ), // MediaWiki sets cookies to have this prefix by default diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 55d09dd6d0..51dd7bd10b 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -1142,6 +1142,7 @@ class UploadForm extends HTMLForm { 'wgStrictFileExtensions' => $config->get( 'StrictFileExtensions' ), 'wgCapitalizeUploads' => MWNamespace::isCapitalized( NS_FILE ), 'wgMaxUploadSize' => $this->mMaxUploadSize, + 'wgFileCanRotate' => SpecialUpload::rotationEnabled(), ); $out = $this->getOutput();