Code

Updated property handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jun 2010 12:57:11 +0000 (12:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jun 2010 12:57:11 +0000 (12:57 +0000)
-Fixed logging (No recursions anymore)

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

gosa-core/include/class_config.inc
gosa-core/include/class_configRegistry.inc

index 4f7c82f131114f4b4f7daa6de5e58f41bfaaff14..faf44aab39c86b57e58b951811c19f1a68de7875 100644 (file)
@@ -1060,7 +1060,11 @@ class config  {
     }
 
     // Show a warning in the syslog if there is an undefined property requested.
-    new log("debug","","Unconfigured property: '{$class}::{$name}'",array(),'');
+    if($this->configRegistry->propertyInitializationComplete() && 
+            "{$class}::{$name}" != 'core::config' &&  // <--- This on is never set, only in gosa.conf. 
+            "{$class}::{$name}" != 'core::logging'){  // <--- This one may cause endless recursions in class_log.inc
+        new log("debug","","Unconfigured property: '{$class}::{$name}'",array(),'');
+    }
 
     // Try to find the property in the config file directly.
     $name= strtoupper($name);
index 697aea85e720b48fac20a84e18b6bae03ddb2095..d14f4ef4401c7c4801ee24706aaf2f62a927b5b0 100644 (file)
@@ -388,7 +388,6 @@ class configRegistry{
                     $this->ldapStoredProperties[$class][$name] = $value;
                 }
             }
-            $this->status = 'finished';
         }
 
         // Register plugin properties.
@@ -417,6 +416,19 @@ class configRegistry{
                 }
             }
         }
+
+        // We are only finsihed once we are logged in.
+        if(!empty($this->config->current['CONFIG'])){
+            $this->status = 'finished';
+        }
+    }
+
+   
+    /*! \brief      Returns TRUE if the property registration has finished without any error.
+     */ 
+    function propertyInitializationComplete()
+    {
+        return($this->status == 'finished');
     }