From cdda6b98d785f103d9be6643a99a882c0d65b64c Mon Sep 17 00:00:00 2001 From: fantu <fantu@ispconfig3> Date: Sun, 21 Dec 2008 04:51:07 -0500 Subject: [PATCH] fix parse error --- interface/lib/classes/getconf.inc.php | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/interface/lib/classes/getconf.inc.php b/interface/lib/classes/getconf.inc.php index e2dc327..2a9dcc1 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, @@ -51,9 +44,15 @@ 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]; } } -- Gitblit v1.9.1