summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1018cf8)
raw | patch | inline | side by side (parent: 1018cf8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 May 2011 11:10:04 +0000 (11:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 May 2011 11:10:04 +0000 (11:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20843 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 006a2b91b5ae3eed3b17a91296805051d0eb0caf..253532be6c69beccbfcdf291c9dc7c3b34288505 100644 (file)
// Build list of assigned Elements
$data = $lData = array();;
foreach($this->usedElements as $name){
- $element = $this->assignableElements[$name];
- $data[$name] = $element;
- $desc = (isset($element['description'])) ? $element['description'] : '';
+ if(isset($this->assignableElements[$name])){
+ $element = $this->assignableElements[$name];
+ $data[$name] = $element;
+ $desc = (isset($element['description'])) ? $element['description'] : '';
+ }else{
+ $element = NULL;
+ $data[$name] = $element;
+ $desc = "<font color='red'>"._("Unknown config item")."</font>";
+
+ }
$lData[$name] = array('data' => array($name, $desc));
}
$this->usedElementsList->setListData($data, $lData);
// Build up parameter list
$data = $lData = array();;
foreach($this->usedElements as $name){
+
+ if(!isset($this->assignableElements[$name]['parameter'])) continue;
+
$parameter = $this->assignableElements[$name]['parameter'];
foreach($parameter as $param => $desc){
$data[$param] = NULL;
+ $value = (isset($this->parameterValues[$param])) ? $this->parameterValues[$param] : "";
+
+ if(!isset($this->parameterWidgets[$param])){
+ $this->parameterWidgets[$param] = new TemplateWidget_string($this->config, $param, $value,
+ $desc, '', FALSE, 'string', $param);
+ }
+ $w = $this->parameterWidgets[$param];
+ $lData[$param] = array('data' => array($w->getDisplayName(), $w->render()));
}
- $value = (isset($this->parameterValues[$param])) ? $this->parameterValues[$param] : "";
-
- if(!isset($this->parameterWidgets[$param])){
- $this->parameterWidgets[$param] = new TemplateWidget_string($this->config, $param, $value,
- $desc, '', FALSE, 'string', $param);
- }
- $w = $this->parameterWidgets[$param];
- $lData[$param] = array('data' => array($w->getDisplayName(), $w->render()));
}
$this->parameterList->setListData($data, $lData);
// Collect paramter list.
$params = array();
foreach($this->usedElements as $name){
- $params = array_merge($this->assignableElements[$name]['parameter']);
+ if(isset($this->assignableElements[$name]['parameter'])){
+ $params = array_merge($this->assignableElements[$name]['parameter']);
+ }
}
// Decide whoch parameter has to be saved and which has to be removed.