From 409cd9d073e46215406f6c68a41ca43da3d60372 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 3 May 2006 10:42:15 +0000 Subject: [PATCH] Added check if dn points to incoming git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3193 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 9c594658d..624177e58 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -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']; -- 2.30.2