Show
Ignore:
Timestamp:
10/16/06 04:06:51 (6 years ago)
Author:
john
Message:

fixed the include path for lib dir in Trax::initialize()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/trax.php

    r251 r267  
    3737    public static  
    3838        $models_path = null, 
    39         $views_path = null,          
    40         $controllers_path = null,     
    41         $helpers_path = null,        
    42         $layouts_path = null,        
    43         $config_path = null,         
    44         $environments_path = null,   
    45         $lib_path = null,            
    46         $app_path = null,            
    47         $log_path = null,            
     39        $views_path = null, 
     40        $controllers_path = null, 
     41        $helpers_path = null, 
     42        $layouts_path = null, 
     43        $config_path = null, 
     44        $environments_path = null, 
     45        $lib_path = null, 
     46        $app_path = null, 
     47        $log_path = null, 
    4848        $vendor_path = null, 
    4949        $public_path = null, 
     
    5555        $current_action_name = null, 
    5656        $current_controller_object = null; 
    57                
    58          
     57 
    5958    function initialize() { 
    60         
     59 
    6160        if(substr(PHP_OS, 0, 3) == 'WIN') { 
    6261            # Windows 
    6362            self::$path_seperator = ";"; 
    64         }     
    65          
    66         # Set include paths    
     63        } 
     64 
     65        # Set include paths 
    6766        self::$models_path       = TRAX_ROOT."/app/models"; 
    6867        self::$views_path        = TRAX_ROOT."/app/views"; 
     
    7776        self::$vendor_path       = TRAX_ROOT."/vendor"; 
    7877        self::$public_path       = TRAX_ROOT."/public";  
    79          
     78 
    8079        # Set which file to log php errors to for this application 
    8180        # As well in your application you can do error_log("whatever") and it will go to this log file. 
    8281        ini_set("log_errors", "On"); 
    83         ini_set("error_log", self::$log_path."/".TRAX_ENV.".log");  
    84          
     82        ini_set("error_log", self::$log_path."/".TRAX_ENV.".log"); 
     83 
    8584        if(TRAX_ENV == "development") { 
    8685            # Display errors to browser if in development mode for debugging 
     
    9089            ini_set("display_errors", "Off"); 
    9190        } 
    92                  
     91 
    9392        # Set the include_path 
    9493        ini_set("include_path", 
    95                 ".".self::$path_seperator.   # current directory 
    96                 TRAX_LIB_ROOT.self::$path_seperator.  # trax libs (vendor/trax or server trax libs) 
    97                 PHP_LIB_ROOT.self::$path_seperator.  # php libs dir (ex: /usr/local/lib/php) 
    98                 TRAX_ROOT.self::$lib_path.self::$path_seperator. # app specific libs extra libs to include 
    99                 ini_get("include_path")); # add on old include_path to end 
    100          
     94            ".".self::$path_seperator.              # current directory 
     95            TRAX_LIB_ROOT.self::$path_seperator.    # trax libs (vendor/trax or server trax libs) 
     96            PHP_LIB_ROOT.self::$path_seperator.     # php libs dir (ex: /usr/local/lib/php) 
     97            self::$lib_path.self::$path_seperator.  # app specific libs extra libs to include 
     98            ini_get("include_path")                 # tack on the old include_path to the end 
     99        ); # add on old include_path to end 
     100 
    101101        # Include Trax library files. 
    102102        include_once("session.php"); 
     
    117117            ActiveRecord::$database_settings = parse_ini_file(self::$config_path."/database.ini", true); 
    118118        } 
    119                     
     119 
    120120    } 
    121      
     121 
    122122    function include_env_config() { 
    123123        # Include the application environment specific config file 
    124124        if(file_exists(self::$environments_path."/".TRAX_ENV.".php")) { 
    125125            include_once(self::$environments_path."/".TRAX_ENV.".php"); 
    126         }              
     126        } 
    127127    } 
    128128}