diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-09-16 07:17:56 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-09-16 07:17:56 +0000 |
commit | 5c7983c4deae55ad41b85ca99db54d3fce283fd9 (patch) | |
tree | 59801cd96a36c390586752c58d6cf5ba50c230ce /modules/help | |
parent | 6f0fd3aa55659f8bd6b023e8e82e990326c1b788 (diff) | |
download | brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.gz brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.bz2 |
- Patch #8179 by JonBob: reintroduced menu caching.
Diffstat (limited to 'modules/help')
-rw-r--r-- | modules/help/help.module | 28 |
1 files changed, 16 insertions, 12 deletions
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; } |