From 9c9382e6949e1366c6adb502b7aacae2c11023f7 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 08 Sep 2011 09:42:04 -0400 Subject: [PATCH] Fixed: FS#1709 - Wrong message "Your hard-disk space is going full" in the "Monitor -> Show Disk Usage" --- interface/lib/classes/getconf.inc.php | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-) diff --git a/interface/lib/classes/getconf.inc.php b/interface/lib/classes/getconf.inc.php index e2dc327..a2be834 100644 --- a/interface/lib/classes/getconf.inc.php +++ b/interface/lib/classes/getconf.inc.php @@ -1,14 +1,7 @@ <?php -/** - * getconf class - * - * @author Till Brehm - * @copyright 2005, Till Brehm, projektfarm Gmbh - * @version 0.1 - * @package ISPConfig - */ + /* -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, @@ -41,20 +34,26 @@ 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"])); + $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'])); } return ($section == '') ? $this->config[$server_id] : $this->config[$server_id][$section]; } - public function get_global_config() { + public function get_global_config($section = '') { + global $app; - die("not yet implemented"); + if(!is_array($this->config['global'])) { + $app->uses('ini_parser'); + $tmp = $app->db->queryOneRecord('SELECT config FROM sys_ini WHERE sysini_id = 1'); + $this->config['global'] = $app->ini_parser->parse_ini_string(stripslashes($tmp['config'])); + } + return ($section == '') ? $this->config['global'] : $this->config['global'][$section]; } } -?> \ No newline at end of file +?> -- Gitblit v1.9.1