Code

Fixed renaming of releases
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Apr 2011 08:05:19 +0000 (08:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Apr 2011 08:05:19 +0000 (08:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20770 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 5e2b8b8cb9a107f81cfdba01265d98dc3e11a038..4ab023fd52de8c6556a4a8e0274a485f53951808 100644 (file)
@@ -214,7 +214,9 @@ class newConfigManagement extends plugin
                         $rPath = "/root/{$dist['name']}/$rPath";
                         $rName = preg_replace("/^.*\//","", $rPath);
                         $rPath = preg_replace("/\/[^\/]*$/","", $rPath);
-                        $this->dataModel->addItem('Release',$rPath, $rName, $release);
+
+                        $values = array('name' => $rName);
+                        $this->dataModel->addItem('Release',$rPath, $rName, $values);
                     }
                 }
             }
@@ -803,8 +805,9 @@ class newConfigManagement extends plugin
                             msg_dialog::display(_("Error"), sprintf(_("Failed to save release: %s"), $rpc->get_error()),ERROR_DIALOG);
                             return(NULL);
                         }else{
-                            $this->dataModel->moveItem($item['path'], $item['parentPath'].'/'.$values['name']);
-                            $this->dataModel->setItemValues($item['path'], $values);
+                            $nP = $item['parentPath'].'/'.$values['name'];
+                            $this->dataModel->moveItem($item['path'], $nP);
+                            $this->dataModel->setItemValues($nP, $values);
                             $this->listing->clearDialogObject();
                         }
                     }