diff options
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(); } |