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/search.module | |
parent | 6f0fd3aa55659f8bd6b023e8e82e990326c1b788 (diff) | |
download | brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.gz brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.bz2 |
- Patch #8179 by JonBob: reintroduced menu caching.
Diffstat (limited to 'modules/search.module')
-rw-r--r-- | modules/search.module | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/modules/search.module b/modules/search.module index f42c1e2ba..c7422ac81 100644 --- a/modules/search.module +++ b/modules/search.module @@ -47,22 +47,26 @@ function search_link($type) { /** * Implementation of hook_menu(). */ -function search_menu() { +function search_menu($may_cache) { $items = array(); - $items[] = array('path' => 'search', 'title' => t('search'), - 'callback' => 'search_view', - 'access' => user_access('search content'), - 'type' => MENU_SUGGESTED_ITEM); - $items[] = array('path' => 'search/help', 'title' => t('search help'), - 'callback' => 'search_help_page', - 'access' => user_access('search content'), - 'type' => MENU_SUGGESTED_ITEM); - $items[] = array('path' => 'search/search', 'title' => t('search'), - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'search/configure', 'title' => t('configure'), - 'callback' => 'search_configure', - 'access' => user_access('administer site configuration'), - 'type' => MENU_LOCAL_TASK); + + if ($may_cache) { + $items[] = array('path' => 'search', 'title' => t('search'), + 'callback' => 'search_view', + 'access' => user_access('search content'), + 'type' => MENU_SUGGESTED_ITEM); + $items[] = array('path' => 'search/help', 'title' => t('search help'), + 'callback' => 'search_help_page', + 'access' => user_access('search content'), + 'type' => MENU_SUGGESTED_ITEM); + $items[] = array('path' => 'search/search', 'title' => t('search'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'search/configure', 'title' => t('configure'), + 'callback' => 'search_configure', + 'access' => user_access('administer site configuration'), + 'type' => MENU_LOCAL_TASK); + } + return $items; } |