From: hickert Date: Thu, 1 Sep 2005 11:50:36 +0000 (+0000) Subject: dded check to avoid / in department names X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7b1b9b088ff5cc4b3aa81d404ca39eafee4f79e2;p=gosa.git dded check to avoid / in department names git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1285 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index 3b50131db..b1fd4b313 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -74,9 +74,9 @@ class department extends plugin $bases = $this->config->idepartments; $tmp = array(); foreach($bases as $dn=>$base){ - + $fixed = str_replace("/","\\",$this->dn); /* Only attach departments which are not a subtree of this one */ - if(!preg_match("/".$this->dn."/",$dn)){ + if(!preg_match("/".$fixed."/",$dn)){ $tmp[$dn]=$base; } } @@ -162,7 +162,7 @@ class department extends plugin $message[]= _("The field 'Name' contains the reserved word 'incoming'.". " Please choose another name."); } - if (preg_match ('/[,#+:=>\\\\]/', $this->ou)){ + if (preg_match ('/[,#+:=>\\\\\/]/', $this->ou)){ $message[]= _("The field 'Name' contains invalid characters."); } if (!is_phone_nr($this->telephoneNumber)){