Code

Updated config viewer
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 May 2010 13:25:37 +0000 (13:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 May 2010 13:25:37 +0000 (13:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18042 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/addons/configViewer/class_configViewer.inc
gosa-core/plugins/addons/configViewer/class_filterProperties.inc [new file with mode: 0644]
gosa-core/plugins/addons/configViewer/main.inc

index a655a26c479850e1a996a085e8d4e9748993a134..74e2ddc7860326ef8d090e7a9276905433e78b9d 100644 (file)
@@ -1,9 +1,35 @@
 <?php
 
-class configViewer extends plugin
+
+class configViewer extends management
 {
     var $plHeadline= "Preferences";
     var $plDescription= "Configure global and special GOsa settings like hooks and plugin parameters";
+    var $plIcon  = "plugins/configViewer/images/plugin.png";
+
+    function __construct($config,$ui)
+    {
+        $this->config = $config;
+        $this->ui = $ui;
+
+        // Build filter
+        if (0&&session::global_is_set(get_class($this)."_filter")){
+            $filter= session::global_get(get_class($this)."_filter");
+        } else {
+            $filter = new filter(get_template_path("property-filter.xml", true));
+            $filter->setObjectStorage($this->storagePoints);
+        }
+        $this->setFilter($filter);
+
+        // Build headpage
+        $headpage = new listing(get_template_path("property-list.xml", true));
+        $headpage->setFilter($filter);
+        parent::__construct($config, $ui, "property", $headpage);
+    }
+}
+
+class configViewer_old extends plugin
+{
 
     var $configRegistry = NULL;    
     var $viewType = 'byClass';
diff --git a/gosa-core/plugins/addons/configViewer/class_filterProperties.inc b/gosa-core/plugins/addons/configViewer/class_filterProperties.inc
new file mode 100644 (file)
index 0000000..85975ae
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+class filterProperties {
+
+  static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+  {
+    print_a(array($base, $scope, $filter, $attributes, $category, $objectStorage));
+    return(array());
+  }
+
+  static function unifyResult($result)
+  {
+    $res=array();
+    foreach($result as $entry){
+      if(!isset($res[$entry['dn']])){
+        $res[$entry['dn']]=$entry;
+      }
+    }
+    return(array_values($res)); 
+  }
+}
+
+?>
index 27444ad41fef927d33bea48ba726e2046c57f4fa..1737aa979764ad2e37c4f063280f6025e7c624d7 100644 (file)
@@ -47,7 +47,6 @@ if ( $cleanup ){
     $configViewer = session::get('configViewer');
 
     /* Execute formular */
-    $display= $configViewer->save_object();
     $display= $configViewer->execute ();
     $display.= "<input type=\"hidden\" name=\"ignore\">\n";