Code

Fixed Problem with item saving
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 May 2011 13:55:10 +0000 (13:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 May 2011 13:55:10 +0000 (13:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20838 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index deb9eee33e62234f522c52f42c2d8915bd105404..88dbd211f908f23e015add8907e9fb122c85720a 100644 (file)
@@ -878,11 +878,15 @@ class newConfigManagement extends plugin
 
             // Get paths 
             $release =  $this->getReleasePart($this->selectedContainer);
-            $newPath = $this->selectedContainer."/".$values['name'];
-            $newItemPath = $this->getItemPath($this->selectedContainer)."/".$values['name'];
+
             if($item){
                 $oldPath = $item['path'];
                 $oldItemPath = $this->getItemPath($item['path']);
+                $newPath = $item['parentPath']."/".$values['name'];
+                $newItemPath = $this->getItemPath($newPath);
+            }else{
+                $newPath = $this->selectedContainer."/".$values['name'];
+                $newItemPath = $this->getItemPath($this->selectedContainer)."/".$values['name'];
             }
 
             // If this is a new item, then create it now.