From: tholam Date: Wed, 20 Nov 2013 02:48:58 +0000 (-0600) Subject: Update ImagePage to use HiDPI X-Git-Tag: 1.31.0-rc.0~18016 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/cloturer.php?a=commitdiff_plain;h=4563a42e0d2616a9108b94fbb64ab6d1a1dbfc45;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;