diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index f85f3a71cf9..491f12dfa14 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -188,7 +188,8 @@ abstract class ImageGalleryBase extends ContextSource { * * @param Array $options Attributes of gallery tag. */ - public function setAdditionalOptions( $options ) { } + public function setAdditionalOptions( $options ) { + } /** * Instruct the class to use a specific skin for rendering @@ -320,12 +321,10 @@ abstract class ImageGalleryBase extends ContextSource { ? $this->mParser->getTargetLanguage() : $this->getLanguage(); } - /* Old constants no longer used. const THUMB_PADDING = 30; const GB_PADDING = 5; const GB_BORDERS = 8; */ - } diff --git a/includes/gallery/NolinesImageGallery.php b/includes/gallery/NolinesImageGallery.php index 6b0d0fa63be..70f5bd93c0b 100644 --- a/includes/gallery/NolinesImageGallery.php +++ b/includes/gallery/NolinesImageGallery.php @@ -22,7 +22,6 @@ */ class NolinesImageGallery extends TraditionalImageGallery { - protected function getThumbPadding() { return 0; } diff --git a/includes/gallery/PackedImageGallery.php b/includes/gallery/PackedImageGallery.php index 963ee6b9c17..1cb1fd9575e 100644 --- a/includes/gallery/PackedImageGallery.php +++ b/includes/gallery/PackedImageGallery.php @@ -21,7 +21,6 @@ */ class PackedImageGallery extends TraditionalImageGallery { - function __construct( $mode = 'traditional' ) { parent::__construct( $mode ); // Does not support per row option. @@ -58,6 +57,7 @@ class PackedImageGallery extends TraditionalImageGallery { // factor, so use random big number. $width = $this->mHeights * 10 + 100; } + // self::SCALE_FACTOR so the js has some room to manipulate sizes. return array( 'width' => $width * self::SCALE_FACTOR, @@ -70,6 +70,7 @@ class PackedImageGallery extends TraditionalImageGallery { if ( $thumbWidth < 60 * self::SCALE_FACTOR ) { $thumbWidth = 60 * self::SCALE_FACTOR; } + return $thumbWidth / self::SCALE_FACTOR + $this->getThumbPadding(); } @@ -78,6 +79,7 @@ class PackedImageGallery extends TraditionalImageGallery { */ protected function getGBWidth( $thumb ) { $thumbWidth = $thumb ? $thumb->getWidth() : $this->mWidths * self::SCALE_FACTOR; + return $this->getThumbDivWidth( $thumbWidth ) + $this->getGBPadding(); } diff --git a/includes/gallery/PackedOverlayImageGallery.php b/includes/gallery/PackedOverlayImageGallery.php index bba06fcfe55..ec35db2f5c4 100644 --- a/includes/gallery/PackedOverlayImageGallery.php +++ b/includes/gallery/PackedOverlayImageGallery.php @@ -22,7 +22,6 @@ */ class PackedOverlayImageGallery extends PackedImageGallery { - /** * Add the wrapper html around the thumb's caption * @@ -45,9 +44,10 @@ class PackedOverlayImageGallery extends PackedImageGallery { $captionWidth = ceil( $thumbWidth - 20 ); $outerWrapper = '