From 9cb77e00c93ad86c95e23b9377bcf2f92da9c75a Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Thu, 01 Nov 2012 07:52:23 -0400
Subject: [PATCH] Fixed:  - log parsing did not recognize lines with multiple recipients  - spamfilter_users added to datalog status messages

---
 interface/lib/classes/ini_parser.inc.php |   31 +++++++++++--------------------
 1 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/interface/lib/classes/ini_parser.inc.php b/interface/lib/classes/ini_parser.inc.php
index 67e6542..6303115 100644
--- a/interface/lib/classes/ini_parser.inc.php
+++ b/interface/lib/classes/ini_parser.inc.php
@@ -1,15 +1,7 @@
 <?php
-/**
- * ini parser 
- * 
- * @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,
@@ -39,13 +31,13 @@
 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);
 		foreach($lines as $line) {
-            $line = trim($line);                
+			$line = trim($line);
 			if($line != '') {
 				if(preg_match("/^\[([\w\d_]+)\]$/", $line, $matches)) {
 					$section = strtolower($matches[1]);
@@ -57,8 +49,8 @@
 		}
 		return $this->config;
 	}
-	
-	
+
+
 	//* Converts a config array to a string
 	public function get_ini_string($config_array = '') {
 		if($config_array == '') $config_array = $this->config;
@@ -67,17 +59,16 @@
 			$content .= "[$section]\n";
 			foreach($data as $item => $value) {
 				if($item != ''){
-                    $content .= "$item=$value\n";
-                }
+					$value 	= trim($value);
+					$item 	= trim($item);
+					$content .= "$item=$value\n";
+				}
 			}
 			$content .= "\n";
 		}
 		return $content;
 	}
-	
-	
-	
-	
+
 }
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1