From 7e909cb8a84991b2cfd93978d475baa393591005 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 5 May 2010 08:03:01 +0000 Subject: [PATCH] Updated class core and configRegistry -Renamed core class and added core group -Updated configRegistry to include 'main' and 'location' settings from gosa.conf git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18066 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_configRegistry.inc | 18 +++++++++++++++--- gosa-core/include/class_core.inc | 13 +++---------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index 564978d0d..c3f2ddbd9 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -33,7 +33,7 @@ class configRegistry{ $this->mapByClass = array(); $this->mapPropertyToClass = array(); - // Search for config flags defined in the config file + // Search for config flags defined in the config file (TAB section) foreach($this->config->data['TABS'] as $tabname => $tabdefs){ foreach($tabdefs as $info){ @@ -54,6 +54,18 @@ class configRegistry{ } } + // Search for config flags defined in the config file (MAIN section) + foreach($this->config->data['MAIN'] as $name => $value){ + $this->fileStoredProperties['core'][strtolower($name)] = $value; + } + + // Search for config flags defined in the config file (Current LOCATION section) + if(isset($this->config->current)){ + foreach($this->config->current as $name => $value){ + $this->fileStoredProperties['core'][strtolower($name)] = $value; + } + } + // Search for all config flags defined in the LDAP - BUT only if we ARE logged in. if(!empty($this->config->current['CONFIG'])){ $ldap = $this->config->get_ldap_link(); @@ -205,9 +217,9 @@ class gosaProperty } // Second check for values in the config file. - if(isset($this->parent->fileStoredProperties[$this->class][$this->name])){ + if(isset($this->parent->fileStoredProperties[$this->class][strtolower($this->name)])){ $this->setStatus('file'); - $this->value = $this->parent->fileStoredProperties[$this->class][$this->name]; + $this->value = $this->parent->fileStoredProperties[$this->class][strtolower($this->name)]; } // If there still wasn't found anything then fallback to the default. diff --git a/gosa-core/include/class_core.inc b/gosa-core/include/class_core.inc index f470f3411..11804369f 100644 --- a/gosa-core/include/class_core.inc +++ b/gosa-core/include/class_core.inc @@ -18,25 +18,18 @@ class all extends plugin { } class core extends plugin { - - - /*! \brief Add ACL object - @return Returns the ACL object. - */ static function plInfo() { return (array( - "plShortName" => _("Sudo"), - "plDescription" => _("Sudo role"), + "plShortName" => _("Core"), + "plDescription" => _("GOsa core plugin"), "plSelfModify" => FALSE, "plDepends" => array(), "plPriority" => 0, "plSection" => array("administration"), - "plCategory" => array("sudo" => array("objectClass" => "sudoRole", "description" => _("Sudo role"))), - + "plCategory" => array("all"), "plProperties" => array( - array( "name" => "logging", "type" => "string", -- 2.30.2