Code

updated listing class.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Nov 2009 09:36:20 +0000 (09:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Nov 2009 09:36:20 +0000 (09:36 +0000)
-Sub Actions in the menus required at least two entries to be displayed.

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

gosa-core/include/class_listing.inc

index 39342d9fec4992dd420c50375fbad54f150ac7db..10c05d9652012ebf1b6fcb3bc843858a37747f95 100644 (file)
@@ -1093,6 +1093,12 @@ class listing {
         if (isset($action['label'])){
           $result.= "<li$separator><a href='#'>$img"._($action['label'])."&nbsp;<img border='0' src='images/forward-arrow.png'></a>";
         }
+
+        // Ensure we've an array of actions, this enables sub menus with only one action.
+        if(isset($action['action']['type'])){
+          $action['action'] = array($action['action']);
+        }
+
         $result.= $this->recurseActions($action['action'])."</li>";
         $level--;
         $separator= "";