Code

Udpated regex quote
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Nov 2008 15:05:46 +0000 (15:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Nov 2008 15:05:46 +0000 (15:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12898 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_departmentGeneric.inc

index 4be01cddebe02cf5eb6f97a5aa7a9a312a647b00..b7d98153095ecf137c496e768ad80d82ae59a3e9 100644 (file)
@@ -159,9 +159,8 @@ class department extends plugin
                }else{
                        $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("/".$fixed."/",$dn)){
+        if(!preg_match("/".preg_quote($this->dn)."/",$dn)){
                                        $tmp[$dn]=$base;
                                }
                        }