diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-01-24 14:48:36 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-01-24 14:48:36 +0000 |
commit | 03752e35a41992c3d61f2591980020c87af257e7 (patch) | |
tree | dd8d9f51a47716785083591d82ca873c201c1057 /modules/path/path.module | |
parent | d407de4cec606623a5946805d2d42b580ccb116b (diff) | |
download | brdo-03752e35a41992c3d61f2591980020c87af257e7.tar.gz brdo-03752e35a41992c3d61f2591980020c87af257e7.tar.bz2 |
- Patch #34755 by chx et al: faster menu system. HEAD is temporary broken and there is no upgrade path yet.
Diffstat (limited to 'modules/path/path.module')
-rw-r--r-- | modules/path/path.module | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/modules/path/path.module b/modules/path/path.module index b27d5afde..b52f47254 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -35,32 +35,37 @@ function path_help($section) { /** * Implementation of hook_menu(). */ -function path_menu($may_cache) { - $items = array(); - - if ($may_cache) { - $items[] = array('path' => 'admin/build/path', 'title' => t('URL aliases'), - 'description' => t('Change your site\'s URL paths by aliasing them.'), - 'callback' => 'path_admin', - 'access' => user_access('administer url aliases')); - $items[] = array('path' => 'admin/build/path/edit', 'title' => t('Edit alias'), - 'callback' => 'drupal_get_form', - 'callback arguments' => array('path_admin_edit'), - 'access' => user_access('administer url aliases'), - 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/build/path/delete', 'title' => t('Delete alias'), - 'callback' => 'drupal_get_form', - 'callback arguments' => array('path_admin_delete_confirm'), - 'access' => user_access('administer url aliases'), - 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/build/path/list', 'title' => t('List'), - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/build/path/add', 'title' => t('Add alias'), - 'callback' => 'drupal_get_form', - 'callback arguments' => array('path_admin_edit'), - 'access' => user_access('administer url aliases'), - 'type' => MENU_LOCAL_TASK); - } +function path_menu() { + $items['admin/build/path'] = array( + 'title' => t('URL aliases'), + 'description' => t('Change your site\'s URL paths by aliasing them.'), + 'page callback' => 'path_admin', + 'access arguments' => array('administer url aliases'), + ); + $items['admin/build/path/edit'] = array( + 'title' => t('Edit alias'), + 'page callback' => 'drupal_get_form', + 'page arguments' => array('path_admin_edit'), + 'type' => MENU_CALLBACK, + ); + $items['admin/build/path/delete'] = array( + 'title' => t('Delete alias'), + 'page callback' => 'drupal_get_form', + 'page arguments' => array('path_admin_delete_confirm'), + 'type' => MENU_CALLBACK, + ); + $items['admin/build/path/list'] = array( + 'title' => t('List'), + 'type' => MENU_DEFAULT_LOCAL_TASK, + 'weight' => -10, + ); + $items['admin/build/path/add'] = array( + 'title' => t('Add alias'), + 'page callback' => 'drupal_get_form', + 'page arguments' => array('path_admin_edit'), + 'access arguments' => array('administer url aliases'), + 'type' => MENU_LOCAL_TASK, + ); return $items; } |