Code

Migrated to get_cfg_value
[gosa.git] / gosa-core / include / class_config.inc
index 80d51ebc717c2f8496b6008c9b698f72772fd7d8..5f00a2bd0abea86c7649a256c091fa0719aa824c 100644 (file)
@@ -815,7 +815,7 @@ class config  {
    */
   function getShareList($listboxEntry = false)
   {
-    $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server/goShareServer",get_ou("serverou"),
+    $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("serverou"),
         $this->current['BASE'],array("goExportEntry","cn"), GL_NONE);
     $return =array();
     foreach($tmp as $entry){
@@ -934,6 +934,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