From 7a19adb65c45ad3f771e130bcb199fbc7b4fbebd Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 6 Apr 2011 12:56:05 +0000 Subject: [PATCH] Updated modification of config items git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20658 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_newConfigManagement.inc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc index 06ddce55f..f0b75b544 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -444,13 +444,26 @@ class newConfigManagement extends plugin function saveItemChanges() { - $this->listing->clearDialogObject(); $item = $this->currentObject; + $this->listing->clearDialogObject(); $this->TemplateEngine->save_object(); + $values = array(); foreach($this->TemplateEngine->getWidgets() as $w){ - $item['values']['itemValues'][$w->getName()] = $w->getValue(); + $values[$w->getName()] = $w->getValue(); + } + $release = preg_replace("/^.*\//","",$item['values']['__release']); + $path = $item['values']['__path']; + $method = $this->cfgItemMap[$item['type']]; + + $rpc = $this->config->getRpcHandle(); + $res = $rpc->setConfigItem($release, $path, $item['type'], $values); + if(!$rpc->success()){ + msg_dialog::display(_("Error"), sprintf(_("Failed to load distributions: %s"), $rpc->get_error()),ERROR_DIALOG); + return(NULL); + }else{ + $item['values']['itemValues'] = $values; + $this->dataModel->setItemValues($item['path'], $item['values']); } - $this->dataModel->setItemValues($item['path'], $item['values']); } } ?> -- 2.30.2