Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / includes / media / MediaHandler.php
index aa7c62b..5dca24b 100644 (file)
@@ -255,7 +255,7 @@ abstract class MediaHandler {
         * Get a MediaTransformOutput object representing the transformed output. Does not
         * actually do the transform.
         *
-        * @param File $image The image object
+        * @param File $image
         * @param string $dstPath Filesystem destination path
         * @param string $dstUrl Destination URL to use in output HTML
         * @param array $params Arbitrary set of parameters validated by $this->validateParam()
@@ -269,7 +269,7 @@ abstract class MediaHandler {
         * Get a MediaTransformOutput object representing the transformed output. Does the
         * transform unless $flags contains self::TRANSFORM_LATER.
         *
-        * @param File $image The image object
+        * @param File $image
         * @param string $dstPath Filesystem destination path
         * @param string $dstUrl Destination URL to use in output HTML
         * @param array $params Arbitrary set of parameters validated by $this->validateParam()
@@ -288,7 +288,7 @@ abstract class MediaHandler {
         * @return array Thumbnail extension and MIME type
         */
        function getThumbType( $ext, $mime, $params = null ) {
-               $magic = MimeMagic::singleton();
+               $magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
                if ( !$ext || $magic->isMatchingExtension( $ext, $mime ) === false ) {
                        // The extension is not valid for this MIME type and we do
                        // recognize the MIME type
@@ -497,7 +497,7 @@ abstract class MediaHandler {
         *
         * This is used by the media handlers that use the FormatMetadata class
         *
-        * @param array $metadataArray Metadata array
+        * @param array $metadataArray
         * @param bool|IContextSource $context Context to use (optional)
         * @return array Array for use displaying metadata.
         */
@@ -921,6 +921,6 @@ abstract class MediaHandler {
         * @since 1.30
         */
        public function getContentHeaders( $metadata ) {
-               return [];
+               return [ 'X-Content-Dimensions' => '' ]; // T175689
        }
 }