From: hickert Date: Wed, 2 Jun 2010 15:34:17 +0000 (+0000) Subject: Updated termdns X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bad3fbf6a5f7fc7f6dd8e2f91395d009240931af;p=gosa.git Updated termdns -Updated auto completion feature form ip and mac addresses. It uses the gosa ng if available git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18843 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index ccfe12465..7acfd33fb 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -302,15 +302,25 @@ class termDNS extends plugin /* Check for autonet button */ if (isset($_POST['autonet']) && ($this->acl_is_writeable("ipHostNumber") || $this->acl_is_writeable("macAddress"))){ - $d= new gosaSupportDaemon(TRUE, 0.5); - $res= $d->_send("
gosa_network_completition
". - "GOSAGOSA".$this->cn."
", TRUE); - if (isset($res['XML']['IP']) && $this->acl_is_writeable("ipHostNumber")){ - $this->ipHostNumber= $res['XML']['IP']; - } - if (isset($res['XML']['MAC']) && $this->acl_is_writeable("macAddress")){ - $this->macAddress= $res['XML']['MAC']; - } + + if ($this->config->get_cfg_value("core","gosaRpcServer") != ""){ + $rpc = $this->config->getRpcHandle(); + $res = $rpc->networkCompletion($this->cn); + if(isset($res['ip']) && tests::is_ip($res['ip'])) $this->ipHostNumber= $res['ip']; + if(isset($res['mac']) && tests::is_mac($res['mac'])) $this->macAddress= $res['mac']; + + }elseif ($config->get_cfg_value("core","gosaSupportURI") != ""){ + + $d= new gosaSupportDaemon(TRUE, 0.5); + $res= $d->_send("
gosa_network_completition
". + "GOSAGOSA".$this->cn."
", TRUE); + if (isset($res['XML']['IP']) && $this->acl_is_writeable("ipHostNumber")){ + $this->ipHostNumber= $res['XML']['IP']; + } + if (isset($res['XML']['MAC']) && $this->acl_is_writeable("macAddress")){ + $this->macAddress= $res['XML']['MAC']; + } + } }