diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 81127c22c..53f1aa4d0 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -16,6 +16,7 @@ function watchdog($type, $message) { } function throttle($type, $rate) { + global $user; if (!(user_access($user, "watchdog") || user_access($user, "comment") || user_access($user, "node"))) { if ($throttle = db_fetch_object(db_query("SELECT * FROM watchdog WHERE type = '$type' AND hostname = '". getenv("REMOTE_ADDR") ."' AND ". time() ." - timestamp < $rate"))) { watchdog("warning", "throttle: '". getenv("REMOTE_ADDR") ."' exceeded submission rate - $throttle->type"); |