Code

Fix to be able to work with single objectType declarations
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Aug 2009 13:43:24 +0000 (13:43 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Aug 2009 13:43:24 +0000 (13:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14105 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_listing.inc

index 838377921b1509b6079aa7dd11a3734df44e0a9c..e0ca916ef09189fa7e64a337fc6435643e90a057 100644 (file)
@@ -140,6 +140,9 @@ class listing {
     }
     $this->categories= array();
     if (isset($this->xmlData['definition']['objectType'])) {
+      if(isset($this->xmlData['definition']['objectType']['label'])) {
+        $this->xmlData['definition']['objectType']= array($this->xmlData['definition']['objectType']);
+      }
       foreach ($this->xmlData['definition']['objectType'] as $index => $otype) {
         $this->objectTypes[]= $this->xmlData['definition']['objectType'][$index];
         if (isset($this->xmlData['definition']['objectType'][$index]['category'])){