From 17519d3ea0be83e05f32f0618a066b660f9a1b51 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 3 Dec 2003 15:00:02 +0000 Subject: - Patch 0178 by eafarris: moved the watchdog colors to CSS so they are themeable. --- modules/watchdog.module | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'modules/watchdog.module') diff --git a/modules/watchdog.module b/modules/watchdog.module index 44332e703..b03e75802 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -72,7 +72,6 @@ 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'", "actions" => "WHERE link != ''"); $header = array( @@ -86,15 +85,13 @@ function watchdog_overview($type) { $result = pager_query($sql, 50); while ($watchdog = db_fetch_object($result)) { - if ($background = $color[$watchdog->type]) { - $rows[] = array( - array("data" => format_date($watchdog->timestamp, "small"), "style" => "background-color: $background"), - array("data" => substr(strip_tags($watchdog->message), 0, 64), "style" => "background-color: $background"), - array("data" => format_name($watchdog), "style" => "background-color: $background"), - array("data" => $watchdog->link, "style" => "background-color: $background"), - array("data" => l(t("view details"), "admin/watchdog/view/$watchdog->wid"), "style" => "background-color: $background") - ); - } + $rows[] = array( + array("data" => format_date($watchdog->timestamp, "small"), "class" => "watchdog-$watchdog->type"), + array("data" => substr(strip_tags($watchdog->message), 0, 64), "class" => "watchdog-$watchdog->type"), + array("data" => format_name($watchdog), "class" => "watchdog-$watchdog->type"), + array("data" => $watchdog->link, "class" => "watchdog-$watchdog->type"), + array("data" => l(t("view details"), "admin/watchdog/view/$watchdog->wid"), "class" => "watchdog-$watchdog->type") + ); } if (!$rows) { -- cgit v1.2.3