From 09b7cc182758e7d6dc99b06747d3eb96dece6440 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Mon, 22 Mar 2010 12:58:59 +0100 Subject: [PATCH] Fix smarty display_phones for new model MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- plugins/function.display_phones.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/function.display_phones.php b/plugins/function.display_phones.php index 4d80f95..8e4a493 100644 --- a/plugins/function.display_phones.php +++ b/plugins/function.display_phones.php @@ -25,23 +25,23 @@ 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': + switch ($tel->type) { + case Phone::TYPE_FIXED: $tel_type .= 'Tél'; break; - case 'fax': + case Phone::TYPE_FAX: $tel_type .= 'Fax'; break; - case 'mobile': + case Phone::TYPE_MOBILE: $tel_type .= 'Mob'; break; default: - $tel_type .= $tel['tel_type']; + $tel_type .= $tel->type; } - $txthtml .= "
\n" . $tel_type . " : \n" . $tel['tel'] . "\n"; + $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 .= "