Changeset 1326 for trunk/lib/AkActiveRecord
- Timestamp:
- 06/26/09 04:44:49 (9 months ago)
- Files:
-
- trunk/lib/AkActiveRecord/AkDbAdapter.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/AkActiveRecord/AkDbAdapter.php
r1252 r1326 79 79 return !empty($this->connection); 80 80 } 81 82 83 /** 84 * @static 81 82 83 /** 84 * @static 85 85 * @param array $database_settings 86 86 * @return AkDbAdapter … … 97 97 $database_specifications = Ak::getSettings('database', false, $settings_hash); 98 98 } else if (is_string($database_specifications)){ 99 99 100 100 $environment_settings = Ak::getSettings('database', false, $database_specifications); 101 101 102 102 if (!empty($environment_settings)){ 103 103 $database_specifications = $environment_settings; … … 109 109 if (isset($database_settings) && !file_exists(AK_CONFIG_DIR.DS.'database.yml')) { 110 110 trigger_error(Ak::t("You are still using the old config/config.php database configuration. Please upgrade to use the config/database.yml configuration."), E_USER_NOTICE); 111 } 111 } 112 112 if (!file_exists(AK_CONFIG_DIR.DS.'database.yml')) { 113 113 trigger_error(Ak::t("Could not find the database configuration file in %dbconfig.",array('%dbconfig'=>AK_CONFIG_DIR.DS.'database.yml')),E_USER_ERROR); … … 115 115 trigger_error(Ak::t("Could not find the database profile '%profile_name' in config/database.yml.",array('%profile_name'=>$database_specifications)),E_USER_ERROR); 116 116 } 117 118 117 118 119 119 $return = false; 120 120 return $return; … … 180 180 181 181 } 182 182 183 183 function _getDbSettingsFromDsn($dsn) 184 184 { … … 189 189 return $result; 190 190 } 191 191 192 192 function type() 193 193 { … … 355 355 function failTransaction() 356 356 { 357 if(AK_DEBUG && !empty($this->connection->debug)){ 358 Ak::trace(ak_backtrace(), null, null, null, false); 359 } 357 360 return $this->connection->FailTrans(); 358 361 } … … 384 387 if (($available_tables = AkDbSchemaCache::get('avaliable_tables')) === false) { 385 388 if(empty($available_tables)){ 386 $available_tables = $this->connection->MetaTables(); 389 $available_tables = $this->connection->MetaTables(); 387 390 } 388 391 AkDbSchemaCache::set('avaliable_tables', $available_tables); … … 394 397 return $available_tables; 395 398 } 396 399 397 400 function tableExists($table_name) 398 401 { … … 406 409 return true; 407 410 } 408 411 409 412 /** 410 413 * caching the meta info … … 413 416 * @return unknown 414 417 */ 415 418 416 419 function getColumnDetails($table_name) 417 420 {
