Update ImagePage to use HiDPI
authortholam <t.lam@lamsinfosystem.com>
Wed, 20 Nov 2013 02:48:58 +0000 (20:48 -0600)
committerTholam <t.lam@lamsinfosystem.com>
Wed, 20 Nov 2013 03:21:12 +0000 (03:21 +0000)
Changed processResponsiveImages method in Linker class from
protected to public so that it may be used in the ImagePage class.
called the method in the openShowImage method to generate the srcset.

Bug: 56969
Change-Id: I2494ce98ba1a32d5a963b53482929de9abb048fd

includes/ImagePage.php
includes/Linker.php

index d6b8a03..4ea1712 100644 (file)
@@ -415,6 +415,7 @@ class ImagePage extends Article {
                                $params['width'] = $width;
                                $params['height'] = $height;
                                $thumbnail = $this->displayImg->transform( $params );
+                               Linker::processResponsiveImages( $this->displayImg, $thumbnail, $params );
 
                                $anchorclose = Html::rawElement( 'div', array( 'class' => 'mw-filepage-resolutioninfo' ), $msgsmall );
 
index 4dcdfd5..895f0f2 100644 (file)
@@ -902,7 +902,7 @@ class Linker {
         * @param MediaOutput $thumb
         * @param array $hp image parameters
         */
-       protected static function processResponsiveImages( $file, $thumb, $hp ) {
+       public static function processResponsiveImages( $file, $thumb, $hp ) {
                global $wgResponsiveImages;
                if ( $wgResponsiveImages ) {
                        $hp15 = $hp;