Commit 17519d3e authored by Dries's avatar Dries

- Patch 0178 by eafarris: moved the watchdog colors to CSS so they are themeable.
parent 4fc259d7
......@@ -306,3 +306,22 @@ pre, code {
list-style-type: square;
list-style-image: url(menu-leaf.gif);
}
td.watchdog-user {
background: #ffeeaa;
}
td.watchdog-message {
background: #ffffff;
}
td.watchdog-special {
background: #a49fff;
}
td.watchdog-warning {
background: #ffaa22;
}
td.watchdog-httpd {
background: #99dd99;
}
td.watchdog-error {
background: #ee4c4c;
}
......@@ -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) {
......
......@@ -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) {
......
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