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/taxonomy.module | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'modules/taxonomy.module') diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 8754d5da3..819194da4 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -47,22 +47,26 @@ function taxonomy_link($type, $node = NULL) { /** * Implementation of hook_menu(). */ -function taxonomy_menu() { +function taxonomy_menu($may_cache) { $items = array(); - $items[] = array('path' => 'admin/taxonomy', 'title' => t('categories'), - 'callback' => 'taxonomy_admin', - 'access' => user_access('administer taxonomy')); - $items[] = array('path' => 'admin/taxonomy/list', 'title' => t('list'), - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/taxonomy/add/vocabulary', 'title' => t('add vocabulary'), - 'callback' => 'taxonomy_admin', - 'access' => user_access('administer taxonomy'), - 'type' => MENU_LOCAL_TASK); - - $items[] = array('path' => 'taxonomy/term', 'title' => t('taxonomy term'), - 'callback' => 'taxonomy_term_page', - 'access' => user_access('access content'), - 'type' => MENU_CALLBACK); + + if ($may_cache) { + $items[] = array('path' => 'admin/taxonomy', 'title' => t('categories'), + 'callback' => 'taxonomy_admin', + 'access' => user_access('administer taxonomy')); + $items[] = array('path' => 'admin/taxonomy/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'admin/taxonomy/add/vocabulary', 'title' => t('add vocabulary'), + 'callback' => 'taxonomy_admin', + 'access' => user_access('administer taxonomy'), + 'type' => MENU_LOCAL_TASK); + + $items[] = array('path' => 'taxonomy/term', 'title' => t('taxonomy term'), + 'callback' => 'taxonomy_term_page', + 'access' => user_access('access content'), + 'type' => MENU_CALLBACK); + } + return $items; } -- cgit v1.2.3