summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 497e82f79..9761314aa 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -135,8 +135,8 @@ function error_handler($errno, $message, $filename, $line, $variables) {
function throttle($type, $rate) {
if (!user_access("access administration pages")) {
- if ($throttle = db_fetch_object(db_query("SELECT * FROM {watchdog} WHERE type = '%s' AND hostname = '%s' AND %d - timestamp < %d", $type, $_ENV['REMOTE_ADDR'], time(), $rate))) {
- watchdog("warning", "throttle: '". $_ENV['REMOTE_ADDR'] ."' exceeded submission rate - $throttle->type");
+ if ($throttle = db_fetch_object(db_query("SELECT * FROM {watchdog} WHERE type = '%s' AND hostname = '%s' AND %d - timestamp < %d", $type, $_SERVER['REMOTE_ADDR'], time(), $rate))) {
+ watchdog("warning", "throttle: '". $_SERVER['REMOTE_ADDR'] ."' exceeded submission rate - $throttle->type");
die(message_throttle());
}
}