From: hickert Date: Wed, 12 Dec 2007 12:18:02 +0000 (+0000) Subject: Create array of used attributes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=deebe2d8850080549877e08a4a47c62a96ab4923;p=gosa.git Create array of used attributes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8103 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_multi_plug.inc b/gosa-core/include/class_multi_plug.inc index b74f963dc..06a3ccd7a 100644 --- a/gosa-core/include/class_multi_plug.inc +++ b/gosa-core/include/class_multi_plug.inc @@ -138,14 +138,21 @@ class multi_plug if(!isset($handle->by_object[$first]->attrs[$key]) || !($attr === $handle->by_object[$first]->attrs[$key])){ unset($attrs[$key]); } - if(!is_numeric($key)){ - if(!isset($all[$key])){ + } + } + + foreach($handle->by_object[$first]->attrs as $key => $attr) { + if(!is_numeric($key)){ + if(!isset($all[$key])){ + if(is_array($attr)){ $all[$key] = $attr; - }elseif(isset($attr['count'])){ - for($i = 0; $i < $attr['count'] ; $i ++){ + } + }elseif(isset($attr['count'])){ + for($i = 0; $i < $attr['count'] ; $i ++){ + if(!in_array($attr[$i],$all[$key])){ $all[$key][] = $attr[$i]; + $all[$key]['count']++; } - $all[$key] = array_unique($all[$key]); } } }