summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba0863f)
raw | patch | inline | side by side (parent: ba0863f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Jun 2010 15:34:17 +0000 (15:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Jun 2010 15:34:17 +0000 (15:34 +0000) |
-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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18843 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_termDNS.inc | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc
index ccfe124651fb1a60f2387f1d14ad920fb0ebd934..7acfd33fbc0bd103f38d3fd6991ecc8f511f2cf9 100644 (file)
/* 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("<xml><header>gosa_network_completition</header>".
- "<source>GOSA</source><target>GOSA</target><hostname>".$this->cn."</hostname></xml>", 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("<xml><header>gosa_network_completition</header>".
+ "<source>GOSA</source><target>GOSA</target><hostname>".$this->cn."</hostname></xml>", 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'];
+ }
+ }
}