From cccf70442af008a1c43cc3ac832a5023d41f8ac4 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 8 Apr 2008 13:58:59 +0000 Subject: [PATCH] Updated Network -Display multiple IPhostNumbers. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10283 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_termDNS.inc | 14 ++++++++++++-- gosa-plugins/systems/admin/systems/network.tpl | 5 +++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index a0925d884..f40e6d5d2 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -30,8 +30,9 @@ class termDNS extends plugin var $attributes = array("ipHostNumber","macAddress"); var $objectclasses = array("whatever"); - var $ipHostNumber = ""; // IP address - var $macAddress = ""; // Mac address + var $ipHostNumber = ""; // IP address + var $additionalHostNumbers = array(); + var $macAddress = ""; // Mac address var $orig_ipHostNumber = ""; // IP address var $orig_macAddress = ""; // Mac address @@ -83,6 +84,13 @@ class termDNS extends plugin $this->cn = preg_replace("/\\\$\$/","",$this->attrs['cn'][0]); } + + $this->additionalHostNumbers = array(); + if(isset($this->attrs['ipHostNumber']) && $this->attrs['ipHostNumber']['count'] > 1){ + for($i = 1 ; $i < $this->attrs['ipHostNumber']['count']; $i ++){ + $this->additionalHostNumbers[] = $this->attrs['ipHostNumber'][$i]; + } + } /************ * DHCP @@ -243,6 +251,7 @@ class termDNS extends plugin $display= ""; + $smarty->assign("additionalHostNumbers",$this->additionalHostNumbers); $smarty->assign("staticAddress", ""); /* Check for autonet button */ @@ -406,6 +415,7 @@ class termDNS extends plugin $display.= $smarty->fetch(get_template_path('network.tpl', TRUE)); } + return($display); } diff --git a/gosa-plugins/systems/admin/systems/network.tpl b/gosa-plugins/systems/admin/systems/network.tpl index d2461a825..6132c8a8f 100644 --- a/gosa-plugins/systems/admin/systems/network.tpl +++ b/gosa-plugins/systems/admin/systems/network.tpl @@ -11,6 +11,11 @@ {render acl=$ipHostNumberACL} {/render} + + {foreach from=$additionalHostNumbers item=item key=key} +
{$item} + {/foreach} + {render acl=$ipHostNumberACL} {if $DNS_is_account == true} -- 2.30.2