From f700f63494aeb718e722169e3518752a11a610eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Fri, 3 Aug 2012 14:30:11 +0200 Subject: [PATCH] Little refactor + cpd --- htdocs/core/lib/functions.lib.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f58b1e0db19..4dc8665907f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2048,22 +2048,25 @@ function img_mime($file, $alt = '') } -/** +/** * Show phone logo. * Use img_picto instead. - * - * @param string $alt Text to show on alt image - * @param int $option Option + * + * @param string $alt Text to show on alt image + * @param int $option Option * @return string Return img tag - * @deprecated - */ -function img_phone($alt = "default",$option=0) -{ - global $conf,$langs; - if ($alt=="default") $alt=$langs->trans("Call"); - $img='call_out'; - if ($option == 1) $img='call'; - return ''.dol_escape_htmltag($alt).''; + * @deprecated + */ +function img_phone($alt = 'default', $option = 0) +{ + global $conf,$langs; + + if ($alt == 'default') $alt = $langs->trans('Call'); + + if ($option == 1) $img = 'call'; + else $img = 'call_out'; + + return img_picto($alt, $img); }