summaryrefslogtreecommitdiff
path: root/modules/watchdog/watchdog.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-04-21 13:56:38 +0000
committerDries Buytaert <dries@buytaert.net>2004-04-21 13:56:38 +0000
commit7231c88a326f92bdc2b1579ac6afb8f7f568170b (patch)
treeb7586493410910be188d97440dbdf1d44b084b91 /modules/watchdog/watchdog.module
parent7976678719f6e04ecda315a6088ee0eb3cfb0318 (diff)
downloadbrdo-7231c88a326f92bdc2b1579ac6afb8f7f568170b.tar.gz
brdo-7231c88a326f92bdc2b1579ac6afb8f7f568170b.tar.bz2
- Added support for 403 handling. Patch by JonBob. As a side benefit,
administrators will be able to define a custom 403 page, just as they can define 404 pages now. This needs to be documented in the "Changes since / migrating to ..." pages.
Diffstat (limited to 'modules/watchdog/watchdog.module')
-rw-r--r--modules/watchdog/watchdog.module16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index b32baa6be..6ca1cd3ba 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/watchdog.module
@@ -49,14 +49,16 @@ function watchdog_perm() {
return array("administer watchdog");
}
+/**
+ * Implementation of hook_link().
+ */
function watchdog_link($type) {
- if ($type == "system") {
- if (user_access("administer watchdog")) {
- menu("admin/logs", t("logs"), "watchdog_admin", 7);
- menu("admin/logs/view", t("view details"), "watchdog_admin", 0, MENU_HIDE, MENU_LOCKED);
- foreach (_watchdog_get_message_types() as $type) {
- menu("admin/logs/$type", t($type), "watchdog_admin");
- }
+ if ($type == 'system') {
+ menu('admin/logs', t('logs'), user_access('administer watchdog') ? 'watchdog_admin' : MENU_DENIED, 7);
+ menu('admin/logs/view', t('view details'), user_access('administer watchdog') ? 'watchdog_admin' : MENU_DENIED, 0, MENU_HIDE, MENU_LOCKED);
+
+ foreach (_watchdog_get_message_types() as $type) {
+ menu("admin/logs/$type", t($type), user_access('administer watchdog') ? 'watchdog_admin' : MENU_DENIED);
}
}
}