From 67bfe470e4f550a185ffe6e5186c12c738666bf0 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 May 2010 09:57:57 +0000 Subject: [PATCH] Added dummy listing of properties git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18033 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_configRegistry.inc | 6 ++++++ .../configViewer/class_configViewer.inc | 20 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index efc85f942..1b9cacde2 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -111,6 +111,11 @@ class configRegistry{ $this->mapPropertyToClass[$id] = $class; } + public function getAllProperties() + { + return($this->properties); + } + function propertyExists($class,$name) { return(isset($this->mapByName[$class][$name])); @@ -208,6 +213,7 @@ class gosaProperty function getValue() { return($this->value); } function getName() { return($this->name); } + function getClass() { return($this->class); } function getType() { return($this->type); } function getDescription() { return($this->description); } function getDefault() { return($this->default); } diff --git a/gosa-core/plugins/addons/configViewer/class_configViewer.inc b/gosa-core/plugins/addons/configViewer/class_configViewer.inc index 4b9543b58..b8d9f1042 100644 --- a/gosa-core/plugins/addons/configViewer/class_configViewer.inc +++ b/gosa-core/plugins/addons/configViewer/class_configViewer.inc @@ -5,14 +5,30 @@ class configViewer extends plugin var $plHeadline= "Config viewer"; var $plDescription= "Allows to modify configuration values"; + var $configRegistry = NULL; + function __construct (&$config, $dn= NULL) { - + $this->config = &$config; + $this->configRegistry = &$config->configRegistry; } function execute() { - return('Ja'); + $all = $this->configRegistry->getAllProperties(); + $str = ""; + foreach($all as $p){ + $str.=" + + {$p->getClass()} + {$p->getName()} + {$p->getDescription()} + + {$p->getStatus()} + "; + } + + return("{$str}
"); } } ?> -- 2.30.2