From: hickert Date: Tue, 18 Oct 2005 08:55:03 +0000 (+0000) Subject: For terminals and workstations in ou=incoming the printer tab was always enabled X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f9d1a09396aa2e09675b5d0edeca0a42ec75e0f3;p=gosa.git For terminals and workstations in ou=incoming the printer tab was always enabled git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1600 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 039be7bb6..e75ad359b 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -63,13 +63,26 @@ class printgeneric extends plugin * else it is a standalone printer */ if((isset($this->attrs['objectClass']))&&(in_array("gotoWorkstation",$this->attrs['objectClass']))){ - $this->is_terminal = "true"; - $this->dn = preg_replace("/ou=workstations,/","ou=printers,",$this->dn); - $this->type = "station"; + /* Fix for new Workstations */ + if(preg_match("/ou=incoming/",$this->dn)){ + $this->is_terminal = "true"; + $this->dn = preg_replace("/ou=incoming/","ou=printers",$this->dn); + $this->type = "station"; + }else{ + $this->is_terminal = "true"; + $this->dn = preg_replace("/ou=workstations/","ou=printers",$this->dn); + $this->type = "station"; + } }elseif((isset($this->attrs['objectClass']))&&(in_array("gotoTerminal",$this->attrs['objectClass']))){ - $this->type = "terminal"; - $this->is_terminal = "true"; - $this->dn = preg_replace("/ou=terminal/","ou=printer",$this->dn); + if(preg_match("/ou=incoming/",$this->dn)){ + $this->is_terminal = "true"; + $this->dn = preg_replace("/ou=incoming/","ou=printers",$this->dn); + $this->type = "terminal"; + }else{ + $this->type = "terminal"; + $this->is_terminal = "true"; + $this->dn = preg_replace("/ou=terminal/","ou=printers",$this->dn); + } }else{ /* Save dn for later references */ $this->orig_dn= $this->dn; @@ -92,7 +105,6 @@ class printgeneric extends plugin } } - /* Prepare different member types */ foreach(array("AddUser" =>"gotoUserPrinter",