From 107ef51f60b0bc13231ef2d83eee5a8e7ec27ef7 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 31 Jul 2006 06:14:11 +0000 Subject: [PATCH] Fixed local printer assignement. It had double mac address requestors. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4345 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 10 ++++++++-- plugins/admin/systems/printer.tpl | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 3c2e84c71..301a9d21b 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -508,7 +508,11 @@ class printgeneric extends plugin $smarty->assign("AdminMember" ,$this->AdminMember); $smarty->assign("AdminMembers" ,$adminlist); $smarty->assign("AdminMemberKeys",array_flip($adminlist)); - $smarty->assign("netconfig", $this->netConfigDNS->execute()); + if($this->BelongsTo == "Printer"){ + $smarty->assign("netconfig", $this->netConfigDNS->execute()); + } else { + $smarty->assign("netconfig", ""); + } return($display.$smarty->fetch (get_template_path('printer.tpl', TRUE))); } @@ -577,7 +581,9 @@ class printgeneric extends plugin { /* Call common method to give check the hook */ $message= plugin::check(); - $message= array_merge($message, $this->netConfigDNS->check()); + if ($this->BelongsTo == 'printer'){ + $message= array_merge($message, $this->netConfigDNS->check()); + } /* Don't display check messages if this is a template object */ if(isset($this->parent->by_object['workgeneric'])){ diff --git a/plugins/admin/systems/printer.tpl b/plugins/admin/systems/printer.tpl index 876ae22ba..49ed25737 100644 --- a/plugins/admin/systems/printer.tpl +++ b/plugins/admin/systems/printer.tpl @@ -99,9 +99,10 @@ - +{if $netconfig ne ''}

 

{$netconfig} +{/if}