From 848490240866d4244b069c2d2573f2a04fdab320 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 18 May 2007 06:42:36 +0000 Subject: [PATCH] Values that test as "empty" should actually be displayed in some cases. For now, using === intentionally, as isset() is always true due to how the values are passed around, so we have to actually test the contents of the values. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12409 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- templates/default/image.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/default/image.tpl b/templates/default/image.tpl index 5f3c0b26..6b8ef71e 100644 --- a/templates/default/image.tpl +++ b/templates/default/image.tpl @@ -55,12 +55,12 @@ if (!empty($id)) echo ' id="' . $id . '"'; if (!empty($alt)) echo ' alt="' . $alt . '"'; if (!empty($title)) echo ' title="' . $title . '"'; if (!empty($onclick)) echo ' onclick="' . $onclick . '"'; -if (!empty($width)) echo ' width="' . $width . '"'; -if (!empty($height)) echo ' height="' . $height . '"'; +if (!empty($width) || $width === '0') echo ' width="' . $width . '"'; +if (!empty($height) || $height === '0') echo ' height="' . $height . '"'; if (!empty($align)) echo ' align="' . $align . '"'; -if (!empty($border)) echo ' border="' . $border . '"'; -if (!empty($hspace)) echo ' hspace="' . $hspace . '"'; -if (!empty($vspace)) echo ' vspace="' . $vspace . '"'; +if (!empty($border) || $border === '0') echo ' border="' . $border . '"'; +if (!empty($hspace) || $hspace === '0') echo ' hspace="' . $hspace . '"'; +if (!empty($vspace) || $vspace === '0') echo ' vspace="' . $vspace . '"'; foreach ($aAttribs as $key => $value) { echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"'); } -- 2.25.1