Fix #5005: XHTML <gallery> output.
authorAntoine Musso <hashar@users.mediawiki.org>
Thu, 27 Apr 2006 21:17:39 +0000 (21:17 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Thu, 27 Apr 2006 21:17:39 +0000 (21:17 +0000)
Patch by: Jitse Niesen <j.niesen@latrobe.edu.au>

RELEASE-NOTES
includes/ImageGallery.php

index 9699b27..94c09a8 100644 (file)
@@ -129,6 +129,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Updated maintenance/transstat.php so it can show duplicate messages
 * Improvements to update scripts; print out the version, check for superuser credentials
   before attempting a connection, and produce a friendlier error if the connection fails
+* (bug 5005): Fix XHTML <gallery> output.
 
 == Compatibility ==
 
index 7ae916b..561cfb1 100644 (file)
@@ -100,8 +100,11 @@ class ImageGallery
 
                        // Not an image. Just print the name and skip.
                        if ( $nt->getNamespace() != NS_IMAGE ) {
-                               $s .= '<td><div class="gallerybox" style="height: 152px;">' .
-                                       htmlspecialchars( $nt->getText() ) . '</div></td>' .  (($i%4==3) ? "</tr>\n" : '');
+                               $s .=
+                                       (($i%4==0) ? "<tr>\n" : '') .
+                                       '<td><div class="gallerybox" style="height: 152px;">' .
+                                       htmlspecialchars( $nt->getText() ) . '</div></td>' .  
+                                       (($i%4==3) ? "</tr>\n" : '');
                                $i++;
 
                                continue;