Code

Updated remove_objectClass.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 25 Feb 2008 07:38:27 +0000 (07:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 25 Feb 2008 07:38:27 +0000 (07:38 +0000)
-ObjectClasses were not removed.

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@9089 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc

index 70ab363acedfc872f34830b1a1dd11b2ae7d51fc..1365bc7ecf3155eed624a69eb4a1b2e050696b5d 100644 (file)
@@ -2632,10 +2632,8 @@ function remove_objectClass($classes, &$attrs)
 
                $tmp= array();
                foreach ($attrs['objectClass'] as $oc) {
-                       foreach ($list as $class){
-                               if ($oc != $class){
-                                       $tmp[]= $oc;
-                               }
+      if(!in_array($oc, $list)){       
+                         $tmp[]= $oc;
                        }
                }
                $attrs['objectClass']= $tmp;