summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 28ae00a)
raw | patch | inline | side by side (parent: 28ae00a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Oct 2007 07:48:45 +0000 (07:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Oct 2007 07:48:45 +0000 (07:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7612 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_ArpNewDevice.inc | patch | blob | history | |
plugins/admin/systems/class_termDNS.inc | patch | blob | history | |
plugins/admin/systems/tabs_arpnewdevice.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_ArpNewDevice.inc b/plugins/admin/systems/class_ArpNewDevice.inc
index f2d7a754c3b637d907abf5051ae5a536ddc83dda..79009908e9f2a6320c08314d92cb47091178e92a 100644 (file)
{
plugin :: plugin($config,$dn);
$this->cn ="";
- $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
+ $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
$this->acl = "#all#";
$this->netConfigDNS->acl = $this->acl;
$this->netConfigDNS->force_dns();
index af07e450b4f42bc5d11126ab7d035f13be396dc9..97dbc5bc9e8dab1efa49c47ef6eb443cc343e0a4 100644 (file)
var $initially_was_account = false;
var $dnsEntry = array();
var $DNSenabled = false;
+ var $hide_dns_check_box = FALSE;
/* Terminal dns
*/
/* Assign all needed vars */
$smarty->assign("DNSAccount",$this->DNS_is_account);
+ $smarty->assign("hide_dns_check_box",$this->hide_dns_check_box);
+
$smarty->assign("Zones",$this->Zones);
$smarty->assign("ZoneCnt",count($this->Zones));
$smarty->assign("ZoneKeys",($this->Zones));
}
+ if($this->hide_dns_check_box){
+ $this->DNS_is_account = true;
+ }
}
}
}
}
+ if(count($this->dhcpHostEntry) == 0){
+ $this->dialog = new dhcpHost($this->dhcpParentNode,TRUE);
+ $this->dialog->cn = $this->cn;
+ $this->dialog->dhcpHWAddress = "ethernet ".$this->macAddress;
+ if(!empty($this->ipHostNumber)){
+ $this->dialog->statements['fixed-address'] = $this->ipHostNumber;
+ }
+ $this->dialog->execute();
+ $this->dialog->save_object();
+ $this->dhcpHostEntry = $this->dialog->save();
+ if(count($this->dhcpHostEntry['dhcpOption']) == 0){
+ $this->dhcpHostEntry['dhcpOption']= array("host-name ".$this->cn);
+ }
+ }
+
/* Write mac address to dhcp settings */
if($this->dhcp_is_Account){
if(!isset($this->dhcpHostEntry['dhcpHWAddress'][0]) ||
$tmp['plProvidedAcls']["zoneName"] = _("Zone name");
$tmp['plProvidedAcls']["dNSTTL"] = _("TTL");
}
+
+ /* Handle post event */
+ $tmp2 = new servdns($this->config,$this->dn);
+ $tmp2->handle_post_events("modify");
}
return($tmp);
}
}
return($ret);
}
+
+ function force_dns()
+ {
+ if($this->DNSenabled){
+ $this->DNS_is_account = TRUE;
+ $this->hide_dns_check_box = TRUE;
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/tabs_arpnewdevice.inc b/plugins/admin/systems/tabs_arpnewdevice.inc
index f5d7f68305ee81ff9725976fd48b3a95bdc1f5f1..fe12b4090b62747540af2a5d6cbabe093fc3b93c 100644 (file)
class ArpNewDeviceTabs extends tabs
{
- function save()
+ function save($ignore_account= FALSE)
{
- tabs::save(TRUE);
+ tabs::save($ignore_account);
}
function execute()