From 74d0a67210b8be1145aaf90eca2172cf3debe09d Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 19 Apr 2011 10:44:22 +0000 Subject: [PATCH] Fixed loading of releases git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20748 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_newConfigManagement.inc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) 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); } } } -- 2.30.2