summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c2fb95d)
raw | patch | inline | side by side (parent: c2fb95d)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Aug 2007 12:37:40 +0000 (12:37 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Aug 2007 12:37:40 +0000 (12:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6987 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_dhcpNewSectionDialog.inc | patch | blob | history | |
plugins/admin/systems/class_servDHCP.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_dhcpNewSectionDialog.inc b/plugins/admin/systems/class_dhcpNewSectionDialog.inc
index 1b675e5d87e1863f60132c33ffa17cc15bafe6de..26188f5145a42d4461f05bb189b3b58040d50b22 100644 (file)
/* Mapping array */
var $types= array();
var $classtype= "";
- static $sectionMap= array( "dhcpService" => array("dhcpSharedNetwork", "dhcpSubnet", "dhcpGroup", "dhcpHost", "dhcpClass", "dhcpLeases"),
+ static $sectionMap= array( "dhcpService" => array("dhcpSharedNetwork", "dhcpSubnet", "dhcpGroup", "dhcpHost", "dhcpClass"),
"dhcpClass" => array("dhcpSubClass"),
"dhcpSubClass" => array(),
- "dhcpLeases" => array(),
"dhcpHost" => array(),
"dhcpGroup" => array("dhcpHost"),
- "dhcpPool" => array("dhcpLeases"),
- "dhcpSubnet" => array("dhcpPool", "dhcpGroup", "dhcpHost", "dhcpClass", "dhcpLeases"),
+ "dhcpPool" => array(),
+ "dhcpSubnet" => array("dhcpPool", "dhcpGroup", "dhcpHost", "dhcpClass"),
"dhcpSharedNetwork" => array("dhcpSubnet", "dhcpPool"));
function dhcpNewSectionDialog($type)
{
- $this->types= array( "dhcpLog" => _("Logging"),
- "dhcpService" => _("Global options"),
+ $this->types= array( "dhcpService" => _("Global options"),
"dhcpClass" => _("Class"),
"dhcpSubClass" => _("Subclass"),
- "dhcpLeases" => _("Lease"),
"dhcpHost" => _("Host"),
"dhcpGroup" => _("Group"),
"dhcpPool" => _("Pool"),
"dhcpSubnet" => _("Subnet"),
- "dhcpFailOverPeer" => _("Failover peer"),
"dhcpSharedNetwork" => _("Shared network"));
$this->classtype= $type;
foreach ($sections as $section){
$t_sections[$section]= $this->types[$section];
}
+ asort($t_sections);
$smarty->assign("sections", $t_sections);
$smarty->assign("dhcpSectionACL", chkacl($this->acl,"DHCP"));
$display.= $smarty->fetch(get_template_path('dhcpNewSection.tpl', TRUE));
index f4749767e77a0e04272883db875991ca9b27bada..30ebc6f7c193383265df868d8fbcf2031207405a 100644 (file)
$data= $this->dialog->save();
if ($this->current_object == ""){
/* New object */
+ $newsects= array();
+ foreach ($this->dhcpSections as $key => $dsc){
+ $newsects[$key]= $dsc;
+ if ($key == $dn){
+ $spaces.= " ";
+ $newsects[$data['dn']]= "$spaces$type '".preg_replace('/^[^=]+=([^,]+),.*$/', '\1', $data['dn'])."'";
+ }
+ }
$this->dhcpObjectCache[$data['dn']]= $data;
- $spaces.= " ";
- $this->dhcpSections[$data['dn']]= "$spaces$type '".preg_replace('/^[^=]+=([^,]+),.*$/', '\1', $data['dn'])."'";
+ $this->dhcpSections= $newsects;
} else {
if ($dn != $data['dn']){
/* Old object, new name */