From 5c7983c4deae55ad41b85ca99db54d3fce283fd9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 16 Sep 2004 07:17:56 +0000 Subject: - Patch #8179 by JonBob: reintroduced menu caching. --- modules/watchdog.module | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/watchdog.module') diff --git a/modules/watchdog.module b/modules/watchdog.module index 9be7a45f7..31e305242 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -43,17 +43,17 @@ function watchdog_help($section = 'admin/help#watchdog') { /** * Implementation of hook_menu(). */ -function watchdog_menu() { +function watchdog_menu($may_cache) { $items = array(); - $items[] = array('path' => 'admin/logs', 'title' => t('logs'), - 'callback' => 'watchdog_overview', 'access' => user_access('administer watchdog')); + if ($may_cache) { + $items[] = array('path' => 'admin/logs', 'title' => t('logs'), + 'callback' => 'watchdog_overview', 'access' => user_access('administer watchdog')); - $items[] = array('path' => 'admin/logs/view', 'title' => t('view details'), - 'callback' => 'watchdog_view', 'access' => user_access('administer watchdog'), - 'type' => MENU_CALLBACK); + $items[] = array('path' => 'admin/logs/view', 'title' => t('view details'), + 'callback' => 'watchdog_view', 'access' => user_access('administer watchdog'), + 'type' => MENU_CALLBACK); - if (arg(1) == 'logs') { foreach (_watchdog_get_message_types() as $type) { $items[] = array('path' => 'admin/logs/'. $type, 'title' => t($type), 'type' => MENU_DYNAMIC_ITEM); } @@ -105,7 +105,7 @@ function watchdog_overview($type = '') { l(t('details'), "admin/logs/view/$watchdog->wid") ), // Attributes for tr - 'class' => "watchdog-$watchdog->type" + 'class' => "watchdog-$watchdog->type" ); } -- cgit v1.2.3