Code

Fixed loading of releases
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Apr 2011 10:44:22 +0000 (10:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Apr 2011 10:44:22 +0000 (10:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20748 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc

index 79b0d2e6c72caf4178246ceb6603d9e5aaa24057..ded80c4ce792b4dc5d3745558e5fdec93d399884 100644 (file)
@@ -165,15 +165,11 @@ class newConfigManagement extends plugin
                     // Append release tags
                     foreach($sort as $id){
                         $release = $dist['releases'][$id];
-                        $names = preg_split("/\//", $release['name']);
-    
-                        $rPath = "";
-                        $distPath = "/root/{$dist['name']}";
-                        foreach($names as $rName){
-                            $rPath .= '/'.$rName;
-                            $this->dataModel->addItem('Release',$distPath, $rName, $release);
-                            $distPath .= $rPath;
-                        }
+                        $rPath = $release['name'];
+                        $rPath = "/root/{$dist['name']}/$rPath";
+                        $rName = preg_replace("/^.*\//","", $rPath);
+                        $rPath = preg_replace("/\/[^\/]*$/","", $rPath);
+                        $this->dataModel->addItem('Release',$rPath, $rName, $release);
                     }
                 }
             }