X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fgallery%2FPackedImageGallery.php;h=821c85fb7169b2688fee56afa2d89a2454ecddea;hb=2f5d88819799f077f4d3a3288dad104141692f20;hp=207efa856ed5684f681da37a1271f83dc543a3c7;hpb=1aad5d4bf7c0bb72fc59de00a6c8998f37abde4b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/gallery/PackedImageGallery.php b/includes/gallery/PackedImageGallery.php index 207efa856e..7aa8c78893 100644 --- a/includes/gallery/PackedImageGallery.php +++ b/includes/gallery/PackedImageGallery.php @@ -21,14 +21,14 @@ */ class PackedImageGallery extends TraditionalImageGallery { - function __construct( $mode = 'traditional' ) { - parent::__construct( $mode ); + function __construct( $mode = 'traditional', IContextSource $context = null ) { + parent::__construct( $mode, $context ); // Does not support per row option. $this->mPerRow = 0; } /** - * We artificially have 1.5 the resolution neccessary so that + * We artificially have 1.5 the resolution necessary so that * we can scale it up by that much on the client side, without * worrying about requesting a new image. */ @@ -60,10 +60,10 @@ class PackedImageGallery extends TraditionalImageGallery { } // self::SCALE_FACTOR so the js has some room to manipulate sizes. - return array( + return [ 'width' => $width * self::SCALE_FACTOR, 'height' => $this->mHeights * self::SCALE_FACTOR, - ); + ]; } protected function getThumbDivWidth( $thumbWidth ) { @@ -95,9 +95,10 @@ class PackedImageGallery extends TraditionalImageGallery { /** * Add javascript which auto-justifies the rows by manipulating the image sizes. * Also ensures that the hover version of this degrades gracefully. + * @return array */ protected function getModules() { - return array( 'mediawiki.page.gallery' ); + return [ 'mediawiki.page.gallery' ]; } /** @@ -106,6 +107,5 @@ class PackedImageGallery extends TraditionalImageGallery { * @param int $num */ public function setPerRow( $num ) { - return; } }