From: Joseph (J. W. <zo...@us...> - 2004-04-20 22:26:55
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8383/lib Modified Files: IniConfig.php Log Message: Removed Pear_Config for parse_ini_file(). Index: IniConfig.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/IniConfig.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -2 -b -p -d -r1.6 -r1.7 --- IniConfig.php 20 Apr 2004 18:10:27 -0000 1.6 +++ IniConfig.php 20 Apr 2004 22:26:27 -0000 1.7 @@ -53,5 +53,4 @@ include_once "lib/config.php"; function IniConfig($file) { - require_once('lib/pear/Config.php'); // List of all valid config options to be define()d which take "values" (not @@ -85,13 +84,10 @@ function IniConfig($file) 'DISABLE_HTTP_REDIRECT'); - $config = new Config(); - $root = &$config->parseConfig($file, 'inicommented'); - if (PEAR::isError($root)) { - trigger_error("Datasource file config/config.ini does not exist.", E_USER_ERROR); + if(!file_exists($file)){ + trigger_error("Datasource file '$file' does not exist", E_USER_ERROR); exit(); } - $out = $root->toArray(); - $rs = &$out['root']; + $rs = @parse_ini_file($file); foreach ($_IC_VALID_VALUE as $item) { @@ -465,4 +461,7 @@ function fix_configs() { // $Log$ +// Revision 1.7 2004/04/20 22:26:27 zorloc +// Removed Pear_Config for parse_ini_file(). +// // Revision 1.6 2004/04/20 18:10:27 rurban // config refactoring: |