Code

Fixed folder add.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 09:56:16 +0000 (09:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 09:56:16 +0000 (09:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8813 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index fa4f90afc586e6a63152d6ac4eaeb8fa558e572f..9785878ded6851ea69914c2f4d74ba06f06da461 100644 (file)
@@ -623,6 +623,7 @@ class appgroup2 extends plugin
       $a_folder['UNIQID'] = uniqid();
       $a_folder['PARENT'] = $folder;      
       $a_folder['TYPE']   = "FOLDER";
+      $a_folder['ICON']   = "";
       $all[$folder]['ENTRIES'][] = $a_folder;
     }
   }
@@ -982,7 +983,13 @@ class appgroup2 extends plugin
           $attrs['objectClass'] = "gotoSubmenuEntry";
           $attrs['cn']          = $entry['NAME'];
           $attrs['gosaApplicationPriority'] = $prio;
-          $attrs['gosaApplicationIcon']     = $entry['ICON'];
+          if($entry['STATUS'] != "ADDED"){
+            $attrs['gosaApplicationIcon'] = array();
+          }
+          
+          if(!empty($entry['ICON'])){
+            $attrs['gosaApplicationIcon']     = $entry['ICON'];
+          }
         }
         break;
         case "RELEASE"  : 
@@ -1020,6 +1027,7 @@ class appgroup2 extends plugin
       $ldap->cat($dn);
       if($ldap->count()){
         $ldap->rmdir_recursive($dn);
+        show_ldap_error($ldap->get_error(), _("Could not save group application settings."));
       }
     }
     foreach($Actions['Add'] as $dn => $data){
@@ -1027,6 +1035,7 @@ class appgroup2 extends plugin
       $ldap->cat($dn);
       if(!$ldap->count()){
         $ldap->add($data);
+        show_ldap_error($ldap->get_error(), _("Could not save group application settings."));
       }
     }
     foreach($Actions['Edit'] as $dn => $data){
@@ -1034,8 +1043,10 @@ class appgroup2 extends plugin
       $ldap->cat($dn);
       if($ldap->count()){
         $ldap->modify($data);
+        show_ldap_error($ldap->get_error(), _("Could not save group application settings."));
       }
     }
+    $this->_load_menu_structure();
   }