From 9c43e8fc7a192dfe768c76a539373915bddaa0aa Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 29 Jun 2001 22:08:57 +0000 Subject: Extremely large commit: - Fixed tiny quote problem in account.php. - Fixed tiny bug in comment.inc. - Fixed tiny bug in comment.module. - Fixed tiny bug in meta.module. - Simplified user_access() API. - Rewrote link system: still needs fine-tuning and testing so don't upgrade if you are running a production site. ;) Updated all modules and themes to reflect this change. All other themes and modules need updating too! --- modules/watchdog.module | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'modules/watchdog.module') diff --git a/modules/watchdog.module b/modules/watchdog.module index 23d4c8d28..fb70530ee 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -11,6 +11,14 @@ function watchdog_perm() { return array("access watchdog"); } +function watchdog_link($type) { + if ($type == "admin" && user_access("access watchdog")) { + $links[] = "watchdog"; + } + + return $links ? $links : array(); +} + function watchdog_conf_options() { $period = array(3600 => format_interval(3600), 10800 => format_interval(10800), 21600 => format_interval(21600), 32400 => format_interval(32400), 43200 => format_interval(43200), 86400 => format_interval(86400), 172800 => format_interval(172800), 259200 => format_interval(259200), 604800 => format_interval(604800), 1209600 => format_interval(1209600), 2419200 => format_interval(2419200), 1000000000 => t("Never")); $output .= form_select(t("Discard entries older than"), "watchdog_clear", variable_get("watchdog_clear", 604800), $period, t("The time watchdog entries should be kept. Older entries will be automatically discarded. Requires crontab.")); @@ -57,9 +65,9 @@ function watchdog_view($id) { } function watchdog_admin() { - global $user, $op, $id, $type, $order; + global $op, $id, $type, $order; - if (user_access($user, "access watchdog")) { + if (user_access("access watchdog")) { print "account messages | regular messages | special messages | warning messages | error messages | httpd messages | overview | help
\n"; -- cgit v1.2.3