From 8a636465767fc47f37a0768d45b86ca53a722085 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 4 Jan 2003 11:03:15 +0000 Subject: - Added an extra parameter to watchdog() which lets you specifiy an "action" or "operation" link. - Made the main page of the administration section show an overview of all watchdog entries with such action link. - Fixed typo in PostgreSQL database scheme. --- includes/common.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index db5bc4591..d9470bb3c 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -33,9 +33,9 @@ function error_handler($errno, $message, $filename, $line, $variables) { } } -function watchdog($type, $message) { +function watchdog($type, $message, $link = NULL) { global $user; - db_query("INSERT INTO watchdog (uid, type, message, location, hostname, timestamp) VALUES ('$user->uid', '%s', '%s', '%s', '%s', '%s')", $type, $message, request_uri(), getenv("REMOTE_ADDR"), time()); + db_query("INSERT INTO watchdog (uid, type, message, link, location, hostname, timestamp) VALUES ('$user->uid', '%s', '%s', '%s', '%s', '%s', '%s')", $type, $message, $link, request_uri(), getenv("REMOTE_ADDR"), time()); } function throttle($type, $rate) { -- cgit v1.2.3