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/help/help.module | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'modules/help') diff --git a/modules/help/help.module b/modules/help/help.module index 1fb68e743..b3fe02ef4 100644 --- a/modules/help/help.module +++ b/modules/help/help.module @@ -9,22 +9,26 @@ /** * Implementation of hook_menu(). */ -function help_menu() { +function help_menu($may_cache) { $items = array(); - $items[] = array('path' => 'admin/help', 'title' => t('help'), - 'callback' => 'help_main', - 'access' => user_access('access administration pages'), - 'weight' => 9); - foreach (module_list() as $name) { - if (module_hook($name, 'help')) { - $items[] = array('path' => 'admin/help/' . $name, - 'title' => t($name), - 'callback' => 'help_page', - 'type' => MENU_CALLBACK, - 'access' => user_access('access administration pages')); + if ($may_cache) { + $items[] = array('path' => 'admin/help', 'title' => t('help'), + 'callback' => 'help_main', + 'access' => user_access('access administration pages'), + 'weight' => 9); + + foreach (module_list() as $name) { + if (module_hook($name, 'help')) { + $items[] = array('path' => 'admin/help/' . $name, + 'title' => t($name), + 'callback' => 'help_page', + 'type' => MENU_CALLBACK, + 'access' => user_access('access administration pages')); + } } } + return $items; } -- cgit v1.2.3