X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/dc11c6a1d9dc79fdbf738720c99bb2d503a48c1a..93e324618014f9fa9279e141d39a7f44b091de9e:/pear_lib_tmp/HTML/Image.php?ds=sidebyside diff --git a/pear_lib_tmp/HTML/Image.php b/pear_lib_tmp/HTML/Image.php index 5c9df5b..628b952 100644 --- a/pear_lib_tmp/HTML/Image.php +++ b/pear_lib_tmp/HTML/Image.php @@ -53,10 +53,14 @@ class HTML_Image extends HTML_Common { * @return void * @access public */ - function HTML_Image($src = '', $alt = '', $attrs = array())// ~X2C + function HTML_Image($src = '', $alt = '', $attrs = array('border' => 0))// ~X2C { - $attrs['src'] = $src; - $attrs['alt'] = $alt; + if (is_array($attrs)) { + $attrs['src'] = $src; + $attrs['alt'] = $alt; + } else { + $attrs .= " src=$src alt=$alt"; + } parent::HTML_Common($attrs); } // -X2C @@ -102,7 +106,7 @@ class HTML_Image extends HTML_Common { */ function setSrc($src)// ~X2C { - $this->updateAttributes('src' => $src); + $this->updateAttributes(array('src' => $src)); } // -X2C @@ -130,7 +134,7 @@ class HTML_Image extends HTML_Common { */ function setAlt($alt)// ~X2C { - $this->updateAttributes('alt' => $alt); + $this->updateAttributes(array('alt' => $alt)); } // -X2C