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/path/path.module | |
parent | 6f0fd3aa55659f8bd6b023e8e82e990326c1b788 (diff) | |
download | brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.gz brdo-5c7983c4deae55ad41b85ca99db54d3fce283fd9.tar.bz2 |
- Patch #8179 by JonBob: reintroduced menu caching.
Diffstat (limited to 'modules/path/path.module')
-rw-r--r-- | modules/path/path.module | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/modules/path/path.module b/modules/path/path.module index daa53bf58..20348d592 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -65,25 +65,29 @@ function conf_url_rewrite(\$path, \$mode = 'incoming') { /** * Implementation of hook_menu(). */ -function path_menu() { +function path_menu($may_cache) { $items = array(); - $items[] = array('path' => 'admin/path', 'title' => t('url aliases'), - 'callback' => 'path_admin', - 'access' => user_access('administer url aliases')); - $items[] = array('path' => 'admin/path/edit', 'title' => t('edit alias'), - 'callback' => 'path_admin_edit', - 'access' => user_access('administer url aliases'), - 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/path/delete', 'title' => t('delete alias'), - 'callback' => 'path_admin_delete', - 'access' => user_access('administer url aliases'), - 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/path/list', 'title' => t('list'), - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/path/add', 'title' => t('add'), - 'callback' => 'path_admin_edit', - 'access' => user_access('administer url aliases'), - 'type' => MENU_LOCAL_TASK); + + if ($may_cache) { + $items[] = array('path' => 'admin/path', 'title' => t('url aliases'), + 'callback' => 'path_admin', + 'access' => user_access('administer url aliases')); + $items[] = array('path' => 'admin/path/edit', 'title' => t('edit alias'), + 'callback' => 'path_admin_edit', + 'access' => user_access('administer url aliases'), + 'type' => MENU_CALLBACK); + $items[] = array('path' => 'admin/path/delete', 'title' => t('delete alias'), + 'callback' => 'path_admin_delete', + 'access' => user_access('administer url aliases'), + 'type' => MENU_CALLBACK); + $items[] = array('path' => 'admin/path/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'admin/path/add', 'title' => t('add'), + 'callback' => 'path_admin_edit', + 'access' => user_access('administer url aliases'), + 'type' => MENU_LOCAL_TASK); + } + return $items; } |