summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-10-02 07:05:43 +0000
committerDries Buytaert <dries@buytaert.net>2007-10-02 07:05:43 +0000
commit55cc439990e27c75cc233a65dd23b363cabe66b4 (patch)
treee12854065610a6e8e7ee183cd682ac324ee7cccb
parent1deae85075360c8bd58aa3259d6dae9fd9b64c8d (diff)
downloadbrdo-55cc439990e27c75cc233a65dd23b363cabe66b4.tar.gz
brdo-55cc439990e27c75cc233a65dd23b363cabe66b4.tar.bz2
- Patch #178044 by chx: properly delete watchdog messages captured by the dblog.module.
-rw-r--r--modules/dblog/dblog.module11
1 files changed, 2 insertions, 9 deletions
diff --git a/modules/dblog/dblog.module b/modules/dblog/dblog.module
index 32fc270b6..83dcd2309 100644
--- a/modules/dblog/dblog.module
+++ b/modules/dblog/dblog.module
@@ -97,15 +97,8 @@ function dblog_init() {
*/
function dblog_cron() {
// Cleanup the watchdog table
- $min = db_result(db_query('SELECT MIN(wid) FROM {watchdog}'));
- if ($min) {
- $max = db_result(db_query('SELECT MAX(wid) FROM {watchdog}'));
- if ($max) {
- if (($max - $min) > variable_get('dblog_row_limit', 1000)) {
- db_query('DELETE FROM {watchdog} WHERE wid < %d', $max - $min);
- }
- }
- }
+ $max = db_result(db_query('SELECT MAX(wid) FROM {watchdog}'));
+ db_query('DELETE FROM {watchdog} WHERE wid < %d', $max - variable_get('dblog_row_limit', 1000));
}
/**