From ebd92db2600d458e04d902f3afc9bd6a1daa9180 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 17 May 2011 12:10:05 +0000 Subject: [PATCH] Updated config mangement git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20847 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/Device/class_DeviceConfig.inc | 15 +++++++-------- .../systems/goto/Device/class_InstallRecipe.inc | 5 ++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc index 208b7fa8c..52decfb56 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc @@ -86,19 +86,20 @@ class DeviceConfig extends plugin if(!$rpc->success()){ $smarty = get_smarty(); $smarty->assign("error", TRUE); - $smarty->assign("errorMsg", msgPool::rpcError($this->rpcErrorMessage)); - return($display.$smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE))); + $smarty->assign("errorMsg", msgPool::rpcError($rpc->get_error())); + return($smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE))); } // Load assignable elements. $release = $this->parent->by_object['InstallRecipe']->installRelease; + $release = preg_replace("/^[^\/]+\//","", $release); $assignableElements = $rpc->listAssignableElements($release); if(!$rpc->success()){ $smarty = get_smarty(); $smarty->assign("error", TRUE); - $smarty->assign("errorMsg", msgPool::rpcError($this->rpcErrorMessage)); - return($display.$smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE))); + $smarty->assign("errorMsg", msgPool::rpcError($rpc->get_error())); + return($smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE))); }else{ // Initialization completed. @@ -271,8 +272,7 @@ class DeviceConfig extends plugin $rpc->systemSetConfigParameters($this->deviceUUID, array('method' => $installConfigManagement, 'var' => $save, 'item' => $this->usedElements)); if(!$rpc->success()){ - $this->rpcErrorMessage = $rpc->get_error(); - msg_dialog::display(_("Error"), msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG); + msg_dialog::display(_("Error"), msgPool::rpcError($rpc->get_error()), ERROR_DIALOG); return(NULL); } } @@ -286,8 +286,7 @@ class DeviceConfig extends plugin $rpc = $this->config->getRpcHandle(); $rpc->removeConfigParameters($this->deviceUUID); if(!$rpc->success()){ - $this->rpcErrorMessage = $rpc->get_error(); - msg_dialog::display(_("Error"), msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG); + msg_dialog::display(_("Error"), msgPool::rpcError($rpc->get_error()), ERROR_DIALOG); return(NULL); } } diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc index b5ccec7a2..d7694e6f6 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc @@ -155,7 +155,10 @@ class InstallRecipe extends plugin // Preset the config management method. if(!isset($this->installConfigManagementList[$this->installBootstrapMethod][$this->installConfigManagement])){ - $this->installConfigManagement = key($this->installConfigManagementList[$this->installBootstrapMethod]); + if(isset($this->installConfigManagementList[$this->installBootstrapMethod]) && + count($this->installConfigManagementList[$this->installBootstrapMethod])){ + $this->installConfigManagement = key($this->installConfigManagementList[$this->installBootstrapMethod]); + } } } -- 2.30.2