From e4f8294a72aaa100ce016cea60bd4d6e5f8327d1 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 25 Feb 2008 07:38:27 +0000 Subject: [PATCH] Updated remove_objectClass. -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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index 70ab363ac..1365bc7ec 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -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; -- 2.30.2