Merge "Expose thumbnail file to extensions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 31 Mar 2014 17:13:30 +0000 (17:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 31 Mar 2014 17:13:30 +0000 (17:13 +0000)
includes/media/MediaTransformOutput.php

index 41b09e6..05feb30 100644 (file)
@@ -70,6 +70,13 @@ abstract class MediaTransformOutput {
                return $this->height;
        }
 
+       /**
+        * @return File file
+        */
+       public function getFile() {
+               return $this->file;
+       }
+
        /**
         * Get the final extension of the thumbnail.
         * Returns false for scripted transformations.
@@ -374,6 +381,7 @@ class ThumbnailImage extends MediaTransformOutput {
                        'alt' => $alt,
                        'src' => $this->url,
                );
+
                if ( empty( $options['no-dimensions'] ) ) {
                        $attribs['width'] = $this->width;
                        $attribs['height'] = $this->height;