diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/aggregator.module | 7 | ||||
-rw-r--r-- | modules/aggregator/aggregator.module | 7 | ||||
-rw-r--r-- | modules/archive.module | 2 | ||||
-rw-r--r-- | modules/archive/archive.module | 2 | ||||
-rw-r--r-- | modules/block.module | 2 | ||||
-rw-r--r-- | modules/block/block.module | 2 | ||||
-rw-r--r-- | modules/filter.module | 4 | ||||
-rw-r--r-- | modules/filter/filter.module | 4 | ||||
-rw-r--r-- | modules/menu.module | 3 | ||||
-rw-r--r-- | modules/menu/menu.module | 3 | ||||
-rw-r--r-- | modules/node.module | 22 | ||||
-rw-r--r-- | modules/node/node.module | 22 | ||||
-rw-r--r-- | modules/path.module | 5 | ||||
-rw-r--r-- | modules/path/path.module | 5 | ||||
-rw-r--r-- | modules/profile.module | 2 | ||||
-rw-r--r-- | modules/profile/profile.module | 2 | ||||
-rw-r--r-- | modules/search.module | 2 | ||||
-rw-r--r-- | modules/search/search.module | 2 | ||||
-rw-r--r-- | modules/taxonomy.module | 2 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 2 | ||||
-rw-r--r-- | modules/user.module | 38 | ||||
-rw-r--r-- | modules/user/user.module | 38 |
22 files changed, 104 insertions, 74 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module index 8d3f0d6fd..7a8983c78 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -129,7 +129,8 @@ function aggregator_menu() { 'callback' => 'aggregator_admin_refresh_feed', 'access' => $edit, 'type' => MENU_CALLBACK); - // Tabs: + $items[] = array('path' => 'admin/aggregator/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/aggregator/add/feed', 'title' => t('add feed'), 'callback' => 'aggregator_admin_edit_feed', 'access' => $edit, 'type' => MENU_LOCAL_TASK); @@ -159,6 +160,8 @@ function aggregator_menu() { while ($feed = db_fetch_object($result)) { $items[] = array('path' => 'aggregator/sources/'. $feed->fid, 'title' => $feed->title, 'callback' => 'aggregator_page_source', 'access' => $view); + $items[] = array('path' => 'aggregator/sources/'. $feed->fid .'/view', 'title' => t('view'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'aggregator/sources/'. $feed->fid .'/categorize', 'title' => t('categorize'), 'callback' => 'aggregator_page_source', 'access' => $edit, 'type' => MENU_LOCAL_TASK); @@ -173,6 +176,8 @@ function aggregator_menu() { while ($category = db_fetch_object($result)) { $items[] = array('path' => 'aggregator/categories/'. $category->cid, 'title' => $category->title, 'callback' => 'aggregator_page_category', 'access' => $view); + $items[] = array('path' => 'aggregator/categories/'. $category->cid .'/view', 'title' => t('view'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'aggregator/categories/'. $category->cid .'/categorize', 'title' => t('categorize'), 'callback' => 'aggregator_page_category', 'access' => $edit, 'type' => MENU_LOCAL_TASK); diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 8d3f0d6fd..7a8983c78 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -129,7 +129,8 @@ function aggregator_menu() { 'callback' => 'aggregator_admin_refresh_feed', 'access' => $edit, 'type' => MENU_CALLBACK); - // Tabs: + $items[] = array('path' => 'admin/aggregator/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/aggregator/add/feed', 'title' => t('add feed'), 'callback' => 'aggregator_admin_edit_feed', 'access' => $edit, 'type' => MENU_LOCAL_TASK); @@ -159,6 +160,8 @@ function aggregator_menu() { while ($feed = db_fetch_object($result)) { $items[] = array('path' => 'aggregator/sources/'. $feed->fid, 'title' => $feed->title, 'callback' => 'aggregator_page_source', 'access' => $view); + $items[] = array('path' => 'aggregator/sources/'. $feed->fid .'/view', 'title' => t('view'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'aggregator/sources/'. $feed->fid .'/categorize', 'title' => t('categorize'), 'callback' => 'aggregator_page_source', 'access' => $edit, 'type' => MENU_LOCAL_TASK); @@ -173,6 +176,8 @@ function aggregator_menu() { while ($category = db_fetch_object($result)) { $items[] = array('path' => 'aggregator/categories/'. $category->cid, 'title' => $category->title, 'callback' => 'aggregator_page_category', 'access' => $view); + $items[] = array('path' => 'aggregator/categories/'. $category->cid .'/view', 'title' => t('view'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'aggregator/categories/'. $category->cid .'/categorize', 'title' => t('categorize'), 'callback' => 'aggregator_page_category', 'access' => $edit, 'type' => MENU_LOCAL_TASK); diff --git a/modules/archive.module b/modules/archive.module index 50bea226a..db1c8e5f7 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -208,6 +208,8 @@ function archive_menu() { 'access' => user_access('access content'), 'callback' => 'archive_page', 'type' => MENU_SUGGESTED_ITEM); + $items[] = array('path' => 'archive/browse', 'title' => t('browse'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'archive/configure', 'title' => t('configure'), 'access' => user_access('administer site configuration'), 'callback' => 'archive_configure', diff --git a/modules/archive/archive.module b/modules/archive/archive.module index 50bea226a..db1c8e5f7 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -208,6 +208,8 @@ function archive_menu() { 'access' => user_access('access content'), 'callback' => 'archive_page', 'type' => MENU_SUGGESTED_ITEM); + $items[] = array('path' => 'archive/browse', 'title' => t('browse'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'archive/configure', 'title' => t('configure'), 'access' => user_access('administer site configuration'), 'callback' => 'archive_configure', diff --git a/modules/block.module b/modules/block.module index 3c9df6967..b7e66cbfd 100644 --- a/modules/block.module +++ b/modules/block.module @@ -67,6 +67,8 @@ function block_menu() { $items[] = array('path' => 'admin/block', 'title' => t('blocks'), 'access' => user_access('administer blocks'), 'callback' => 'block_admin'); + $items[] = array('path' => 'admin/block/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/block/edit', 'title' => t('edit block'), 'access' => user_access('administer blocks'), 'callback' => 'block_box_edit', diff --git a/modules/block/block.module b/modules/block/block.module index 3c9df6967..b7e66cbfd 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -67,6 +67,8 @@ function block_menu() { $items[] = array('path' => 'admin/block', 'title' => t('blocks'), 'access' => user_access('administer blocks'), 'callback' => 'block_admin'); + $items[] = array('path' => 'admin/block/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/block/edit', 'title' => t('edit block'), 'access' => user_access('administer blocks'), 'callback' => 'block_box_edit', diff --git a/modules/filter.module b/modules/filter.module index 4688d0bc0..dbb2eab99 100644 --- a/modules/filter.module +++ b/modules/filter.module @@ -52,7 +52,9 @@ function filter_menu() { $items[] = array('path' => 'admin/filters', 'title' => t('filters'), 'callback' => 'filter_admin_settings', 'access' => user_access('administer site configuration')); - $items[] = array('path' => 'admin/filters/order', 'title' => t('rearrange filters'), + $items[] = array('path' => 'admin/filters/configure', 'title' => t('configure'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'admin/filters/order', 'title' => t('rearrange'), 'callback' => 'filter_admin_order', 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK); diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 4688d0bc0..dbb2eab99 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -52,7 +52,9 @@ function filter_menu() { $items[] = array('path' => 'admin/filters', 'title' => t('filters'), 'callback' => 'filter_admin_settings', 'access' => user_access('administer site configuration')); - $items[] = array('path' => 'admin/filters/order', 'title' => t('rearrange filters'), + $items[] = array('path' => 'admin/filters/configure', 'title' => t('configure'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'admin/filters/order', 'title' => t('rearrange'), 'callback' => 'filter_admin_order', 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK); diff --git a/modules/menu.module b/modules/menu.module index 6177d99b2..438dc8de5 100644 --- a/modules/menu.module +++ b/modules/menu.module @@ -26,7 +26,8 @@ function menu_menu() { 'access' => user_access('administer menu'), 'type' => MENU_CALLBACK); - // Tabs: + $items[] = array('path' => 'admin/menu/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/menu/menu/add', 'title' => t('add menu'), 'callback' => 'menu_add_menu', 'access' => user_access('administer menu'), diff --git a/modules/menu/menu.module b/modules/menu/menu.module index 6177d99b2..438dc8de5 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -26,7 +26,8 @@ function menu_menu() { 'access' => user_access('administer menu'), 'type' => MENU_CALLBACK); - // Tabs: + $items[] = array('path' => 'admin/menu/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/menu/menu/add', 'title' => t('add menu'), 'callback' => 'menu_add_menu', 'access' => user_access('administer menu'), diff --git a/modules/node.module b/modules/node.module index fd188d34e..af41ab7a2 100644 --- a/modules/node.module +++ b/modules/node.module @@ -641,12 +641,18 @@ function node_menu() { $items[] = array('path' => 'admin/node', 'title' => t('content'), 'callback' => 'node_admin', 'access' => user_access('administer nodes')); - - // Tabs: + $items[] = array('path' => 'admin/node/overview', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/node/configure', 'title' => t('configure'), 'callback' => 'node_configure', 'access' => user_access('administer nodes'), 'type' => MENU_LOCAL_TASK); + $items[] = array('path' => 'admin/node/configure/settings', 'title' => t('settings'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'admin/node/configure/defaults', 'title' => t('default workflow'), + 'callback' => 'node_default_settings', + 'access' => user_access('administer nodes'), + 'type' => MENU_LOCAL_TASK); if (module_exist('search')) { $items[] = array('path' => 'admin/node/search', 'title' => t('search'), 'callback' => 'node_admin', @@ -654,16 +660,6 @@ function node_menu() { 'type' => MENU_LOCAL_TASK); } - // Subtabs: - $items[] = array('path' => 'admin/node/configure/settings', 'title' => t('settings'), - 'callback' => 'node_configure', - 'access' => user_access('administer nodes'), - 'type' => MENU_LOCAL_SUBTASK); - $items[] = array('path' => 'admin/node/configure/defaults', 'title' => t('default workflow'), - 'callback' => 'node_default_settings', - 'access' => user_access('administer nodes'), - 'type' => MENU_LOCAL_SUBTASK); - $items[] = array('path' => 'node', 'title' => t('content'), 'callback' => 'node_page', 'access' => user_access('access content'), @@ -681,6 +677,8 @@ function node_menu() { 'callback' => 'node_page', 'access' => user_access('access content'), 'type' => MENU_CALLBACK); + $items[] = array('path' => 'node/'. arg(1) .'/view', 'title' => t('view'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'node/'. arg(1) .'/edit', 'title' => t('edit'), 'callback' => 'node_page', 'access' => node_access('update', $node), diff --git a/modules/node/node.module b/modules/node/node.module index fd188d34e..af41ab7a2 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -641,12 +641,18 @@ function node_menu() { $items[] = array('path' => 'admin/node', 'title' => t('content'), 'callback' => 'node_admin', 'access' => user_access('administer nodes')); - - // Tabs: + $items[] = array('path' => 'admin/node/overview', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/node/configure', 'title' => t('configure'), 'callback' => 'node_configure', 'access' => user_access('administer nodes'), 'type' => MENU_LOCAL_TASK); + $items[] = array('path' => 'admin/node/configure/settings', 'title' => t('settings'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'admin/node/configure/defaults', 'title' => t('default workflow'), + 'callback' => 'node_default_settings', + 'access' => user_access('administer nodes'), + 'type' => MENU_LOCAL_TASK); if (module_exist('search')) { $items[] = array('path' => 'admin/node/search', 'title' => t('search'), 'callback' => 'node_admin', @@ -654,16 +660,6 @@ function node_menu() { 'type' => MENU_LOCAL_TASK); } - // Subtabs: - $items[] = array('path' => 'admin/node/configure/settings', 'title' => t('settings'), - 'callback' => 'node_configure', - 'access' => user_access('administer nodes'), - 'type' => MENU_LOCAL_SUBTASK); - $items[] = array('path' => 'admin/node/configure/defaults', 'title' => t('default workflow'), - 'callback' => 'node_default_settings', - 'access' => user_access('administer nodes'), - 'type' => MENU_LOCAL_SUBTASK); - $items[] = array('path' => 'node', 'title' => t('content'), 'callback' => 'node_page', 'access' => user_access('access content'), @@ -681,6 +677,8 @@ function node_menu() { 'callback' => 'node_page', 'access' => user_access('access content'), 'type' => MENU_CALLBACK); + $items[] = array('path' => 'node/'. arg(1) .'/view', 'title' => t('view'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'node/'. arg(1) .'/edit', 'title' => t('edit'), 'callback' => 'node_page', 'access' => node_access('update', $node), diff --git a/modules/path.module b/modules/path.module index 82d600a31..61e7046be 100644 --- a/modules/path.module +++ b/modules/path.module @@ -66,8 +66,9 @@ function path_menu() { 'callback' => 'path_admin_delete', 'access' => user_access('administer url aliases'), 'type' => MENU_CALLBACK); - // Tabs: - $items[] = array('path' => 'admin/path/add', 'title' => t('add alias'), + $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); diff --git a/modules/path/path.module b/modules/path/path.module index 82d600a31..61e7046be 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -66,8 +66,9 @@ function path_menu() { 'callback' => 'path_admin_delete', 'access' => user_access('administer url aliases'), 'type' => MENU_CALLBACK); - // Tabs: - $items[] = array('path' => 'admin/path/add', 'title' => t('add alias'), + $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); diff --git a/modules/profile.module b/modules/profile.module index 137e1a9b1..61eca0aa2 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -34,7 +34,7 @@ function profile_menu() { $items[] = array('path' => 'admin/user/configure/profile', 'title' => t('profiles'), 'callback' => 'profile_admin_overview', 'access' => user_access('administer users'), - 'type' => MENU_LOCAL_SUBTASK); + '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'), diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 137e1a9b1..61eca0aa2 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -34,7 +34,7 @@ function profile_menu() { $items[] = array('path' => 'admin/user/configure/profile', 'title' => t('profiles'), 'callback' => 'profile_admin_overview', 'access' => user_access('administer users'), - 'type' => MENU_LOCAL_SUBTASK); + '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'), diff --git a/modules/search.module b/modules/search.module index baf0809be..90e6de7c7 100644 --- a/modules/search.module +++ b/modules/search.module @@ -52,6 +52,8 @@ function search_menu() { 'callback' => 'search_help_page', 'access' => user_access('search content'), 'type' => MENU_SUGGESTED_ITEM); + $items[] = array('path' => 'search/search', 'title' => t('search'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'search/configure', 'title' => t('configure'), 'callback' => 'search_configure', 'access' => user_access('administer site configuration'), diff --git a/modules/search/search.module b/modules/search/search.module index baf0809be..90e6de7c7 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -52,6 +52,8 @@ function search_menu() { 'callback' => 'search_help_page', 'access' => user_access('search content'), 'type' => MENU_SUGGESTED_ITEM); + $items[] = array('path' => 'search/search', 'title' => t('search'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'search/configure', 'title' => t('configure'), 'callback' => 'search_configure', 'access' => user_access('administer site configuration'), diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 435d92095..5eae639fa 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -63,6 +63,8 @@ function taxonomy_menu() { $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'), diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 435d92095..5eae639fa 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -63,6 +63,8 @@ function taxonomy_menu() { $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'), diff --git a/modules/user.module b/modules/user.module index 4b5416910..e589869f2 100644 --- a/modules/user.module +++ b/modules/user.module @@ -605,6 +605,8 @@ function user_menu() { if (arg(0) == 'user' && is_numeric(arg(1))) { $items[] = array('path' => 'user/'. arg(1), 'title' => t('user'), 'callback' => 'user_page', 'access' => TRUE); + $items[] = array('path' => 'user/'. arg(1) .'/view', 'title' => t('view'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'user/'. arg(1) .'/edit', 'title' => t('edit'), 'callback' => 'user_edit', 'access' => $access || $user->uid == arg(1), 'type' => MENU_LOCAL_TASK); @@ -613,8 +615,8 @@ function user_menu() { if (($categories = _user_categories()) && (count($categories) > 1)) { foreach ($categories as $key => $category) { $items[] = array('path' => 'user/'. arg(1) .'/edit/'. $category['name'], 'title' => $category['title'], - 'callback' => $function, 'access' => $access || $user->uid == arg(1), - 'type' => MENU_LOCAL_SUBTASK, 'weight' => $category['weight']); + 'type' => $category['name'] == 'account' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK, + 'weight' => $category['weight']); } } } @@ -645,39 +647,37 @@ function user_menu() { $items[] = array('path' => 'admin/user', 'title' => t('users'), 'callback' => 'user_admin', 'access' => $access); - - // Tabs: - $items[] = array('path' => 'admin/user/create', 'title' => t('add user'), + $items[] = array('path' => 'admin/user/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'admin/user/create', 'title' => t('add'), 'callback' => 'user_admin', 'access' => $access, 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure', 'title' => t('configure'), 'callback' => 'user_configure', 'access' => $access, 'type' => MENU_LOCAL_TASK); - if (module_exist('search')) { - $items[] = array('path' => 'admin/user/search', 'title' => t('search'), - 'callback' => 'user_admin', 'access' => $access, - 'type' => MENU_LOCAL_TASK); - } - - // Sub-tabs: $items[] = array('path' => 'admin/user/configure/settings', 'title' => t('settings'), - 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/user/configure/access', 'title' => t('access rules'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure/access/mail', 'title' => t('e-mail rules'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure/access/user', 'title' => t('name rules'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure/role', 'title' => t('roles'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure/permission', 'title' => t('permissions'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); + + if (module_exist('search')) { + $items[] = array('path' => 'admin/user/search', 'title' => t('search'), + 'callback' => 'user_admin', 'access' => $access, + 'type' => MENU_LOCAL_TASK); + } return $items; } diff --git a/modules/user/user.module b/modules/user/user.module index 4b5416910..e589869f2 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -605,6 +605,8 @@ function user_menu() { if (arg(0) == 'user' && is_numeric(arg(1))) { $items[] = array('path' => 'user/'. arg(1), 'title' => t('user'), 'callback' => 'user_page', 'access' => TRUE); + $items[] = array('path' => 'user/'. arg(1) .'/view', 'title' => t('view'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'user/'. arg(1) .'/edit', 'title' => t('edit'), 'callback' => 'user_edit', 'access' => $access || $user->uid == arg(1), 'type' => MENU_LOCAL_TASK); @@ -613,8 +615,8 @@ function user_menu() { if (($categories = _user_categories()) && (count($categories) > 1)) { foreach ($categories as $key => $category) { $items[] = array('path' => 'user/'. arg(1) .'/edit/'. $category['name'], 'title' => $category['title'], - 'callback' => $function, 'access' => $access || $user->uid == arg(1), - 'type' => MENU_LOCAL_SUBTASK, 'weight' => $category['weight']); + 'type' => $category['name'] == 'account' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK, + 'weight' => $category['weight']); } } } @@ -645,39 +647,37 @@ function user_menu() { $items[] = array('path' => 'admin/user', 'title' => t('users'), 'callback' => 'user_admin', 'access' => $access); - - // Tabs: - $items[] = array('path' => 'admin/user/create', 'title' => t('add user'), + $items[] = array('path' => 'admin/user/list', 'title' => t('list'), + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'admin/user/create', 'title' => t('add'), 'callback' => 'user_admin', 'access' => $access, 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure', 'title' => t('configure'), 'callback' => 'user_configure', 'access' => $access, 'type' => MENU_LOCAL_TASK); - if (module_exist('search')) { - $items[] = array('path' => 'admin/user/search', 'title' => t('search'), - 'callback' => 'user_admin', 'access' => $access, - 'type' => MENU_LOCAL_TASK); - } - - // Sub-tabs: $items[] = array('path' => 'admin/user/configure/settings', 'title' => t('settings'), - 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'admin/user/configure/access', 'title' => t('access rules'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure/access/mail', 'title' => t('e-mail rules'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure/access/user', 'title' => t('name rules'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure/role', 'title' => t('roles'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'admin/user/configure/permission', 'title' => t('permissions'), 'callback' => 'user_configure', 'access' => $access, - 'type' => MENU_LOCAL_SUBTASK); + 'type' => MENU_LOCAL_TASK); + + if (module_exist('search')) { + $items[] = array('path' => 'admin/user/search', 'title' => t('search'), + 'callback' => 'user_admin', 'access' => $access, + 'type' => MENU_LOCAL_TASK); + } return $items; } |