Code

Updated group / apps
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Feb 2008 13:59:50 +0000 (13:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Feb 2008 13:59:50 +0000 (13:59 +0000)
Skip adding objects to not existing programm tree

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

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

index 43232f7e8e94fad0f4ebc0e48195bde421b01eb1..1185c5a84d45aa12e73d836a4598c1be328aec8b 100644 (file)
@@ -184,18 +184,25 @@ class appgroup extends plugin
       $sub_dn       = preg_replace("/,".normalizePreg($this->dn)."$/","",$attrs['dn']);
       $sub_dn_array = split("\,",$sub_dn);
 
-
+      $found = true;
       for($i = (count($sub_dn_array)-1) ; $i >= 0 ; $i--){
         $name = preg_replace("/^[^=]*+=/","",$sub_dn_array[$i]);
+        
         if($i > 0){
+          $found =FALSE;
           foreach($cur as $key => $entry){
             if($entry['NAME'] == $name){
               $cur = &$cur[$key]['ENTRIES'];
               $parent_id = $entry['UNIQID'];
+              $found =true;
+              break;
             }
           }
         }else{
-
+          
+          if(!$found){
+            break;
+          }
           $priority = 1;
           if(isset($attrs['gosaApplicationPriority'])){
             $priority= $attrs['gosaApplicationPriority'][0];