diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-02-26 15:25:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-02-26 15:25:43 +0000 |
commit | abf19a337fcacb8f9eefda79a817c7d9c4c2458a (patch) | |
tree | 278f29c9ac6751006956a1e8f0b1ce40175cd2cd /modules/dblog | |
parent | d86d55463347a9d29ca07b3f6c83f2b6fb98f398 (diff) | |
download | brdo-abf19a337fcacb8f9eefda79a817c7d9c4c2458a.tar.gz brdo-abf19a337fcacb8f9eefda79a817c7d9c4c2458a.tar.bz2 |
- Patch #319401 by andypost, Crell, hswong3i: properly force default database in the dblog module.
Diffstat (limited to 'modules/dblog')
-rw-r--r-- | modules/dblog/dblog.module | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/dblog/dblog.module b/modules/dblog/dblog.module index cbbd381a8..280989887 100644 --- a/modules/dblog/dblog.module +++ b/modules/dblog/dblog.module @@ -83,8 +83,6 @@ function dblog_init() { } } - - /** * Implements hook_cron(). * @@ -93,8 +91,8 @@ function dblog_init() { function dblog_cron() { // Cleanup the watchdog table if (variable_get('dblog_row_limit', 1000) > 0) { - $max = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField(); - db_delete('watchdog') + $max = Database::getConnection('default', 'default')->query('SELECT MAX(wid) FROM {watchdog}')->fetchField(); + Database::getConnection('default', 'default')->delete('watchdog') ->condition('wid', $max - variable_get('dblog_row_limit', 1000), '<=') ->execute(); } |