Code

Fixed problem with empty lists
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 27 May 2005 17:10:53 +0000 (17:10 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 27 May 2005 17:10:53 +0000 (17:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@493 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/phoneaccount/class_phoneAccount.inc

index 0a99471a393a9ab6484ae5d1ada5bb74fa5bff11..4c6e0e3e95fce3cf1aa6e27f000133de6e17ffd5 100644 (file)
@@ -171,7 +171,11 @@ class phoneAccount extends plugin
 
     /* Fill arrays */
     $smarty->assign ("goFonHardware", $this->goFonHardware);
-    $smarty->assign ("phoneNumbers", $this->phoneNumbers);
+    if (!count($this->phoneNumbers)){
+      $smarty->assign ("phoneNumbers", array(""));
+    } else {
+      $smarty->assign ("phoneNumbers", $this->phoneNumbers);
+    }
     $hl= "<select size=\"1\" name=\"goFonHardware\" title=\"".
          _("Choose your private phone")."\" ".chkacl($this->acl, "goFonHardware").">\n";
     foreach ($this->hardware_list as $cn => $description){