From: Ryan Kaldari Date: Wed, 6 Jul 2011 18:07:31 +0000 (+0000) Subject: refixing bug 27338 with all parser test fixes, reverts r91557 X-Git-Tag: 1.31.0-rc.0~29034 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=86cd958dcfb6c0830cb29fb4d6ff81475568fce5;p=lhc%2Fweb%2Fwiklou.git refixing bug 27338 with all parser test fixes, reverts r91557 --- 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 -