Set mw.config wgFileCanRotate only on Special:Upload instead of
authorFomafix <fomafix@googlemail.com>
Thu, 18 Sep 2014 21:00:52 +0000 (21:00 +0000)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 20 Sep 2014 19:53:58 +0000 (21:53 +0200)
site-wide

UploadWizard also uses wgFileCanRotate and set the variable by
I3c50b56e6a11742cfc1c02d3d8dbeb0c151b0e91 itself.

Change-Id: Iff6a952c8f4f21c0e27bd6b4191f3b0b453eec03

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

index 3f91520..c935ffe 100644 (file)
@@ -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 ==
 
index 78fe8e0..2f3d3f8 100644 (file)
@@ -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
index 55d09dd..51dd7bd 100644 (file)
@@ -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();