Code

Updated device item listing
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Sep 2010 09:57:21 +0000 (09:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Sep 2010 09:57:21 +0000 (09:57 +0000)
.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19827 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc
gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc

index 7ae103d7762b0a03b9aad652a48d9066301b27b7..21a4f89ccca4d14484cff5d0e19f337ee015e301 100644 (file)
@@ -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
index 61ddfdb0551eafe6eba31c5084fc7bbf389fc69d..b8a14b3e9fda83e55481595e225d903c340d3710 100644 (file)
@@ -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();