Code

Fixed undefined index.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 10:06:49 +0000 (10:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 10:06:49 +0000 (10:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8815 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/groups/apps/class_groupApplication2.inc

index 9785878ded6851ea69914c2f4d74ba06f06da461..ef06191017111a5e872e3ba4701a1627a642c654 100644 (file)
@@ -186,6 +186,7 @@ class appgroup2 extends plugin
 
           }elseif(in_array("gotoMenuEntry",$attrs['objectClass'])){
             $type = "ENTRY";
+            $data['INFO'] = "";
             $data['PARAMETER'] = array();
             if(isset($attrs['gosaApplicationParameter'])){
               for($p = 0 ; $p < $attrs['gosaApplicationParameter']['count'] ; $p ++){
@@ -703,6 +704,12 @@ class appgroup2 extends plugin
       $new['NAME']  = $this->apps[$app_id]['cn'][0];
       $new['UNIQID']= uniqid(); 
       $new['PARENT']= $folder_id;
+      $new['PARAMETER']= array();
+      if(isset($this->apps[$app_id]['description'][0])){
+        $new['INFO']  = $this->apps[$app_id]['description'][0];
+      }else{
+        $new['INFO']  = "";
+      }
       $new['STATUS']= "ADDED";
       $all[$folder_id]['ENTRIES'][] = $new;
     }
@@ -972,10 +979,14 @@ class appgroup2 extends plugin
           $attrs['cn']          = $entry['NAME'];
           $attrs['gosaApplicationPriority'] = $prio;
           $attrs['gosaApplicationParameter'] = array(); 
-     
+          
+          
           foreach($entry['PARAMETER'] as $name => $value){
             $attrs['gosaApplicationParameter'][] = $name.":".$value; 
           }
+          if($entry['STATUS'] == "ADDED" && !count($attrs['gosaApplicationParameter'])){
+            unset($attrs['gosaApplicationParameter']);
+          } 
         }
         break;
         case "FOLDER"   :