Show
Ignore:
Timestamp:
07/08/09 02:35:59 (3 years ago)
Author:
john
Message:

bug fixes / updates

Files:
1 modified

Legend:

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

    r314 r316  
    9898        ini_set("log_errors", "On"); 
    9999        ini_set("error_log", self::$log_path."/".TRAX_ENV.".log"); 
    100  
     100          
    101101        if(TRAX_ENV == "development") { 
    102102            # Display errors to browser if in development mode for debugging 
     
    128128        include_once("router.php"); 
    129129 
    130         # Make sure database settings are cleared out 
    131         ActiveRecord::$database_settings = array(); 
     130        self::load_active_record_connections_config(); 
     131 
     132    }   
     133     
     134    function load_active_record_connections_config() { 
     135        # Make sure database settings are cleared out  
     136        ActiveRecord::$database_settings = array();    
     137        ActiveRecord::clear_all_connections(); 
    132138        if(file_exists(self::$config_path."/database.ini")) { 
    133139            # Load databse settings  
    134             ActiveRecord::$database_settings = parse_ini_file(self::$config_path."/database.ini", true); 
     140            ActiveRecord::$database_settings = parse_ini_file(self::$config_path."/database.ini", true);  
     141            #error_log("db settings:".print_r(ActiveRecord::$database_settings, true)); 
    135142        } 
    136         ActiveRecord::$environment = TRAX_ENV; 
    137  
     143        ActiveRecord::$environment = TRAX_ENV;         
    138144    } 
    139145