Code

Fixed printGeberic.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 3 Jan 2008 13:55:35 +0000 (13:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 3 Jan 2008 13:55:35 +0000 (13:55 +0000)
Base wasn't correctly extracted out of dn

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8195 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/systems/class_printGeneric.inc

index 1a527e96304d132b6162b8d444af20eed32fb08b..effcfc029bb928f1fe41a370151fbdd5f4882ac5 100644 (file)
@@ -99,10 +99,10 @@ class printgeneric extends plugin
     } else {
     
       /* Set base and check if the extracted base exists */
-      if(preg_match("/".normalizePreg('incomingou')."/",$this->dn)){
-        $this->base= preg_replace("/".normalizePreg('incomingou')."/","",dn2base($this->dn));
+      if(preg_match("/".normalizePreg(get_ou('incomingou'))."/",$this->dn)){
+        $this->base= preg_replace("/".normalizePreg(get_ou('incomingou'))."/","",dn2base($this->dn));
       }else{
-        $this->base= preg_replace("/".normalizePreg(get_ou('printerou')).",/","",dn2base($this->dn));
+        $this->base= preg_replace("/".normalizePreg(get_ou('printerou'))."/","",dn2base($this->dn));
       }
 
       if(!isset($this->config->idepartments[$this->base])){
@@ -825,7 +825,7 @@ class printgeneric extends plugin
     }
 
     /* Ensure to create a new object */
-    if(preg_match("/".normalizePreg('incomingou')."/",$this->orig_dn)){
+    if(preg_match("/".normalizePreg(get_ou('incomingou'))."/",$this->orig_dn)){
       $this->orig_dn = "new";
     }