From f3106cf81daaafc5a00aea4facc951f72e1e3df7 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 21 Sep 2007 05:56:05 +0000 Subject: [PATCH] Unified dhcp functions to match class_plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7361 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_dhcpPlugin.inc | 2 +- plugins/admin/systems/class_dhcpGroup.inc | 4 +++- plugins/admin/systems/class_dhcpHost.inc | 4 +++- plugins/admin/systems/class_dhcpPool.inc | 4 +++- plugins/admin/systems/class_dhcpSharedNetwork.inc | 4 +++- plugins/admin/systems/class_dhcpSubnet.inc | 4 +++- plugins/admin/systems/class_servDHCP.inc | 2 +- 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/include/class_dhcpPlugin.inc b/include/class_dhcpPlugin.inc index a28e3958a..628260522 100644 --- a/include/class_dhcpPlugin.inc +++ b/include/class_dhcpPlugin.inc @@ -120,7 +120,7 @@ class dhcpPlugin extends plugin /* Check values */ - function check($cache) + function check() { $message= array(); return $message; diff --git a/plugins/admin/systems/class_dhcpGroup.inc b/plugins/admin/systems/class_dhcpGroup.inc index e29ae0332..cbe987da8 100644 --- a/plugins/admin/systems/class_dhcpGroup.inc +++ b/plugins/admin/systems/class_dhcpGroup.inc @@ -79,10 +79,12 @@ class dhcpGroup extends dhcpPlugin /* Check values */ - function check($cache) + function check() { $message= array(); + $cache = $this->parent->dhcpObjectCache; + /* All required fields are set? */ if ($this->cn == ""){ $message[]= _("Required field 'Name' is not filled."); diff --git a/plugins/admin/systems/class_dhcpHost.inc b/plugins/admin/systems/class_dhcpHost.inc index 13d002428..55e1bee64 100644 --- a/plugins/admin/systems/class_dhcpHost.inc +++ b/plugins/admin/systems/class_dhcpHost.inc @@ -123,10 +123,12 @@ class dhcpHost extends dhcpPlugin /* Check values */ - function check($cache) + function check() { $message= array(); + $cache = $this->parent->dhcpObjectCache; + /* All required fields are set? */ if ($this->cn == ""){ $message[]= _("Required field 'Name' is not filled."); diff --git a/plugins/admin/systems/class_dhcpPool.inc b/plugins/admin/systems/class_dhcpPool.inc index 57330fe33..9e9821e8a 100644 --- a/plugins/admin/systems/class_dhcpPool.inc +++ b/plugins/admin/systems/class_dhcpPool.inc @@ -95,10 +95,12 @@ class dhcpPool extends dhcpPlugin /* Check values */ - function check($cache) + function check() { $message= array(); + $cache = $this->parent->dhcpObjectCache; + /* All required fields are set? */ if ($this->cn == ""){ $message[]= _("Required field 'Name' is not filled."); diff --git a/plugins/admin/systems/class_dhcpSharedNetwork.inc b/plugins/admin/systems/class_dhcpSharedNetwork.inc index ae4f0db62..6e55b75d6 100644 --- a/plugins/admin/systems/class_dhcpSharedNetwork.inc +++ b/plugins/admin/systems/class_dhcpSharedNetwork.inc @@ -134,10 +134,12 @@ class dhcpSharedNetwork extends dhcpPlugin /* Check values */ - function check($cache) + function check() { $message= array(); + $cache = $this->parent->dhcpObjectCache; + /* All required fields are set? */ if ($this->cn == ""){ $message[]= _("Required field 'Name' is not filled."); diff --git a/plugins/admin/systems/class_dhcpSubnet.inc b/plugins/admin/systems/class_dhcpSubnet.inc index 82fbad904..8c2da41de 100644 --- a/plugins/admin/systems/class_dhcpSubnet.inc +++ b/plugins/admin/systems/class_dhcpSubnet.inc @@ -125,10 +125,12 @@ class dhcpSubnet extends dhcpPlugin /* Check values */ - function check($cache) + function check() { $message= array(); + $cache = $this->parent->dhcpObjectCache; + /* All required fields are set? */ if ($this->cn == ""){ $message[]= _("Required field 'Network address' is not filled."); diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index 9e0fb0157..d631b1385 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -136,7 +136,7 @@ class servdhcp extends goService /* Save changes */ if (isset($_POST['save_dhcp'])){ $this->dialog->save_object(); - $messages= $this->dialog->check($this->dhcpObjectCache); + $messages= $this->dialog->check(); if (count($messages)){ show_errors($messages); } else { -- 2.30.2