Code

Set goFonHardware defaultIP to dynamic, and added new mac address check, to avoid...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Dec 2005 08:42:03 +0000 (08:42 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Dec 2005 08:42:03 +0000 (08:42 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2244 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_phoneGeneric.inc

index 38839d7540a1db337b864e2290fab8f3befb5b47..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      = "";
@@ -284,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);