summaryrefslogtreecommitdiff
path: root/modules/path/path.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/path/path.module')
-rw-r--r--modules/path/path.module40
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;
}