protected function getGroupName() {
return 'media';
}
+
+ /**
+ * Should we rotate images in the preview on Special:Upload.
+ *
+ * This controls js: mw.config.get( 'wgFileCanRotate' )
+ *
+ * @todo What about non-BitmapHandler handled files?
+ */
+ public static function rotationEnabled() {
+ $bitmapHandler = new BitmapHandler();
+ return $bitmapHandler->autoRotateEnabled();
+ }
}
/**
$this->getContext()->getLanguage()->formatSize( $this->mMaxUploadSize['url'] )
)->parse() .
$this->msg( 'word-separator' )->escaped() .
- $this->msg( 'upload_source_url' )->escaped(),
+ $this->msg( 'upload_source_url' )->parse(),
'checked' => $selectedSourceType == 'url',
);
}
'wgStrictFileExtensions' => $config->get( 'StrictFileExtensions' ),
'wgCapitalizeUploads' => MWNamespace::isCapitalized( NS_FILE ),
'wgMaxUploadSize' => $this->mMaxUploadSize,
+ 'wgFileCanRotate' => SpecialUpload::rotationEnabled(),
);
$out = $this->getOutput();