summaryrefslogtreecommitdiff
path: root/modules/watchdog/watchdog.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-11-02 15:09:09 +0000
committerDries Buytaert <dries@buytaert.net>2004-11-02 15:09:09 +0000
commitb94f9af24f1dff4439051787adb6d2a60ed291ad (patch)
treedf288db913fd1a1dd5107c530fca494388c875ac /modules/watchdog/watchdog.module
parent95595ae6f821fd616a60031b166b035482736c10 (diff)
downloadbrdo-b94f9af24f1dff4439051787adb6d2a60ed291ad.tar.gz
brdo-b94f9af24f1dff4439051787adb6d2a60ed291ad.tar.bz2
- Patch #12455 by Steven: optimized SQL query. This problem caused Drupal.org's
cron runs to time out.
Diffstat (limited to 'modules/watchdog/watchdog.module')
-rw-r--r--modules/watchdog/watchdog.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index 31e305242..89f2d4f70 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/watchdog.module
@@ -74,7 +74,7 @@ function watchdog_perm() {
* Remove expired log messages.
*/
function watchdog_cron() {
- db_query('DELETE FROM {watchdog} WHERE '. time() .' - timestamp > '. variable_get('watchdog_clear', 604800));
+ db_query('DELETE FROM {watchdog} WHERE timestamp < %d', time() - variable_get('watchdog_clear', 604800));
}
/**