X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.display_phones.php;h=39728ed96935afe95e90560b80ff1dd8d73f52f4;hb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;hp=4d80f95c1332d7be94ed0c413af3ca06c7071357;hpb=684195f33b11e3067200dd3a9e14304bd7d04463;p=platal.git diff --git a/plugins/function.display_phones.php b/plugins/function.display_phones.php index 4d80f95..39728ed 100644 --- a/plugins/function.display_phones.php +++ b/plugins/function.display_phones.php @@ -25,23 +25,11 @@ function smarty_function_display_phones($param, &$smarty) if (count($param['tels'])) { foreach ($param['tels'] as $tel) { $tel_type = ($param['dcd'] ? 'Dernier ' : ''); - switch ($tel['tel_type']) { - case 'fixed': - $tel_type .= 'Tél'; - break; - case 'fax': - $tel_type .= 'Fax'; - break; - case 'mobile': - $tel_type .= 'Mob'; - break; - default: - $tel_type .= $tel['tel_type']; - } - $txthtml .= "
\n" . $tel_type . " : \n" . $tel['tel'] . "\n"; + $tel_type .= $tel->displayType(true); + $txthtml .= "
\n" . $tel_type . " : \n" . $tel->display . "\n"; $comment = ""; - if ($tel['comment'] != "") { - $commentHtml = str_replace(array('&', '"'), array('&', '"'), $tel['comment']); + if ($tel->comment != "") { + $commentHtml = str_replace(array('&', '"'), array('&', '"'), $tel->comment); $commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml); $txthtml .= "