diff options
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 8754d5da3..819194da4 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/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; } |