Fixes class DE_WithSuboption and uses it for DE_EducationDegrees.
[platal.git] / plugins / function.display_phones.php
index 8e4a493..64284bc 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 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 . "&nbsp;: </em>\n<strong>" . $tel->display . "</strong>\n";
             $comment = "";
             if ($tel->comment != "") {