* (bug 2560) Don't show blank width/height attributes for missing size
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 28 Jun 2005 15:21:16 +0000 (15:21 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 28 Jun 2005 15:21:16 +0000 (15:21 +0000)
includes/Linker.php

index 7b4b611..3feed2d 100644 (file)
@@ -434,7 +434,9 @@ class Linker {
                } else {
                        $s = '<a href="'.$u.'" class="image" title="'.$alt.'">' .
                                 '<img src="'.$url.'" alt="'.$alt.'" ' .
-                                'width="'.$width.'" height="'.$height.'" ' .
+                                ( $width
+                                       ? ( 'width="'.$width.'" height="'.$height.'" ' )
+                                       : '' ) .
                                 'longdesc="'.$u.'" /></a>';
                }
                if ( '' != $align ) {