From 7bfa689e5aca39d6c3931107e85ce6d0ff86963c Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Thu, 27 Sep 2007 12:39:29 +0000 Subject: [PATCH] extended PMA_getIcon() --- libraries/common.lib.php | 59 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index a67b5f264..288a2ea41 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -68,18 +68,65 @@ function PMA_pow($base, $exp, $use_function = false) * string PMA_getIcon(string $icon) * * @uses $GLOBALS['pmaThemeImage'] - * @param $icon name of icon + * @uses $GLOBALS['cfg']['PropertiesIconic'] + * @uses htmlspecialchars() + * @param string $icon name of icon file + * @param string $alternate alternate text + * @param boolean $container include in container + * @param boolean $$force_text whether to force alternate text to be displayed * @return html img tag */ -function PMA_getIcon($icon, $alternate = '') +function PMA_getIcon($icon, $alternate = '', $container = false, $force_text = false) { - if ($GLOBALS['cfg']['PropertiesIconic']) { - return '' . $alternate . ''; - } else { - return $alternate; } + + if ($include_icon && $include_text) { + $button .= ' '; + } + + if ($include_text) { + $button .= $alternate; + } + + if ($include_box) { + $button .= ''; + } + + return $button; } /**