From 581654a2ebf643b7040fa3f62f5353977702bb2a Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 22 Jul 2008 13:16:41 +0000 Subject: [PATCH] Updated dhcp classes -The have now a parent class which represents the currently edited object. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11751 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/services/dhcp/class_dhcpGroup.inc | 11 +++++++---- .../admin/systems/services/dhcp/class_dhcpHost.inc | 13 ++++++++----- .../admin/systems/services/dhcp/class_dhcpPool.inc | 8 ++++++-- .../systems/services/dhcp/class_dhcpService.inc | 9 ++++++--- .../services/dhcp/class_dhcpSharedNetwork.inc | 13 ++++++++----- .../systems/services/dhcp/class_dhcpSubnet.inc | 13 +++++++++---- 6 files changed, 44 insertions(+), 23 deletions(-) diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpGroup.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpGroup.inc index 08d728efb..10978700b 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpGroup.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpGroup.inc @@ -54,10 +54,13 @@ class dhcpGroup extends dhcpPlugin $this->network->$type= $this->advanced->$type; } - /* Add footer */ - $display.= "
". - " 
"; - + /* Add footer */ + $display.= "
"; + if(preg_match("/w/",$this->parent->getacl(""))){ + $display.= " "; + } + $display.= ""; + $display.= "
"; return ($display); } diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpHost.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpHost.inc index 89b0c1d80..26fabb20f 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpHost.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpHost.inc @@ -27,9 +27,9 @@ class dhcpHost extends dhcpPlugin /* attribute list for save action */ var $objectclasses= array("top", "dhcpHost"); - function dhcpHost($attrs,$host_exists_in_gosa = FALSE) + function dhcpHost($parent,$attrs,$host_exists_in_gosa = FALSE) { - dhcpPlugin::dhcpPlugin($attrs); + dhcpPlugin::dhcpPlugin($parent,$attrs); /* Load attributes */ if (!$this->new){ @@ -82,9 +82,12 @@ class dhcpHost extends dhcpPlugin } /* Add footer */ - $display.= "
". - " 
"; - + $display.= "
"; +# if(preg_match("/w/",$this->parent->getacl(""))){ + $display.= " "; +# } + $display.= ""; + $display.= "
"; return ($display); } diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPool.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPool.inc index e2cff119b..63c039b14 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPool.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPool.inc @@ -70,8 +70,12 @@ class dhcpPool extends dhcpPlugin } /* Add footer */ - $display.= "
". - " 
"; + $display.= "
"; + if(preg_match("/w/",$this->parent->getacl(""))){ + $display.= " "; + } + $display.= ""; + $display.= "
"; return ($display); } diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpService.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpService.inc index 59c565884..fd42f2006 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpService.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpService.inc @@ -94,9 +94,12 @@ class dhcpService extends dhcpPlugin } /* Add footer */ - $display.= "
". - " 
"; - + $display.= "
"; + if(preg_match("/w/",$this->parent->getacl(""))){ + $display.= " "; + } + $display.= ""; + $display.= "
"; return ($display); diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSharedNetwork.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSharedNetwork.inc index e512cb663..93b0330d1 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSharedNetwork.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSharedNetwork.inc @@ -23,9 +23,9 @@ class dhcpSharedNetwork extends dhcpPlugin /* attribute list for save action */ var $objectclasses= array('top', 'dhcpSharedNetwork'); - function dhcpSharedNetwork($attrs) + function dhcpSharedNetwork($parent,$attrs) { - dhcpPlugin::dhcpPlugin($attrs); + dhcpPlugin::dhcpPlugin($parent,$attrs); $this->advanced->setAutoStatements(array("server-identifier", "default-lease-time", "max-lease-time", "min-lease-time", "authoritative", "deny-unknown-clients", @@ -88,9 +88,12 @@ class dhcpSharedNetwork extends dhcpPlugin } /* Add footer */ - $display.= "
". - " 
"; - + $display.= "
"; + if(preg_match("/w/",$this->parent->getacl(""))){ + $display.= " "; + } + $display.= ""; + $display.= "
"; return ($display); } diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSubnet.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSubnet.inc index fe10195cc..c0bf218d1 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSubnet.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSubnet.inc @@ -30,9 +30,9 @@ class dhcpSubnet extends dhcpPlugin /* attribute list for save action */ var $objectclasses= array('top', 'dhcpSubnet', 'dhcpOptions'); - function dhcpSubnet($attrs) + function dhcpSubnet($parent,$attrs) { - dhcpPlugin::dhcpPlugin($attrs); + dhcpPlugin::dhcpPlugin($parent,$attrs); if (!$this->new){ /* Load attributes */ @@ -89,8 +89,13 @@ class dhcpSubnet extends dhcpPlugin } /* Add footer */ - $display.= "
". - " 
"; + $display.= "
"; + if(preg_match("/w/",$this->parent->getacl(""))){ + $display.= " "; + } + $display.= ""; + $display.= "
"; + /* Show main page */ return $display; -- 2.30.2