Commit 282fbfd2 authored by Dries's avatar Dries
Browse files

- fixed problem with user_permission (reported by Kirstjan)
parent 171479fc
......@@ -10,7 +10,7 @@
function watchdog($id, $message) {
global $user, $watchdog, $watchdog_history;
if ($watchdog[$id][1] && !user_permission()) {
if ($watchdog[$id][1] && !user_permission($user)) {
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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment