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/profile/profile.module | |
parent | 6f0fd3aa55659f8bd6b023e8e82e990326c1b788 (diff) | |
download | brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.gz brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.bz2 |
- Patch #8179 by JonBob: reintroduced menu caching.
Diffstat (limited to 'modules/profile/profile.module')
-rw-r--r-- | modules/profile/profile.module | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module index e379d75db..2aef8aa03 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -26,30 +26,32 @@ function profile_help($section) { /** * Implementation of hook_menu(). */ -function profile_menu() { +function profile_menu($may_cache) { global $user; - $items = array(); - $items[] = array('path' => 'profile', 'title' => t('user list'), - 'callback' => 'profile_browse', - 'access' => TRUE, - 'type' => MENU_SUGGESTED_ITEM); - $items[] = array('path' => 'admin/user/configure/profile', 'title' => t('profiles'), - 'callback' => 'profile_admin_overview', - 'access' => user_access('administer users'), - 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/user/configure/profile/add', 'title' => t('add field'), - 'callback' => 'profile_admin_add', - 'access' => user_access('administer users'), - 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/user/configure/profile/edit', 'title' => t('edit field'), - 'callback' => 'profile_admin_edit', - 'access' => user_access('administer users'), - 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/user/configure/profile/delete', 'title' => t('delete field'), - 'callback' => 'profile_admin_delete', - 'access' => user_access('administer users'), - 'type' => MENU_CALLBACK); + + if ($may_cache) { + $items[] = array('path' => 'profile', 'title' => t('user list'), + 'callback' => 'profile_browse', + 'access' => TRUE, + 'type' => MENU_SUGGESTED_ITEM); + $items[] = array('path' => 'admin/user/configure/profile', 'title' => t('profiles'), + 'callback' => 'profile_admin_overview', + 'access' => user_access('administer users'), + 'type' => MENU_LOCAL_TASK); + $items[] = array('path' => 'admin/user/configure/profile/add', 'title' => t('add field'), + 'callback' => 'profile_admin_add', + 'access' => user_access('administer users'), + 'type' => MENU_CALLBACK); + $items[] = array('path' => 'admin/user/configure/profile/edit', 'title' => t('edit field'), + 'callback' => 'profile_admin_edit', + 'access' => user_access('administer users'), + 'type' => MENU_CALLBACK); + $items[] = array('path' => 'admin/user/configure/profile/delete', 'title' => t('delete field'), + 'callback' => 'profile_admin_delete', + 'access' => user_access('administer users'), + 'type' => MENU_CALLBACK); + } return $items; } |