From: cajus Date: Thu, 27 Jul 2006 07:47:46 +0000 (+0000) Subject: Removed netConfig if not needed X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=65aefa2f6672be717c4a1062786e7fff9fd6683b;p=gosa.git Removed netConfig if not needed One problem still remaining git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4321 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index ca0dabf19..e60cd78f6 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'])){ @@ -736,9 +742,11 @@ class printgeneric extends plugin } show_ldap_error($ldap->get_error(), sprintf(_("Saving of system print/generic with dn '%s' failed."),$this->dn)); - $this->netConfigDNS->cn = $this->cn; - $this->netConfigDNS->dn = $this->dn; - $this->netConfigDNS->save($this->dn); + if($this->BelongsTo == "Printer"){ + $this->netConfigDNS->cn = $this->cn; + $this->netConfigDNS->dn = $this->dn; + $this->netConfigDNS->save($this->dn); + } /* Optionally execute a command after we're done */ $this->postcreate(); @@ -853,7 +861,7 @@ class printgeneric extends plugin print_red(sprintf(_("Can't add '%s' to list of members, it is not reachable."),$dn)); return(FALSE); } - return(TRUE); + return(TRUE); } } diff --git a/plugins/admin/systems/printer.tpl b/plugins/admin/systems/printer.tpl index 876ae22ba..9b20e9278 100644 --- a/plugins/admin/systems/printer.tpl +++ b/plugins/admin/systems/printer.tpl @@ -100,8 +100,10 @@ +{if $netconfig ne ''}

 

{$netconfig} +{/if}