From: hickert Date: Tue, 17 May 2011 12:11:57 +0000 (+0000) Subject: Updated Device Config X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e3f52c16f7b70cfaabc695e0d36a012cdbdafc04;p=gosa.git Updated Device Config git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20848 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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 52decfb56..94c2397d3 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc @@ -83,18 +83,6 @@ class DeviceConfig extends plugin // Load config settings for the current device. $rpc = $this->config->getRpcHandle(); $res = $rpc->systemGetConfigParameters($this->deviceUUID); - if(!$rpc->success()){ - $smarty = get_smarty(); - $smarty->assign("error", 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); @@ -107,10 +95,23 @@ class DeviceConfig extends plugin $this->is_account = $this->initially_was_account = isset($res['item']); if(isset($res['var'])) $this->parameterValues = $res['var']; if(isset($res['item'])) $this->usedElements = $res['item']; - $this->assignableElements = $assignableElements; } } + // Load assignable elements. + $rpc = $this->config->getRpcHandle(); + $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($rpc->get_error())); + return($smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE))); + }else{ + $this->assignableElements = $assignableElements; + } + // Log account access if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE;