diff --git a/index.php b/index.php index a6138fc8..ff1801c4 100644 --- a/index.php +++ b/index.php @@ -386,10 +386,6 @@ if(superAdmin()) { if(function_exists('memory_get_peak_usage')) { echo PHP_EOL . ''; } - - if($config['database_log']) { - echo PHP_EOL . ''; - } } $hooks->trigger(HOOK_FINISH); diff --git a/system/libs/pot/OTS_DB_MySQL.php b/system/libs/pot/OTS_DB_MySQL.php index d5c1ea26..c52d9415 100644 --- a/system/libs/pot/OTS_DB_MySQL.php +++ b/system/libs/pot/OTS_DB_MySQL.php @@ -149,6 +149,10 @@ class OTS_DB_MySQL extends OTS_Base_DB $cache->set('database_columns', serialize($this->has_column_cache)); $cache->set('database_checksum', serialize(sha1($config['database_host'] . '.' . $config['database_name']))); } + + if($this->logged) { + log_append('database.log', PHP_EOL . $this->getLog()); + } } /**