summaryrefslogtreecommitdiff
path: root/includes/watchdog.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-02-18 15:14:56 +0000
committerDries Buytaert <dries@buytaert.net>2001-02-18 15:14:56 +0000
commit4371b627d51ffc5af9498fa1877d8e519a5f2c6e (patch)
treebc83240be6329005e30a5c21ff83163397ca0fd1 /includes/watchdog.inc
parentc93bcff8b85a24fe200fe27bd4c8f860f7d01b9c (diff)
downloadbrdo-4371b627d51ffc5af9498fa1877d8e519a5f2c6e.tar.gz
brdo-4371b627d51ffc5af9498fa1877d8e519a5f2c6e.tar.bz2
- added fine-grained user permission system which allows us to give
certain users access to specific administration sections only. Ex. a FAQ maintainer can only edit the FAQ, and members of an "editorial board" can only edit comments, diaries and stories, .. - code review => rewrote include/user.inc which is much easier now - fixed 4 small bugs
Diffstat (limited to 'includes/watchdog.inc')
-rw-r--r--includes/watchdog.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/watchdog.inc b/includes/watchdog.inc
index 2eb0baf2c..da24d79d8 100644
--- a/includes/watchdog.inc
+++ b/includes/watchdog.inc
@@ -9,8 +9,8 @@ $watchdog = array("comment" => array("0", $submission_rate["comment"]),
function watchdog($id, $message) {
global $user, $watchdog, $watchdog_history;
-/*
- if ($watchdog[$id][1] && !user_permission($user)) {
+
+ if ($watchdog[$id][1] && !user_access($user, "watchdog")) {
if ($log = db_fetch_object(db_query("SELECT * FROM watchdog WHERE hostname = '". getenv("REMOTE_ADDR") ."' AND level = '". $watchdog[$id][0] ."'"))) {
if (time() - $log->timestamp < $watchdog[$id][1]) {
watchdog("warning", "'". getenv("REMOTE_ADDR") ."' exceeded '$id' submission rate");
@@ -19,7 +19,7 @@ function watchdog($id, $message) {
}
}
}
-*/
+
// Perform query to add new watchdog entry:
db_query("INSERT INTO watchdog (level, timestamp, user, message, location, hostname) VALUES ('". $watchdog[$id][0] ."', '". time() ."', '". check_input($user->id) ."', '". check_input($message) ."', '". check_input(getenv("REQUEST_URI")) ."', '". check_input(getenv("REMOTE_ADDR")) ."')");
}