From bf62353d1f2606e903dc717391a6bf84c0dd4358 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 24 Jan 2006 08:21:51 +0000 Subject: [PATCH] Update git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2546 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 28 +++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index c68fd3bbe..ee8a25a89 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -168,6 +168,12 @@ class printgeneric extends plugin if(isset($this->parent->by_name['workgeneric'])){ // echo "workstation"; + if($this->parent->by_object['workgeneric']->cn == "wdefault"){ + $display= $this->show_header(_("Add printer extension"), + _("This is a workstation template, printer tab is disabled."),TRUE,TRUE); + $this->is_account= false; + return $display; + } }elseif(isset($this->parent->by_name['termgeneric'])){ if($this->parent->by_object['termgeneric']->cn == "default"){ $display= $this->show_header(_("Add printer extension"), @@ -454,6 +460,17 @@ class printgeneric extends plugin function check() { $message= array(); + + if(isset($this->parent->by_name['workgeneric'])){ + if($this->parent->by_object['workgeneric']->cn == "wdefault"){ + return $message; + } + }elseif(isset($this->parent->by_name['termgeneric'])){ + if($this->parent->by_object['termgeneric']->cn == "default"){ + return $message; + } + } + $this->dn= "cn=".$this->cn.",ou=printers,ou=systems,".$this->base; /* must: cn */ @@ -492,7 +509,16 @@ class printgeneric extends plugin if (!$this->is_account){ return; } - + if(isset($this->parent->by_name['workgeneric'])){ + if($this->parent->by_object['workgeneric']->cn == "wdefault"){ + return; + } + }elseif(isset($this->parent->by_name['termgeneric'])){ + if($this->parent->by_object['termgeneric']->cn == "default"){ + return; + } + } + if($this->PPDdialogToSave){ $this->PPDdialogToSave->save_ppd(); } -- 2.30.2