diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-01-06 20:51:39 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-01-06 20:51:39 +0000 |
commit | bfb3575c0950f2c0c1e22211a1efdf12e4efbd38 (patch) | |
tree | b83f55551ee8f27034ee7338a6d7ca4711940388 /modules/watchdog.module | |
parent | 89b2069e4dcc160835eefa0ba11da550c31bdafc (diff) | |
download | brdo-bfb3575c0950f2c0c1e22211a1efdf12e4efbd38.tar.gz brdo-bfb3575c0950f2c0c1e22211a1efdf12e4efbd38.tar.bz2 |
- Some usability improvements requested by Michael.
Diffstat (limited to 'modules/watchdog.module')
-rw-r--r-- | modules/watchdog.module | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/watchdog.module b/modules/watchdog.module index e1c9b4167..8f5e044d8 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -48,18 +48,16 @@ function watchdog_overview($type) { $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 .= "<table>"; - $output .= " <tr><th>" . t("date") . "</th><th>" . t("event") . "</th><th>" . t("user") . "</th><th colspan=\"2\">" . t("operations") . "</th></tr>"; while ($watchdog = db_fetch_object($result)) { if ($background = $color[$watchdog->type]) { - $output .= " <tr bgcolor=\"$background\"><td nowrap=\"nowrap\">". format_date($watchdog->timestamp, "small") ."</td><td>". substr(strip_tags($watchdog->message), 0, 64) ."</td><td align=\"center\">". format_name($watchdog) ."</a></td><td align=\"center\">$watchdog->link</td><td align=\"center\">". l(t("view details"), "admin/watchdog/view/$watchdog->wid") ."</td></tr>"; + $data .= " <tr bgcolor=\"$background\"><td nowrap=\"nowrap\">". format_date($watchdog->timestamp, "small") ."</td><td>". substr(strip_tags($watchdog->message), 0, 64) ."</td><td align=\"center\">". format_name($watchdog) ."</a></td><td align=\"center\">$watchdog->link</td><td align=\"center\">". l(t("view details"), "admin/watchdog/view/$watchdog->wid") ."</td></tr>"; } } - if ($pager = pager_display(NULL, 100, 0, "admin")) { - $output .= " <tr><td align=\"center\" colspan=\"4\">$pager</td></tr>"; - } - + $output .= "<table>"; + $output .= " <tr><th>" . t("date") . "</th><th>" . t("event") . "</th><th>" . t("user") . "</th><th colspan=\"2\">" . t("operations") . "</th></tr>"; + $output .= ($data ? $data : "<tr><td align=\"center\" colspan=\"4\" nowrap=\"nowrap\">". t("No system messages currently available.") ."</td></tr>"); + $output .= (($pager = pager_display(NULL, 100, 0, "admin")) ? "<tr><td align=\"center\" colspan=\"4\">$pager</td></tr>" : ""); $output .= "</table>"; return $output; |