Explorar el Código

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.

pdontthink hace 18 años
padre
commit
6f8024123d
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. 5 5
      templates/default/image.tpl

+ 5 - 5
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 . '"');
 }