Changeset 316 for trunk/trax/vendor/trax/trax.php
- Timestamp:
- 07/08/09 02:35:59 (3 years ago)
- Files:
-
- 1 modified
-
trunk/trax/vendor/trax/trax.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/trax.php
r314 r316 98 98 ini_set("log_errors", "On"); 99 99 ini_set("error_log", self::$log_path."/".TRAX_ENV.".log"); 100 100 101 101 if(TRAX_ENV == "development") { 102 102 # Display errors to browser if in development mode for debugging … … 128 128 include_once("router.php"); 129 129 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(); 132 138 if(file_exists(self::$config_path."/database.ini")) { 133 139 # 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)); 135 142 } 136 ActiveRecord::$environment = TRAX_ENV; 137 143 ActiveRecord::$environment = TRAX_ENV; 138 144 } 139 145
