Index: trunk/admin/install/install_lib.php =================================================================== diff -u -r78 -r89 --- trunk/admin/install/install_lib.php (.../install_lib.php) (revision 78) +++ trunk/admin/install/install_lib.php (.../install_lib.php) (revision 89) @@ -415,6 +415,44 @@ return FALSE; } +function inst_parse_portal_ini($file, $parse_section = false) { + if(!file_exists($file) && !is_readable($file)) + die('Could Not Open Ini File'); + + $contents = file($file); + + $retval = array(); + + $section = ''; + foreach($contents as $line) { + $line = trim($line); + $line = eregi_replace(';[.]*','',$line); + if(strlen($line) > 0) { + //echo $line . " - "; + if(eregi('^[[a-z]+]$',$line)) { + //echo 'section'; + $section = substr($line,1,(strlen($line)-2)); + if ($parse_section) { + $retval[$section] = array(); + } + continue; + } elseif(eregi('=',$line)) { + //echo 'main element'; + list($key,$val) = explode(' = ',$line); + if (!$parse_section) { + $retval[trim($key)] = str_replace('"', '', $val); + } + else { + $retval[$section][trim($key)] = str_replace('"', '', $val); + } + } //end if + //echo '
'; + } //end if + } //end foreach + + return $retval; +} + function inst_GetModuleList() { global $rootpath,$pathchar,$admin, $pathtoroot;