Merge "Add parserTests for language converter markup."
[lhc/web/wiklou.git] / includes / gallery / PackedImageGallery.php
index 9149f8c..963ee6b 100644 (file)
 
 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;
+       }
 }