[Fusionforge-commits] r11313 - trunk/src/www/include

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Tue Nov 2 12:00:25 CET 2010


Author: aljeux
Date: 2010-11-02 12:00:24 +0100 (Tue, 02 Nov 2010)
New Revision: 11313

Modified:
   trunk/src/www/include/html.php
Log:
html_abs_image(): allow width & height to be optional.

Modified: trunk/src/www/include/html.php
===================================================================
--- trunk/src/www/include/html.php	2010-11-02 11:00:14 UTC (rev 11312)
+++ trunk/src/www/include/html.php	2010-11-02 11:00:24 UTC (rev 11313)
@@ -108,9 +108,9 @@
 		$return .= ' alt=""';
 	}
 
-	// ## add image dimensions
-	$return .= " width=\"" . $width . "\"";
-	$return .= " height=\"" . $height . "\"";
+	// Add image dimensions (if given)
+	$return .= $width ?" width=\"" . $width . "\"": '';
+	$return .= $height? " height=\"" . $height . "\"": '';
 
 	$return .= (' />');
 	return $return;




More information about the Fusionforge-commits mailing list