From 86cd958dcfb6c0830cb29fb4d6ff81475568fce5 Mon Sep 17 00:00:00 2001 From: Ryan Kaldari Date: Wed, 6 Jul 2011 18:07:31 +0000 Subject: [PATCH] refixing bug 27338 with all parser test fixes, reverts r91557 --- includes/ImageGallery.php | 5 +---- skins/common/shared.css | 5 +++++ tests/parser/parserTests.txt | 32 ++++++++++++++++---------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index d3773007a6..5c2ed89fe3 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -281,10 +281,7 @@ class ImageGallery { $thumbhtml = "\n\t\t\t" . '
' . htmlspecialchars( $img->getLastError() ) . '
'; } else { - # We get layout problems with the margin, if the image is smaller - # than the line-height (17), so we add less margin in these cases. - $minThumbHeight = $thumb->height > 17 ? $thumb->height : 17; - $vpad = floor( ( self::THUMB_PADDING + $this->mHeights - $minThumbHeight ) /2 ); + $vpad = ( self::THUMB_PADDING + $this->mHeights - $thumb->height ) /2; $imageParameters = array( 'desc-link' => true, diff --git a/skins/common/shared.css b/skins/common/shared.css index 1c5ab444b5..77dad1e727 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -584,6 +584,11 @@ li.gallerybox div.thumb { margin: 2px; } +li.gallerybox div.thumb img { + display: block; + margin: 0 auto; +} + div.gallerytext { overflow: hidden; font-size: 94%; diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index b2b4980745..0527bb95aa 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -7410,7 +7410,7 @@ image4 |300px| centre !! test Gallery (with options) !! input - + File:Nonexistant.jpg|caption File:Nonexistant.jpg image:foobar.jpg|some '''caption''' [[Main Page]] @@ -7418,34 +7418,34 @@ image:foobar.jpg image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla. !! result -