Code

Small speed improvement
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Sep 2007 11:16:54 +0000 (11:16 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Sep 2007 11:16:54 +0000 (11:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7389 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_userinfo.inc

index 749d905f5b52a5f3ff409007539b08d64a2a4c8a..9b68abc5421fd6b61015946b61cf904162f6cd18 100644 (file)
@@ -370,9 +370,10 @@ class userinfo
 
   function mergeACL($acl, $type, $newACL)
   {
-    if(preg_match("/w/",$newACL) && !preg_match("/r/",$newACL)){
+    if (strpos($newACL, 'w') !== FALSE && strpos($newACL, 'r') === FALSE){
       $newACL .= "r";
     }
+
     foreach(str_split($newACL) as $char){
 
       /* Ignore invalid characters */