summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8b67c0b)
raw | patch | inline | side by side (parent: 8b67c0b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Sep 2010 12:17:22 +0000 (12:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Sep 2010 12:17:22 +0000 (12:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19832 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc
index 38388e14f565b291e5a63a502a6cc54cd1aea320..2f14d4e8bd693cb19090513d056afacb4127d63f 100644 (file)
);
$this->addItem('PuppetModule','test2',
array(
+ 'dependency' => '',
'version' => 1,
'name' => 'Firefox',
'description' => 'Test Module')
$this->addItem('PuppetTemplate','temp1',
array(
'name' => 'temp1',
- 'file' => 'kekse.tpl')
+ 'data' => 'kekse.tpl')
);
$this->setCurrentItem('temp1');
$this->addItem('PuppetTemplate','tep1',
array(
'name' => 'tep1',
- 'file' => 'kekse.tpl')
+ 'data' => 'kekse.tpl')
);
$this->setCurrentItem('root');
*/
function addItem($type,$name, $values)
{
+ if(!isset($this->itemConfig[$type])){
+ echo "Invalid type {$type}, skipping item!";
+ return;
+ }
+
+ $allValuesSet = TRUE;
+ foreach($this->itemConfig[$type]['options'] as $oName => $option){
+ if(!isset($values[$oName])){
+ echo "Missing value for option {$oName}! Skipping addItem({$type},{$name},array())!<br>";
+ return;
+ }
+ }
+
$current = &$this->currentItem;
$this->idToName[] = $name;
$new = array(
{
// Do nothing if we're already where we wanted to switch to.
if($this->currentItemName == $item) return;
+
+ if(!isset($this->currentItemValues[$item])){
+ echo "Invalid item name {$name}! Skipping selection!";
+ return;
+ }
// Save eventually changed values
if($this->currentItem){
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc
index 30767bc5b5a966c8d7da495725c45d1dad281f3e..fac61cbdec24b1ab0f424fcace04cc2b29f01eb9 100644 (file)
}
// Prepare the value for the widget
- $value = $item['value'];
- if(isset($values[$name])){
- $value = $values[$name];
- }
+ $value = $values[$name];
// Create the new widget.
$this->widgets[$name] = new $widgetClassName($this->config, $name,