From 4563a42e0d2616a9108b94fbb64ab6d1a1dbfc45 Mon Sep 17 00:00:00 2001 From: tholam Date: Tue, 19 Nov 2013 20:48:58 -0600 Subject: [PATCH] Update ImagePage to use HiDPI 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 | 1 + includes/Linker.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index d6b8a03c09..4ea1712f04 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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 ); diff --git a/includes/Linker.php b/includes/Linker.php index 4dcdfd5510..895f0f25a0 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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; -- 2.20.1