summaryrefslogtreecommitdiff
path: root/modules/watchdog/watchdog.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-04-20 11:52:50 +0000
committerDries Buytaert <dries@buytaert.net>2002-04-20 11:52:50 +0000
commit8043cb998f3325731bfab8d82251fa49639aec1d (patch)
tree3774b206865eb631134c447aa36e90af762b8c5b /modules/watchdog/watchdog.module
parent0a966e1ed42d1b7d0827b0318bcefb7101ac56df (diff)
downloadbrdo-8043cb998f3325731bfab8d82251fa49639aec1d.tar.gz
brdo-8043cb998f3325731bfab8d82251fa49639aec1d.tar.bz2
- Applied Marco's big patch, including contributions from Moshe:
+ Changed the db_query() API. + Wrapped all links in l(), lm(), la(), ..., drupal_url() functions. + XHTML-ified some HTML. + Wrapped a lot of text in the administrative pages in a t() function. + Replaced all $REQUEST_URI/$PATH_INFOs by request_uri(). + Small bugfixes (eg. bug in book_export_html() and clean-ups (eg. RSS code). + Fixed some bugs in the taxonomy module (eg. tree making bug), added new functionality (eg. new APIs for use by other modules), included Moshe's taxonomy extensions, and some documentation udpates. + ...
Diffstat (limited to 'modules/watchdog/watchdog.module')
-rw-r--r--modules/watchdog/watchdog.module15
1 files changed, 12 insertions, 3 deletions
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index 5bcc38f9b..4a3a67705 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/watchdog.module
@@ -14,7 +14,7 @@ function watchdog_perm() {
function watchdog_link($type) {
if ($type == "admin" && user_access("administer watchdog")) {
- $links[] = "<a href=\"admin.php?mod=watchdog\">watchdog</a>";
+ $links[] = la(t("watchdog"), array("mod" => "watchdog"));
}
return $links ? $links : array();
@@ -40,7 +40,7 @@ function watchdog_overview($type) {
$output .= " <tr><th>date</th><th>message</th><th>user</th><th>operations</th></tr>";
while ($watchdog = db_fetch_object($result)) {
if ($background = $color[$watchdog->type]) {
- $output .= " <tr bgcolor=\"$background\"><td>". format_date($watchdog->timestamp, "small") ."</td><td>". substr(check_output($watchdog->message), 0, 64) ."</td><td align=\"center\">". format_name($watchdog) ."</a></td><td align=\"center\"><a href=\"admin.php?mod=watchdog&op=view&id=$watchdog->wid\">details</a></td></tr>";
+ $output .= " <tr bgcolor=\"$background\"><td>". format_date($watchdog->timestamp, "small") ."</td><td>". substr(check_output($watchdog->message), 0, 64) ."</td><td align=\"center\">". format_name($watchdog) ."</a></td><td align=\"center\">".la(t("details"), array("mod" => "watchdog", "op" => "view", "id" => $watchdog->wid))."</td></tr>";
}
}
$output .= "</table>";
@@ -70,7 +70,16 @@ function watchdog_admin() {
if (user_access("administer watchdog")) {
- print "<small><a href=\"admin.php?mod=watchdog&type=user\">user messages</a> | <a href=\"admin.php?mod=watchdog&type=regular\">regular messages</a> | <a href=\"admin.php?mod=watchdog&type=special\">special messages</a> | <a href=\"admin.php?mod=watchdog&type=warning\">warning messages</a> | <a href=\"admin.php?mod=watchdog&type=error\">error messages</a> | <a href=\"admin.php?mod=watchdog&type=httpd\">httpd messages</a> | <a href=\"admin.php?mod=watchdog\">overview</a> | <a href=\"admin.php?mod=watchdog&op=help\">help</a></small><hr />";
+ $links[] = la(t("user messages"), array("mod" => "watchdog", "type" => "user"));
+ $links[] = la(t("regular messages"), array("mod" => "watchdog", "type" => "regular"));
+ $links[] = la(t("special messages"), array("mod" => "watchdog", "type" => "special"));
+ $links[] = la(t("warning messages"), array("mod" => "watchdog", "type" => "warning"));
+ $links[] = la(t("error messages"), array("mod" => "watchdog", "type" => "error"));
+ $links[] = la(t("httpd messages"), array("mod" => "watchdog", "type" => "httpd"));
+ $links[] = la(t("overview"), array("mod" => "watchdog"));
+ $links[] = la(t("help"), array("mod" => "watchdog", "op" => "help"));
+
+ print "<small>".implode(" | ", $links)."</small><hr />";
switch ($op) {
case "help":