From c9bb2fd3135e02fabcf861f6227453b3c50a11ea Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 9 Apr 2008 09:29:14 +0000 Subject: [PATCH] Updated printerGeneric -Store Mac and IP from parent object if this printer belongs to a ws or a terminal git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10295 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/systems/goto/class_printGeneric.inc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc index deb66ff97..a3d5bb282 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc @@ -718,10 +718,19 @@ class printgeneric extends plugin if($this->parent->by_object['workgeneric']->cn == "wdefault"){ return; } + + /* Adapt IP & mac from parent object */ + $this->netConfigDNS->ipHostNumber = $this->parent->by_object['workgeneric']->netConfigDNS->ipHostNumber; + $this->netConfigDNS->macAddress = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress; + }elseif(isset($this->parent->by_object['termgeneric'])){ if($this->parent->by_object['termgeneric']->cn == "default"){ return; } + + /* Adapt IP & mac from parent object */ + $this->netConfigDNS->ipHostNumber = $this->parent->by_object['termgeneric']->netConfigDNS->ipHostNumber; + $this->netConfigDNS->macAddress = $this->parent->by_object['termgeneric']->netConfigDNS->macAddress; } /* If type is still unknown, the initialisation of this printer failed, abort. */ @@ -858,11 +867,11 @@ class printgeneric extends plugin msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); } - if(preg_match("/printer/i",$this->BelongsTo)){ + #if(preg_match("/printer/i",$this->BelongsTo)){ $this->netConfigDNS->cn = $this->cn; $this->netConfigDNS->dn = $this->dn; $this->netConfigDNS->save(); - } + #} } function generateList(){ -- 2.30.2