Code

Added check if dn points to incoming
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 May 2006 10:42:15 +0000 (10:42 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 May 2006 10:42:15 +0000 (10:42 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3193 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index 9c594658d4ac0d4e65d1705c7c1580bed7d69c81..624177e58179e28460a473c93df98e1e12747e6f 100644 (file)
@@ -93,7 +93,12 @@ class printgeneric extends plugin
     } else {
     
       /* Set base and check if the extracted base exists */
-      $this->base= preg_replace("/ou=printers,ou=systems,/","",dn2base($this->dn));
+      if(preg_match("/ou=incoming,/",$this->dn)){
+        $this->base= preg_replace("/ou=incoming,/","",dn2base($this->dn));
+      }else{
+        $this->base= preg_replace("/ou=printers,ou=systems,/","",dn2base($this->dn));
+      }
+
       if(!isset($this->config->idepartments[$this->base])){
         print_red(_("Can't extract a valid base out of object dn, setting base to '%s'."),$_SESSION['CurrentMainBase']);
         $this->base = $_SESSION['CurrentMainBase'];