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. --- modules/watchdog/watchdog.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/watchdog/watchdog.module') diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index 396351953..eeabdd453 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -43,16 +43,16 @@ function watchdog_cron() { } function watchdog_overview($type) { - $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'"); + $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'", "actions" => "WHERE link != ''"); $result = pager_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY w.timestamp DESC", 100); $output .= ""; - $output .= " "; + $output .= " "; while ($watchdog = db_fetch_object($result)) { if ($background = $color[$watchdog->type]) { - $output .= " "; + $output .= " "; } } -- cgit v1.2.3
" . t("date") . "" . t("message") . "" . t("user") . "" . t("operations") . "
" . t("date") . "" . t("event") . "" . t("user") . "" . t("operations") . "
". format_date($watchdog->timestamp, "small") ."". substr(strip_tags($watchdog->message), 0, 64) ."". format_name($watchdog) ."". la(t("details"), array("mod" => "watchdog", "op" => "view", "id" => $watchdog->wid)) ."
". format_date($watchdog->timestamp, "small") ."". substr(strip_tags($watchdog->message), 0, 64) ."". format_name($watchdog) ."$watchdog->link". la(t("view details"), array("mod" => "watchdog", "op" => "view", "id" => $watchdog->wid)) ."