From 4c85d24fe6c3a0508a10518b21d764cf21d12234 Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 31 May 2005 11:27:28 +0000 Subject: [PATCH] Added check for required attribute ipHostNumber. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@538 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_componentGeneric.inc | 7 +++++-- plugins/admin/systems/class_phoneGeneric.inc | 9 ++++++--- plugins/admin/systems/class_winGeneric.inc | 7 +++++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc index d6bbee442..5b84ae350 100644 --- a/plugins/admin/systems/class_componentGeneric.inc +++ b/plugins/admin/systems/class_componentGeneric.inc @@ -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); diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc index ae378919b..acd089172 100644 --- a/plugins/admin/systems/class_phoneGeneric.inc +++ b/plugins/admin/systems/class_phoneGeneric.inc @@ -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(); diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc index cc0852f4f..acf518e8c 100644 --- a/plugins/admin/systems/class_winGeneric.inc +++ b/plugins/admin/systems/class_winGeneric.inc @@ -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(); -- 2.30.2