From 38806b4a39a6bdfc9d4a09f86b7bbaf0173c298d Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 7 Apr 2001 15:02:28 +0000 Subject: - fixed bug in common.inc: throttle() - streamlined method invocation in node.inc - added node_status() function to modules - added NEW (mostly static) page module - added NEW settings module --- includes/common.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'includes/common.inc') 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"); -- cgit v1.2.3