From: hickert Date: Wed, 3 May 2006 10:42:15 +0000 (+0000) Subject: Added check if dn points to incoming X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=409cd9d073e46215406f6c68a41ca43da3d60372;p=gosa.git Added check if dn points to incoming git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3193 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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'];