summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed789d8)
raw | patch | inline | side by side (parent: ed789d8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 May 2011 11:33:10 +0000 (11:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 May 2011 11:33:10 +0000 (11:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20845 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc | patch | blob | history |
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 4e981fb1d8a79f51dfc1a18aeb5ad8566d8ab95f..c77adbd336a1dcaa24bc9ec9a7aa84b24fc3aba7 100644 (file)
// Initialize to plugin
if(!$this->initialized){
+
+ // 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($this->rpcErrorMessage));
+ return($display.$smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE)));
+ }
+
+ // Load assignable elements.
+ $assignableElements = $rpc->listAssignableElements('squeeze/1.0');
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)));
}else{
+
+ // Initialization completed.
$this->initialized = TRUE;
$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;
}
}
***************/
// Fill list of assignable elements
- $rpc = $this->config->getRpcHandle();
- $res = $rpc->listAssignableElements('squeeze/1.0');
- $this->assignableElements = $res;
$data = $lData = array();;
foreach($this->assignableElements as $name => $element){
}
$this->assignableElementsList->setListData($data, $lData);
+ $this->assignableElementsList->update();
// Build list of assigned Elements
$data = $lData = array();;
$lData[$name] = array('data' => array($name, $desc));
}
$this->usedElementsList->setListData($data, $lData);
+ $this->usedElementsList->update();
// Build up parameter list
$data = $lData = array();;
}
}
$this->parameterList->setListData($data, $lData);
+ $this->parameterList->update();
// Build up smarty template.
$smarty = get_smarty();