summaryrefslogtreecommitdiff
path: root/modules/dblog
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-02-26 15:25:43 +0000
committerDries Buytaert <dries@buytaert.net>2010-02-26 15:25:43 +0000
commitabf19a337fcacb8f9eefda79a817c7d9c4c2458a (patch)
tree278f29c9ac6751006956a1e8f0b1ce40175cd2cd /modules/dblog
parentd86d55463347a9d29ca07b3f6c83f2b6fb98f398 (diff)
downloadbrdo-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.module6
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();
}