- Made the log type menus conditonal

4.5.x
Kjartan Mannes 2004-05-17 14:19:46 +00:00
parent fed7e664de
commit 57b1bdae29
2 changed files with 8 additions and 4 deletions

View File

@ -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);
}
}
}
}

View File

@ -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);
}
}
}
}