Code

fixed property
[gosa.git] / gosa-core / include / class_config.inc
index f89a32b1b28c76398438626b7d373d45c27b208e..c01a2ec0e519fe9e696298030f2692cccbe49b79 100644 (file)
@@ -64,6 +64,8 @@ class config  {
   var $filename = "";
   var $last_modified = 0;
 
+  public $configRegistry = NULL;
+
   /*! \brief Class constructor of the config class
    *  
    *  \param string 'filename' path to the configuration file
@@ -82,6 +84,9 @@ class config  {
     if ($filename != ""){
       $this->parse($filename);
     }
+
+    // Load configuration registry
+    $this->configRegistry = new configRegistry($this);
   }
 
 
@@ -756,7 +761,7 @@ class config  {
 
       $dn= $ldap->getDN();
       $this->tdepartments[$dn]= "";
-      $this->department_info[LDAP::fix($dn)]= array("img" => $type_data['IMG'],
+      $this->department_info[$dn]= array("img" => $type_data['IMG'],
                                          "description" => isset($attrs['description'][0])?$attrs['description'][0]:"",
                                          "name" => $attrs[$type_data['ATTR']][0]);
 
@@ -1070,7 +1075,15 @@ class config  {
    *
    *
    */
-  function get_cfg_value($name, $default= "") {
+  function get_cfg_value($name, $default= "") 
+  {
+
+    if($this->configRegistry->propertyExists('core',$name)){
+        return($this->configRegistry->getPropertyValue('core',$name));
+    }
+
+    syslog(1, $name);    
+
     $name= strtoupper($name);
 
     /* Check if we have a current value for $name */