X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fgallery%2FPackedImageGallery.php;h=963ee6b9c179de6fc334a1c3c288f41d6d87d4a8;hb=584775e59d553b3447f615422e1b929506470f97;hp=9149f8ceadd39dc357a82e1d7d0b070cbcb53031;hpb=75da5baa3f353a326edaf9ee4e0bbaed097f725a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/gallery/PackedImageGallery.php b/includes/gallery/PackedImageGallery.php index 9149f8cead..963ee6b9c1 100644 --- a/includes/gallery/PackedImageGallery.php +++ b/includes/gallery/PackedImageGallery.php @@ -22,6 +22,12 @@ class PackedImageGallery extends TraditionalImageGallery { + function __construct( $mode = 'traditional' ) { + parent::__construct( $mode ); + // Does not support per row option. + $this->mPerRow = 0; + } + /** * We artificially have 1.5 the resolution neccessary so that * we can scale it up by that much on the client side, without @@ -30,7 +36,7 @@ class PackedImageGallery extends TraditionalImageGallery { const SCALE_FACTOR = 1.5; protected function getVPad( $boxHeight, $thumbHeight ) { - return ( $this->getThumbPadding() + $boxHeight - $thumbHeight/ self::SCALE_FACTOR ) / 2; + return ( $this->getThumbPadding() + $boxHeight - $thumbHeight / self::SCALE_FACTOR ) / 2; } protected function getThumbPadding() { @@ -88,4 +94,12 @@ class PackedImageGallery extends TraditionalImageGallery { protected function getModules() { return array( 'mediawiki.page.gallery' ); } + + /** + * Do not support per-row on packed. It really doesn't work + * since the images have varying widths. + */ + public function setPerRow( $num ) { + return; + } }