From 2d1e9126cb10f52e7711ce121f8bdaa5bdc71aa4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 16 Sep 2001 11:33:14 +0000 Subject: - Added the new user module! --- modules/watchdog.module | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/watchdog.module') diff --git a/modules/watchdog.module b/modules/watchdog.module index b3b6cbc50..974914dba 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -30,16 +30,16 @@ function watchdog_cron() { } function watchdog_overview($type) { - $color = array(account => "#FFEEAA", message => "#FFFFFF", special => "#A49FFF", warning => "#FFAA22", httpd => "#99DD99", error => "#EE4C4C"); - $query = array(account => "WHERE type = 'account'", regular => "WHERE type = 'message'", special => "WHERE type = 'special'", warning => "WHERE type = 'warning'", error => "WHERE type = 'error'", httpd => "WHERE type = 'httpd'"); + $color = array(user => "#FFEEAA", message => "#FFFFFF", special => "#A49FFF", warning => "#FFAA22", httpd => "#99DD99", error => "#EE4C4C"); + $query = array(user => "WHERE type = 'user'", regular => "WHERE type = 'message'", special => "WHERE type = 'special'", warning => "WHERE type = 'warning'", error => "WHERE type = 'error'", httpd => "WHERE type = 'httpd'"); - $result = db_query("SELECT w.*, u.name FROM watchdog w LEFT JOIN users u ON w.user = u.id ". ($type ? $query[$type] : "") ." ORDER BY timestamp DESC LIMIT 1000"); + $result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN user u ON w.user = u.uid ". ($type ? $query[$type] : "") ." ORDER BY timestamp DESC LIMIT 1000"); $output .= "\n"; $output .= " \n"; while ($watchdog = db_fetch_object($result)) { if ($background = $color[$watchdog->type]) { - $output .= " \n"; + $output .= " \n"; } } $output .= "
datemessageuseroperations
". format_date($watchdog->timestamp, "small") ."". substr(check_output($watchdog->message), 0, 64) ."". format_name($watchdog->name) ."id\">details
". format_date($watchdog->timestamp, "small") ."". substr(check_output($watchdog->message), 0, 64) ."". format_name($watchdog) ."id\">details
\n"; @@ -48,13 +48,13 @@ function watchdog_overview($type) { } function watchdog_view($id) { - $result = db_query("SELECT l.*, u.name FROM watchdog l LEFT JOIN users u ON l.user = u.id WHERE l.id = '$id'"); + $result = db_query("SELECT l.*, u.name, u.uid FROM watchdog l LEFT JOIN user u ON l.user = u.uid WHERE l.id = '$id'"); if ($watchdog = db_fetch_object($result)) { $output .= "\n"; $output .= " \n"; $output .= " \n"; - $output .= " \n"; + $output .= " \n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; @@ -69,7 +69,7 @@ function watchdog_admin() { if (user_access("administer watchdog")) { - print "account messages | regular messages | special messages | warning messages | error messages | httpd messages | overview | help
\n"; + print "user messages | regular messages | special messages | warning messages | error messages | httpd messages | overview | help
\n"; switch ($op) { case "help": -- cgit v1.2.3
Type:". check_output($watchdog->type) ."
Date:". format_date($watchdog->timestamp, "large") ."
User:". format_name($watchdog->name) ."
User:". format_name($watchdog) ."
Location:". check_output($watchdog->location). "
Message:". check_output($watchdog->message) ."
Hostname:". check_output($watchdog->hostname) ."