From 3eeed9bdef1040d4f1f9343201cd8b30e21d273c Mon Sep 17 00:00:00 2001 From: bpssoft <bpssoft@ispconfig3> Date: Fri, 09 Nov 2007 06:02:50 -0500 Subject: [PATCH] * Added bruteforge protection into login * Cleanup some stuff into login/index.php like globals * Add errors to the lang files --- interface/lib/classes/ini_parser.inc.php | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/interface/lib/classes/ini_parser.inc.php b/interface/lib/classes/ini_parser.inc.php index 4cb2e4f..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,19 +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