Index: modules/dblog/dblog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.module,v
retrieving revision 1.50
diff -u -p -r1.50 dblog.module
--- modules/dblog/dblog.module	6 Feb 2010 14:50:05 -0000	1.50
+++ modules/dblog/dblog.module	25 Feb 2010 18:41:46 -0000
@@ -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();
   }
