Commit 57b1bdae authored by Kjartan's avatar Kjartan
Browse files

- Made the log type menus conditonal

parent fed7e664
......@@ -57,8 +57,10 @@ function watchdog_link($type) {
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);
if (arg(1) == 'logs') {
foreach (_watchdog_get_message_types() as $type) {
menu("admin/logs/$type", t($type), user_access('administer watchdog') ? 'watchdog_admin' : MENU_DENIED, 0, MENU_SHOW, MENU_LOCKED);
}
}
}
}
......
......@@ -57,8 +57,10 @@ function watchdog_link($type) {
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);
if (arg(1) == 'logs') {
foreach (_watchdog_get_message_types() as $type) {
menu("admin/logs/$type", t($type), user_access('administer watchdog') ? 'watchdog_admin' : MENU_DENIED, 0, MENU_SHOW, MENU_LOCKED);
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment