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/taxonomy/taxonomy.module | |
parent | 6f0fd3aa55659f8bd6b023e8e82e990326c1b788 (diff) | |
download | brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.gz brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.bz2 |
- Patch #8179 by JonBob: reintroduced menu caching.
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; } |