Code

Added check for required attribute ipHostNumber.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 11:27:28 +0000 (11:27 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 11:27:28 +0000 (11:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@538 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_componentGeneric.inc
plugins/admin/systems/class_phoneGeneric.inc
plugins/admin/systems/class_winGeneric.inc

index d6bbee442bed1f7090898329881c11c6e790182f..5b84ae350da5f99ffc8a0e45e3ffef48a5f5af46 100644 (file)
@@ -102,13 +102,16 @@ class componentGeneric extends plugin
     $message= array();
     $this->dn= "cn=".$this->cn.",ou=netdevices,ou=systems,".$this->base;
 
-    /* must: cn, macAddress */
+    /* must: cn, macAddress, ipHostNumber */
     if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
       $message[]= "The required field 'Component name' is not set.";
     }
-    if ($this->macAddress == "" && chkacl ($this->acl, "macAddresscn") == ""){
+    if ($this->macAddress == "" && chkacl ($this->acl, "macAddress") == ""){
       $message[]= "The required field 'MAC-address' is not set.";
     }
+    if ($this->ipHostNumber == "" && chkacl ($this->acl, "ipHostNumber") == ""){
+      $message[]= "The required field 'IP-Address' is not set.";
+    }
 
     $ui= get_userinfo();
     $acl= get_permissions ($this->dn, $ui->subtreeACL);
index ae378919b311a5135e37ce5444ef9dd4e38acbdb..acd0891721fd2007c00486bcadff82e29b955ae5 100644 (file)
@@ -102,15 +102,18 @@ class phoneGeneric extends plugin
     $message= array();
     $this->dn= "cn=".$this->cn.",ou=phones,ou=systems,".$this->base;
 
-    /* must: cn, macAddress */
+    /* must: cn, macAddress, ipHostNumber */
     if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
       $message[]= "The required field 'Phone name' is not set.";
     }
     if ($this->cn == "0" && chkacl ($this->acl, "cn") == ""){
       $message[]= "The 'Phone name' '0' is reserved and cannot be used.";
     }
-    if ($this->macAddress == "" && chkacl ($this->acl, "macAddresscn") == ""){
-      $message[]= "The required field 'MAC-address' is not set.";
+    if ($this->macAddress == "" && chkacl ($this->acl, "macAddress") == ""){
+      $message[]= "The required field 'MAC-Address' is not set.";
+    }
+    if ($this->ipHostNumber == "" && chkacl ($this->acl, "ipHostNumber") == ""){
+      $message[]= "The required field 'IP-Address' is not set.";
     }
 
     $ui= get_userinfo();
index cc0852f4f0326dd913540efdad91a3b0c92ccdbb..acf518e8c7f3eda0230e5609f106440b2c0fff36 100644 (file)
@@ -133,8 +133,11 @@ class wingeneric extends plugin
     if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
       $message[]= "The required field 'Component name' is not set.";
     }
-    if ($this->macAddress == "" && chkacl ($this->acl, "macAddresscn") == ""){
-      $message[]= "The required field 'MAC-address' is not set.";
+    if ($this->macAddress == "" && chkacl ($this->acl, "macAddress") == ""){
+      $message[]= "The required field 'MAC-Address' is not set.";
+    }
+    if ($this->ipHostNumber == "" && chkacl ($this->acl, "ipHostNumber") == ""){
+      $message[]= "The required field 'IP-Address' is not set.";
     }
 
     $ui= get_userinfo();