From 620df024f3d8960a89eb4ed71d3ea61e2b9aa3db Mon Sep 17 00:00:00 2001
From: quentusrex <quentusrex@ispconfig3>
Date: Thu, 30 Oct 2008 13:59:40 -0400
Subject: [PATCH] Now a client can view e-mail filters created by admin, but the client can't edit them. The client can submit a change, but it isn't input in the database, nor is the client told that the changes aren't made.
---
interface/lib/classes/ini_parser.inc.php | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/interface/lib/classes/ini_parser.inc.php b/interface/lib/classes/ini_parser.inc.php
index b302bd0..67e6542 100644
--- a/interface/lib/classes/ini_parser.inc.php
+++ b/interface/lib/classes/ini_parser.inc.php
@@ -39,7 +39,8 @@
class ini_parser{
private $config;
-
+
+ //* Converts a ini string to array
public function parse_ini_string($ini) {
$ini = str_replace("\r\n", "\n", $ini);
$lines = explode("\n", $ini);
@@ -56,22 +57,27 @@
}
return $this->config;
}
-
-
-
- public function get_ini_string($file) {
+
+
+ //* Converts a config array to a string
+ public function get_ini_string($config_array = '') {
+ if($config_array == '') $config_array = $this->config;
$content = '';
- foreach($this->config as $section => $data) {
+ foreach($config_array as $section => $data) {
$content .= "[$section]\n";
foreach($data as $item => $value) {
- if($value != ''){
+ if($item != ''){
$content .= "$item=$value\n";
}
}
+ $content .= "\n";
}
return $content;
}
-
+
+
+
+
}
?>
\ No newline at end of file
--
Gitblit v1.9.1