Code

Updated class listing.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 15 Feb 2010 09:15:37 +0000 (09:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 15 Feb 2010 09:15:37 +0000 (09:15 +0000)
-Merger objectTypes correclty. - Fixed problem with duplicate summary entries

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

gosa-core/include/class_listing.inc

index e66ff530847801ca0e05e62f6bbf5a9548465a8f..12e637a7d67a14bb218371a822c3f0e0ba6ff180 100644 (file)
@@ -164,7 +164,7 @@ class listing {
     // Fill objectTypes from departments and xml definition
     $types = departmentManagement::get_support_departments();
     foreach ($types as $class => $data) {
-      $this->objectTypes[]= array("label" => $data['TITLE'],
+      $this->objectTypes[$data['OC']]= array("label" => $data['TITLE'],
                                   "objectClass" => $data['OC'],
                                   "image" => $data['IMG']);
     }
@@ -174,12 +174,14 @@ class listing {
         $this->xmlData['definition']['objectType']= array($this->xmlData['definition']['objectType']);
       }
       foreach ($this->xmlData['definition']['objectType'] as $index => $otype) {
-        $this->objectTypes[]= $this->xmlData['definition']['objectType'][$index];
+        $tmp = $this->xmlData['definition']['objectType'][$index];
+        $this->objectTypes[$tmp['objectClass']]= $tmp;
         if (isset($this->xmlData['definition']['objectType'][$index]['category'])){
           $this->categories[]= $otype['category'];
         }
       }
     }
+    $this->objectTypes = array_values($this->objectTypes);
 
     // Parse layout per column
     $this->colprops= $this->parseLayout($this->xmlData['table']['layout']);