/[cvs]/nfo/php/libs/net.php.smarty/Config_File.class.php
ViewVC logotype

Diff of /nfo/php/libs/net.php.smarty/Config_File.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by cvsjoko, Wed Oct 9 00:45:29 2002 UTC revision 1.2 by joko, Thu Dec 19 16:40:20 2002 UTC
# Line 3  Line 3 
3  /**  /**
4   * Config_File class.   * Config_File class.
5   *   *
6   * @version 2.3.0   * @version 2.3.1
7   * @author Andrei Zmievski <andrei@php.net>   * @author Andrei Zmievski <andrei@php.net>
8   * @access public   * @access public
9   *   *
# Line 60  class Config_File { Line 60  class Config_File {
60           */           */
61          var $read_hidden        =       true;          var $read_hidden        =       true;
62    
63            /**
64             * Controls whether or not to fix mac or dos formatted newlines.
65             * If set to true, \r or \r\n will be changed to \n.
66             *
67             * @access public
68             */
69            var $fix_newlines =     true;  
70            
71          /* Private variables */          /* Private variables */
72          var $_config_path       = "";          var $_config_path       = "";
73          var $_config_data       = array();          var $_config_data       = array();
# Line 253  class Config_File { Line 261  class Config_File {
261    
262                  $contents = fread($fp, filesize($config_file));                  $contents = fread($fp, filesize($config_file));
263                  fclose($fp);                  fclose($fp);
264                    
265                    if($this->fix_newlines) {
266                            // fix mac/dos formatted newlines
267                            $contents = preg_replace('!\r\n?!',"\n",$contents);
268                    }
269    
270                  $config_data = array();                  $config_data = array();
271    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed