From b5715fb4a82d6494e6fba5ffcc1b0af3c9d2421c Mon Sep 17 00:00:00 2001 From: cfoe <cfoe@ispconfig3> Date: Sat, 07 Jul 2012 13:12:41 -0400 Subject: [PATCH] removed hardcoded width for list search_limit select-element -> css defined --- server/lib/classes/ini_parser.inc.php | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/lib/classes/ini_parser.inc.php b/server/lib/classes/ini_parser.inc.php index 05a7259..003d04c 100644 --- a/server/lib/classes/ini_parser.inc.php +++ b/server/lib/classes/ini_parser.inc.php @@ -28,7 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -class ini_parser { +class ini_parser{ var $config; @@ -37,9 +37,8 @@ $lines = explode("\n",$ini); foreach($lines as $line) { - + $line = trim($line); if($line != '') { - $line = trim($line); if(preg_match("/^\[([\w\d_]+)\]$/", $line, $matches)) { $section = strtolower($matches[1]); } elseif(preg_match("/^([\w\d_]+)=(.*)$/", $line, $matches) && $section != null) { @@ -58,7 +57,11 @@ foreach($this->config as $section => $data) { $content .= "[$section]\n"; foreach($data as $item => $value) { - if($value != '') $content .= "$item=$value\n"; + if($value != '') { + $value = trim($value); + $item = trim($item); + $content .= "$item=$value\n"; + } } } return $content; @@ -66,4 +69,4 @@ } -?> \ No newline at end of file +?> -- Gitblit v1.9.1