tbrehm
2008-12-12 ec09b18c9c44f85ceb6d9e7588a03a221cd1193f
interface/lib/classes/getconf.inc.php
@@ -1,7 +1,7 @@
<?php
/*
Copyright (c) 2006, Till Brehm, projektfarm Gmbh
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@@ -30,31 +30,24 @@
class getconf {
   var $config;
   private $config;
   
   function get_server_config($server_id, $section = '') {
   public function get_server_config($server_id, $section = '') {
      global $app;
      if(!is_array($this->config[$server_id])) {
         $app->uses('ini_parser');
         $server_id = intval($server_id);
         $server = $app->db->queryOneRecord("SELECT config FROM server WHERE server_id = $server_id");
         $this->config[$server_id] = $app->ini_parser->parse_ini_string(stripslashes($server["config"]));
      }
      if($section == '') {
         return $this->config[$server_id];
      } else {
         return $this->config[$server_id][$section];
      }
      return ($section == '') ? $this->config[$server_id] : $this->config[$server_id][$section];
   }
   
   function get_global_config() {
   public function get_global_config() {
      
      die("not yet implemented");
   }
}
?>