From 3defe6fef3e8257a04ac9879028b34983234d4ce Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 28 Sep 2010 09:57:21 +0000 Subject: [PATCH] Updated device item listing . git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19827 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/goto/Config/class_DeviceConfig.inc | 12 ++++++++---- .../systems/goto/Config/class_filterDeviceItems.inc | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) 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 7ae103d77..21a4f89cc 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc @@ -16,6 +16,8 @@ class DeviceConfig extends management private $itemContainerSelector = NULL; + private $base ; + /*! \brief Constructs the device configuration plugin * @param Config The GOsa configuration object. */ @@ -30,6 +32,7 @@ class DeviceConfig extends management // Set storage points - We do not have any - We just create a fake list which lists all items $this->storagePoints = array(""); $this->itemContainerSelector = new releaseSelector(array('cn=root'=>''), 'cn=root', 'cn=root'); + $this->base = "cn=root"; $this->navigationList= new sortableListing(); $this->navigationList->setDeleteable(true); @@ -149,7 +152,6 @@ class DeviceConfig extends management $filter = $this->getFilter(); $headpage = $this->getHeadpage(); $this->itemContainerSelector->update(); - $headpage->setBase('test'); $headpage->update(); $smarty = get_smarty(); $smarty->assign("RELEASE", $this->itemContainerSelector->render()); @@ -179,8 +181,7 @@ class DeviceConfig extends management // Collect item container list to be able to render the fake-base selector $this->itemContainerSelector->setBases($this->getContainerList()); $this->itemContainerSelector->update(true); - -# print_a($this->getContainerList()); + $this->itemContainerSelector->setBase($this->base); // Build filter if (session::global_is_set(get_class($this)."_filter")){ @@ -191,7 +192,6 @@ class DeviceConfig extends management } $this->setFilter($filter); - // Load service xml file and fill in placeholders $contents =file_get_contents(get_template_path("goto/Config/DeviceConfig-list.xml", true)); # $template = " @@ -230,6 +230,7 @@ class DeviceConfig extends management # # $contents = preg_replace("/%SERVICES%/",$serviceList, $contents); $headpage = new listing($contents,TRUE); + $headpage->setBase($this->base); $headpage->setFilter($filter); parent::__construct($this->config, $this->ui, "services", $headpage); @@ -382,6 +383,9 @@ class DeviceConfig extends management $item = $this->navigationList->getData($action['targets'][0]); $this->setCurrentItem($item['name']); } + + $this->itemContainerSelector->update(); + $this->base = $this->itemContainerSelector->getBase(); } /*! \brief Forward plugin acls 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 61ddfdb05..b8a14b3e9 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc @@ -4,6 +4,7 @@ class filterDeviceItems { static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "") { + print_a(array($base, $scope, $filter, $attributes, $category, $objectStorage)); $ret = array(); $entry = array(); -- 2.30.2