<?php
/***************************************************************************
- * Copyright (C) 2003-2010 Polytechnique.org *
+ * Copyright (C) 2003-2014 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-function smarty_function_display_phones($param, &$smarty)
+function smarty_function_display_phones($param, $smarty)
{
$txthtml = "";
if (count($param['tels'])) {
foreach ($param['tels'] as $tel) {
$tel_type = ($param['dcd'] ? 'Dernier ' : '');
- switch ($tel->type) {
- case Phone::TYPE_FIXED:
- $tel_type .= 'Tél';
- break;
- case Phone::TYPE_FAX:
- $tel_type .= 'Fax';
- break;
- case Phone::TYPE_MOBILE:
- $tel_type .= 'Mob';
- break;
- default:
- $tel_type .= $tel->type;
- }
+ $tel_type .= $tel->displayType(true);
$txthtml .= "<div>\n<em>" . $tel_type . " : </em>\n<strong>" . $tel->display . "</strong>\n";
$comment = "";
if ($tel->comment != "") {
return $txthtml;
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>