Code

Fixed image path
[gosa.git] / plugins / admin / systems / class_phoneGeneric.inc
index daf86244adc9d3ab3130b99ca5d3c112202422cd..13fa101e9c681bb199396f27ecff570115becbf0 100644 (file)
@@ -21,7 +21,7 @@ class phoneGeneric extends plugin
   var $goFonType        = "";
   var $goFonDmtfMode    = "";
   var $goFonHost        = "";
-  var $goFonDefaultIP   = "";
+  var $goFonDefaultIP   = "dynamic";
   var $goFonQualify     = "";
   var $goFonAuth        = "";
   var $goFonSecret      = "";
@@ -98,6 +98,7 @@ class phoneGeneric extends plugin
   {
        /* Call parent execute */
        plugin::execute();
+
     /* Do we represent a valid phone? */
     if (!$this->is_account && $this->parent == NULL){
       $display= "<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
@@ -283,6 +284,11 @@ class phoneGeneric extends plugin
     if (!preg_match("/^$num\\.$num\\.$num\\.$num$/", $this->ipHostNumber)){
        $message[]= _("Wrong IP format in field IP-address.");
     }
+    
+    $tr = count(split(":",$this->macAddress));
+    if($tr!=6){
+      $message[]=(_("The given macaddress is invalid. There must be 6 2byte segments seperated by ':'."));
+    }
 
     $ui= get_userinfo();
     $acl= get_permissions ($this->dn, $ui->subtreeACL);