From: hickert Date: Tue, 19 Apr 2011 10:44:22 +0000 (+0000) Subject: Fixed loading of releases X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=74d0a67210b8be1145aaf90eca2172cf3debe09d;p=gosa.git Fixed loading of releases git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20748 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc index 79b0d2e6c..ded80c4ce 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -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); } } }