summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7d1418)
raw | patch | inline | side by side (parent: f7d1418)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Sep 2010 09:41:31 +0000 (09:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Sep 2010 09:41:31 +0000 (09:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19865 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_filterDeviceItems.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 d0b7ee41a28336e07308fac4857974f88630d25b..dd8c554afaf1ee3375d166f3535b1e96b8934fa6 100644 (file)
$this->is_account = TRUE;
// Set current item to 'root', this is the minimum to get things running.
- $this->addItem($root,'root',array());
- $this->setCurrentItem('root');
- $this->setBase($this->baseToDN['root']);
+ $idRoot = $this->addItem($root,'root',array());
+ $this->setCurrentItem($idRoot);
+ $this->setBase($this->baseToDN[$idRoot]);
- $this->addItem('PuppetModule','test1',
+ $id = $this->addItem('PuppetModule','test1',
array(
'dependency' => array('stulle','Wurst'),
'version' => '2.4-f',
'name' => 'Thundebird',
'description' => 'Mozilla mail client')
);
- $this->addItem('PuppetModule','test2',
+ $id = $this->addItem('PuppetModule','test2',
array(
'dependency' => array('Leipnitz','Dose'),
'version' => 1,
'name' => 'Firefox',
'description' => 'Test Module')
);
- $this->setCurrentItem('test1');
- $this->addItem('PuppetTemplate','temp1',
+ $this->setCurrentItem($id);
+ $id = $this->addItem('PuppetTemplate','temp1',
array(
'name' => 'temp1',
'data' => 'kekse.tpl')
);
- $this->setCurrentItem('temp1');
- $this->addItem('PuppetTemplate','tep1',
+ $this->setCurrentItem($id);
+ $id = $this->addItem('PuppetTemplate','tep1',
array(
'name' => 'tep1',
'data' => 'kekse.tpl')
);
- $this->setCurrentItem('root');
+ $this->setCurrentItem($idRoot);
$this->rebuildListing();
}
$this->itemContainerSelector = new releaseSelector(
$this->getContainerList(),
$this->base,
- $this->currentItemValues['root']['base']);
+ $this->currentItemValues[0]['base']);
}else{
$this->itemContainerSelector->setBases($this->getContainerList());
}
*/
function getContainerList($array = NULL)
{
- $array = ($array == NULL)?$this->currentItemValues['root']: $array;
+ $array = ($array == NULL)?$this->currentItemValues[0]: $array;
$ret[$array['base']] = $array['type'];
if(count($array['children'])){
foreach($array['children'] as $subItem){
$base = (isset($current['base']))? ",".$current['base'] : '';
$base = "{$type}={$name}{$base}";
+ $id = count($this->currentItemValues);
$new = array(
'base' => $base,
'children' => array(),
+ 'id' => $id,
'type' => $type,
'name' => $name,
'values' => $values);
- $this->currentItemValues[$name] = $new;
- $current['children'][$name] = &$this->currentItemValues[$name];
- $this->baseToDN[$name] = $base;
- $this->baseToDN[$base] = $name;
+ $this->currentItemValues[$id] = $new;
+ $current['children'][$id] = &$this->currentItemValues[$id];
+
+ $this->baseToDN[$id] = $base;
+ $this->baseToDN[$base] = $id;
+ return($id);
}
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc
index f4ac031e60639a23fefe8eeca2c7e1322e37c3c8..b44d8d1dedbaf8636888a496534ad08dc8036f01 100644 (file)
{
if(preg_match("/".$filter."/",$item['name'])){
$entry = array();
- $entry['dn'] = $item['name'];
+ $entry['dn'] = $item['id'];
$entry[] = 'dn';
$entry['cn'] = array($item['name'], 'count' => 1);
$entry[] = 'cn';
+ $entry['id'] = array($item['id'], 'count' => 1);
+ $entry[] = 'id';
$entry['description'] = array($item['type'], 'count' => 1);
$entry[] = 'description';
$entry['objectClass'] = array('FAKE_OC_DeviceItem','count' => 1);
$entry[] = 'objectClass';
- $entry['count'] = 3;
+ $entry['count'] = 4;
$ret[] = $entry;
}