summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/admin.module1
-rw-r--r--modules/watchdog.module12
-rw-r--r--modules/watchdog/watchdog.module12
3 files changed, 11 insertions, 14 deletions
diff --git a/modules/admin.module b/modules/admin.module
index a2ddfe73d..7dbe72714 100644
--- a/modules/admin.module
+++ b/modules/admin.module
@@ -69,6 +69,7 @@ function admin_page($mod) {
print module_invoke(arg(1), "admin");
}
else {
+ print "<h2>". t("System messages") ."</h2>";
print watchdog_overview("actions");
}
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;
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index e1c9b4167..8f5e044d8 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/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;