diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-04-07 15:02:28 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-04-07 15:02:28 +0000 |
commit | 38806b4a39a6bdfc9d4a09f86b7bbaf0173c298d (patch) | |
tree | a445eab5750bd259731134cd31412305b55b8acb /includes/common.inc | |
parent | 8213f5b2627a6b63db9f84b572918bd7e3254dff (diff) | |
download | brdo-38806b4a39a6bdfc9d4a09f86b7bbaf0173c298d.tar.gz brdo-38806b4a39a6bdfc9d4a09f86b7bbaf0173c298d.tar.bz2 |
- 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
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"); |