Code

Updated gosa.conf and class_config.
[gosa.git] / gosa-core / include / class_config.inc
index a51caa58b64b9167fb963b1dafc0dacd6c488e3f..ad109f53492a91a49ca0473ac76dd89612c6d9b6 100644 (file)
@@ -287,6 +287,9 @@ class config  {
   {
     $this->current= $this->data['LOCATIONS'][$name];
 
+    if (!isset($this->current['SAMBAVERSION'])){
+      $this->current['SAMBAVERSION']= 3;
+    }
     if (!isset($this->current['PEOPLE'])){
       $this->current['PEOPLE']= "ou=people";
     }
@@ -934,6 +937,23 @@ class config  {
   }
 
 
+  function get_cfg_value($name, $default= "") {
+    $name= strtoupper($name);
+
+    /* Check if we have a current value for $name */
+    if (isset($this->current[$name])){
+      return ($this->current[$name]);
+    }
+
+    /* Check if we have a global value for $name */
+    if (isset($this->data["MAIN"][$name])){
+      return ($this->data["MAIN"][$name]);
+    }
+
+    return ($default);
+  }
+
+
   function check_config_version()
   {
     /* Skip check, if we've already mentioned the mismatch