diff options
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; } |