Changeset 6 for trunk

Show
Ignore:
Timestamp:
10/31/07 15:31:27 (1 year ago)
Author:
malko
Message:

- now write_conf_file() keep empty lines.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/fx-conf.php

    r3 r6  
    55* @package config 
    66* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
    7 * @changelog - 2007-04-30 - bug correction regarding single quote escaped in values string 
    8 *                                                                                                       - bug correction when saving some multiple multiline values containing '=' at certain position on a line (not the first). 
     7* @changelog - 2007-10-31 - now write_conf_file() keep empty lines. 
     8*            - 2007-04-30 - bug correction regarding single quote escaped in values string 
     9*                         - bug correction when saving some multiple multiline values containing '=' at certain position on a line (not the first). 
    910*            - 2007-04-26 - replace double quote strings with single quote string at eval time to avoid replacement of escaped values (ie: \[rnt....]) 
    1011*            - 2007-03-27 - change regexp in parse_conf_file() to better support multilines values (line ended by \) 
     
    7273        $fileExist = file_exists($file); 
    7374        # check if file exist or not 
    74         if( $fileExist && ! $force ) 
     75        if( !( $fileExist || $force ) ) 
    7576                return FALSE; 
    7677        $oldconf = $fileExist?file($file):null; 
     
    102103        if(! preg_match('!\\\\\s*\n$!',$line)) 
    103104          $follow = FALSE; 
     105      }else{ 
     106        $newconf[$linenb] = $line; 
    104107      } 
    105108      if( (! $follow) && @isset($config[$var]) )