From: Raphaël Barrois Date: Mon, 22 Mar 2010 11:58:59 +0000 (+0100) Subject: Fix smarty display_phones for new model X-Git-Tag: xorg/1.0.0~332^2~19 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=09b7cc182758e7d6dc99b06747d3eb96dece6440;p=platal.git Fix smarty display_phones for new model Signed-off-by: Raphaël Barrois --- 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 .= "