From: Martín Marrese Date: Mon, 17 May 2004 16:29:30 +0000 (+0000) Subject: Agrego la posibilidad de utilizar mecon_html_icon con cualquier imagen. X-Git-Tag: svn_import~43 X-Git-Url: https://git.llucax.com/mecon/meconlib.git/commitdiff_plain/e16973f3e09a6f9624cc3f10a1f0a365763bb69f?hp=510e21f5f17ef1f6ab4a1976d7ee22c6d2a3dff3 Agrego la posibilidad de utilizar mecon_html_icon con cualquier imagen. --- diff --git a/lib/MECON/HTML/Icon.php b/lib/MECON/HTML/Icon.php index 26f20f6..2b5001d 100644 --- a/lib/MECON/HTML/Icon.php +++ b/lib/MECON/HTML/Icon.php @@ -79,9 +79,13 @@ class MECON_HTML_Icon extends MECON_HTML_Image { function MECON_HTML_Icon($nombre, $link = null, $alt = null, $attrs = array(), $align = 'right') { - switch ($nombre) { - default: - $src = "/MECON/images/general_$nombre"; + if (is_readable($nombre)) + { + $src = $nombre; + } + else + { + $src = "/MECON/images/general_$nombre"; } if (is_null($alt)) { $alt = '(' . strtoupper($nombre{0}) . ')';