diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 88dc5b8..be98eff 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -2755,15 +2755,9 @@ function menu_router_build($save = FALSE) { unset($callbacks[$path]['route_name']); } // If the menu item references a route, normalize the route information - // into the old structure. Note that routes are keyed by name, not path, - // so the path of the route takes precedence. + // into the old structure. if (isset($router_item['route_name'])) { - $router_item['page callback'] = 'USES_ROUTE'; - $router_item['access callback'] = TRUE; - $new_path = _menu_router_translate_route($router_item['route_name']); - - unset($callbacks[$path]); - $callbacks[$new_path] = $router_item; + $callbacks[$path]['page callback'] = 'USES_ROUTE'; } } list($menu, $masks) = _menu_router_build($callbacks, $save); diff --git a/core/modules/action/action.module b/core/modules/action/action.module index a1f2a14..3432672 100644 --- a/core/modules/action/action.module +++ b/core/modules/action/action.module @@ -58,12 +58,12 @@ function action_menu() { 'description' => 'Manage the actions defined for your site.', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/config/system/actions/add'] = array( + $items['admin/config/system/actions/add/%'] = array( 'title' => 'Create an advanced action', 'type' => MENU_VISIBLE_IN_BREADCRUMB, 'route_name' => 'action.admin_add', ); - $items['admin/config/system/actions/configure'] = array( + $items['admin/config/system/actions/configure/%'] = array( 'title' => 'Configure an advanced action', 'type' => MENU_VISIBLE_IN_BREADCRUMB, 'route_name' => 'action.admin_configure', diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module index c2da795..8c61ccf 100644 --- a/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -111,11 +111,11 @@ function aggregator_menu() { 'type' => MENU_LOCAL_ACTION, 'route_name' => 'aggregator.opml_add', ); - $items['admin/config/services/aggregator/remove/%aggregator_feed'] = array( + $items['admin/config/services/aggregator/remove/%'] = array( 'title' => 'Remove items', 'route_name' => 'aggregator.feed_items_delete', ); - $items['admin/config/services/aggregator/update/%aggregator_feed'] = array( + $items['admin/config/services/aggregator/update/%'] = array( 'title' => 'Update items', 'route_name' => 'aggregator.feed_refresh', ); @@ -143,59 +143,59 @@ function aggregator_menu() { 'title' => 'Categories', 'route_name' => 'aggregator.categories', ); - $items['aggregator/categories/%aggregator_category'] = array( + $items['aggregator/categories/%'] = array( 'title callback' => '_aggregator_category_title', 'title arguments' => array(2), 'route_name' => 'aggregator.category_view', ); - $items['aggregator/categories/%aggregator_category/view'] = array( + $items['aggregator/categories/%/view'] = array( 'title' => 'View', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['aggregator/categories/%aggregator_category/categorize'] = array( + $items['aggregator/categories/%/categorize'] = array( 'title' => 'Categorize', 'type' => MENU_LOCAL_TASK, 'route_name' => 'aggregator.categorize_category_form', ); - $items['aggregator/categories/%aggregator_category/configure'] = array( + $items['aggregator/categories/%/configure'] = array( 'title' => 'Configure', 'type' => MENU_LOCAL_TASK, 'weight' => 10, 'route_name' => 'aggregator.category_edit', ); - $items['aggregator/sources/%aggregator_feed'] = array( + $items['aggregator/sources/%'] = array( 'title callback' => 'entity_page_label', 'title arguments' => array(2), 'route_name' => 'aggregator.feed_view', ); - $items['aggregator/sources/%aggregator_feed/view'] = array( + $items['aggregator/sources/%/view'] = array( 'title' => 'View', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['aggregator/sources/%aggregator_feed/categorize'] = array( + $items['aggregator/sources/%/categorize'] = array( 'title' => 'Categorize', 'route_name' => 'aggregator.categorize_feed_form', 'type' => MENU_LOCAL_TASK, ); - $items['aggregator/sources/%aggregator_feed/configure'] = array( + $items['aggregator/sources/%/configure'] = array( 'title' => 'Configure', 'route_name' => 'aggregator.feed_configure', 'type' => MENU_LOCAL_TASK, 'weight' => 10, ); - $items['admin/config/services/aggregator/edit/feed/%aggregator_feed'] = array( + $items['admin/config/services/aggregator/edit/feed/%'] = array( 'title' => 'Edit feed', 'route_name' => 'aggregator.feed_edit', ); - $items['admin/config/services/aggregator/delete/feed/%aggregator_feed'] = array( + $items['admin/config/services/aggregator/delete/feed/%'] = array( 'title' => 'Delete feed', 'route_name' => 'aggregator.feed_delete', ); - $items['admin/config/services/aggregator/edit/category/%aggregator_category'] = array( + $items['admin/config/services/aggregator/edit/category/%'] = array( 'title' => 'Edit category', 'route_name' => 'aggregator.category_admin_edit', ); - $items['admin/config/services/aggregator/delete/category/%aggregator_category'] = array( + $items['admin/config/services/aggregator/delete/category/%'] = array( 'title' => 'Delete category', 'route_name' => 'aggregator.category_delete', ); diff --git a/core/modules/block/block.module b/core/modules/block/block.module index f1112d6..c0f0fc0 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -108,16 +108,16 @@ function block_menu() { 'title' => 'Block layout', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/structure/block/manage/%block'] = array( + $items['admin/structure/block/manage/%'] = array( 'title' => 'Configure block', 'route_name' => 'block.admin_edit', ); - $items['admin/structure/block/manage/%block/configure'] = array( + $items['admin/structure/block/manage/%/configure'] = array( 'title' => 'Configure block', 'type' => MENU_DEFAULT_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, ); - $items['admin/structure/block/add/%/%'] = array( + $items['admin/structure/block/add/%'] = array( 'title' => 'Place block', 'type' => MENU_VISIBLE_IN_BREADCRUMB, 'route_name' => 'block.admin_add', diff --git a/core/modules/block/custom_block/custom_block.module b/core/modules/block/custom_block/custom_block.module index 8e81778..27c6782 100644 --- a/core/modules/block/custom_block/custom_block.module +++ b/core/modules/block/custom_block/custom_block.module @@ -87,13 +87,13 @@ function custom_block_menu() { 'type' => MENU_SIBLING_LOCAL_TASK, 'weight' => 1, ); - $items['admin/structure/block/custom-blocks/manage/%custom_block_type'] = array( + $items['admin/structure/block/custom-blocks/manage/%'] = array( 'title' => 'Edit custom block type', 'title callback' => 'entity_page_label', 'title arguments' => array(5), 'route_name' => 'custom_block.type_edit', ); - $items['admin/structure/block/custom-blocks/manage/%custom_block_type/edit'] = array( + $items['admin/structure/block/custom-blocks/manage/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, @@ -102,23 +102,23 @@ function custom_block_menu() { 'title' => 'Add custom block', 'route_name' => 'custom_block.add_page', ); - $items['block/add/%custom_block_type'] = array( + $items['block/add/%'] = array( 'title' => 'Add custom block', 'description' => 'Add custom block', 'route_name' => 'custom_block.add_form' ); // There has to be a base-item in order for contextual links to work. - $items['block/%custom_block'] = array( + $items['block/%'] = array( 'title' => 'Edit', 'route_name' => 'custom_block.edit', ); - $items['block/%custom_block/edit'] = array( + $items['block/%/edit'] = array( 'title' => 'Edit', 'weight' => 0, 'type' => MENU_DEFAULT_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, ); - $items['block/%custom_block/delete'] = array( + $items['block/%/delete'] = array( 'title' => 'Delete', 'weight' => 1, 'type' => MENU_LOCAL_TASK, diff --git a/core/modules/block/custom_block/tests/modules/custom_block_test/custom_block_test.module b/core/modules/block/custom_block/tests/modules/custom_block_test/custom_block_test.module index b9e848c..b8497f1 100644 --- a/core/modules/block/custom_block/tests/modules/custom_block_test/custom_block_test.module +++ b/core/modules/block/custom_block/tests/modules/custom_block_test/custom_block_test.module @@ -89,7 +89,7 @@ function custom_block_test_custom_block_insert(CustomBlock $custom_block) { function custom_block_test_menu() { $items = array(); // Add a block-view callback. - $items['custom-block/%custom_block'] = array( + $items['custom-block/%'] = array( 'title callback' => 'entity_page_label', 'title arguments' => array(1), 'route_name' => 'custom_block_test.custom_block_view', diff --git a/core/modules/book/book.module b/core/modules/book/book.module index aef8a52..5f010be 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -187,13 +187,13 @@ function book_menu() { 'route_name' => 'book.render', 'type' => MENU_SUGGESTED_ITEM, ); - $items['node/%node/outline'] = array( + $items['node/%/outline'] = array( 'title' => 'Outline', 'route_name' => 'book.outline', 'type' => MENU_LOCAL_TASK, 'weight' => 2, ); - $items['node/%node/outline/remove'] = array( + $items['node/%/outline/remove'] = array( 'title' => 'Remove from outline', 'route_name' => 'book.remove', ); diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 2034cda..99167af 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -223,27 +223,27 @@ function comment_menu() { 'route_name' => 'comment.admin_approval', 'type' => MENU_LOCAL_TASK, ); - $items['comment/%comment'] = array( + $items['comment/%'] = array( 'title' => 'Comment permalink', 'route_name' => 'comment.permalink', ); - $items['comment/%comment/view'] = array( + $items['comment/%/view'] = array( 'title' => 'View comment', 'type' => MENU_DEFAULT_LOCAL_TASK, ); // Every other comment path uses %, but this one loads the comment directly, // so we don't end up loading it twice (in the page and access callback). - $items['comment/%comment/edit'] = array( + $items['comment/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_LOCAL_TASK, 'route_name' => 'comment.edit_page', ); - $items['comment/%comment/approve'] = array( + $items['comment/%/approve'] = array( 'title' => 'Approve', 'weight' => 10, 'route_name' => 'comment.approve', ); - $items['comment/%comment/delete'] = array( + $items['comment/%/delete'] = array( 'title' => 'Delete', 'type' => MENU_LOCAL_TASK, 'route_name' => 'comment.confirm_delete', diff --git a/core/modules/config/tests/config_test/config_test.module b/core/modules/config/tests/config_test/config_test.module index 9c0b042..f6bbf3a 100644 --- a/core/modules/config/tests/config_test/config_test.module +++ b/core/modules/config/tests/config_test/config_test.module @@ -18,18 +18,18 @@ function config_test_menu() { 'title' => 'Test configuration', 'route_name' => 'config_test.list_page', ); - $items['admin/structure/config_test/manage/%config_test'] = array( + $items['admin/structure/config_test/manage/%'] = array( 'route_name' => 'config_test.entity', ); - $items['admin/structure/config_test/manage/%config_test/delete'] = array( + $items['admin/structure/config_test/manage/%/delete'] = array( 'title' => 'Delete', 'route_name' => 'config_test.entity_delete', ); - $items['admin/structure/config_test/manage/%config_test/enable'] = array( + $items['admin/structure/config_test/manage/%/enable'] = array( 'title' => 'Enable', 'route_name' => 'config_test.entity_enable', ); - $items['admin/structure/config_test/manage/%config_test/disable'] = array( + $items['admin/structure/config_test/manage/%/disable'] = array( 'title' => 'Disable', 'route_name' => 'config_test.entity_disable', ); diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 4cdea75..a155ce5 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -69,11 +69,11 @@ function contact_menu() { 'type' => MENU_LOCAL_ACTION, 'weight' => 1, ); - $items['admin/structure/contact/manage/%contact_category'] = array( + $items['admin/structure/contact/manage/%'] = array( 'title' => 'Edit contact category', 'route_name' => 'contact.category_edit', ); - $items['admin/structure/contact/manage/%contact_category/edit'] = array( + $items['admin/structure/contact/manage/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, ); @@ -84,14 +84,14 @@ function contact_menu() { 'menu_name' => 'footer', 'type' => MENU_SUGGESTED_ITEM, ); - $items['contact/%contact_category'] = array( + $items['contact/%'] = array( 'title' => 'Contact category form', 'title callback' => 'entity_page_label', 'title arguments' => array(1), 'route_name' => 'contact.site_page_category', 'type' => MENU_VISIBLE_IN_BREADCRUMB, ); - $items['user/%user/contact'] = array( + $items['user/%/contact'] = array( 'title' => 'Contact', 'route_name' => 'contact.personal_page', 'type' => MENU_LOCAL_TASK, diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module index 992e6ef..377ed03 100644 --- a/core/modules/field/tests/modules/field_test/field_test.module +++ b/core/modules/field/tests/modules/field_test/field_test.module @@ -41,7 +41,7 @@ function field_test_permission() { */ function field_test_menu() { $items = array(); - $items['test-entity/nested/%entity_test/%entity_test'] = array( + $items['test-entity/nested/%/%'] = array( 'title' => 'Nested entity form', 'route_name' => 'field_test.entity_nested_form', ); diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index 0d81232..1b8cc44 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -69,8 +69,7 @@ function field_ui_menu() { foreach (entity_get_info() as $entity_type => $entity_info) { if ($entity_info['fieldable'] && isset($entity_info['route_base_path'])) { // Extract path information from the entity type. - $path = $entity_info['route_base_path']; - $default_path = preg_replace('/{' . DRUPAL_PHP_FUNCTION_PATTERN . '}/', '%', $path); + $path = preg_replace('/{' . DRUPAL_PHP_FUNCTION_PATTERN . '}/', '%', $entity_info['route_base_path']); // This is the position of the %field_ui_instance placeholder in the // items below. $field_position = count(explode('/', $path)) + 1; @@ -86,7 +85,7 @@ function field_ui_menu() { 'title arguments' => array($field_position), 'route_name' => "field_ui.instance_edit_$entity_type", ); - $items["$default_path/fields/%/edit"] = array( + $items["$path/fields/%/edit"] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, ); @@ -125,11 +124,11 @@ function field_ui_menu() { // modes available for customisation. So we define menu items for all // view modes, and use a route requirement to determine which ones are // actually visible for a given bundle. - $items["$default_path/form-display/default"] = array( + $items["$path/form-display/default"] = array( 'title' => t('Default'), 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items["$default_path/display/default"] = array( + $items["$path/display/default"] = array( 'title' => t('Default'), 'type' => MENU_DEFAULT_LOCAL_TASK, ); diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index 4593c72..80077d2 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -108,7 +108,7 @@ function forum_menu() { 'title' => 'Forums', 'route_name' => 'forum.index', ); - $items['forum/%forum'] = array( + $items['forum/%'] = array( 'title' => 'Forums', 'title callback' => 'entity_page_label', 'title arguments' => array(1), @@ -130,15 +130,15 @@ function forum_menu() { 'parent' => 'admin/structure/forum', 'route_name' => 'forum.settings', ); - $items['admin/structure/forum/edit/container/%taxonomy_term'] = array( + $items['admin/structure/forum/edit/container/%'] = array( 'title' => 'Edit container', 'route_name' => 'forum.edit_container', ); - $items['admin/structure/forum/edit/forum/%taxonomy_term'] = array( + $items['admin/structure/forum/edit/forum/%'] = array( 'title' => 'Edit forum', 'route_name' => 'forum.edit_forum', ); - $items['admin/structure/forum/delete/forum/%taxonomy_term'] = array( + $items['admin/structure/forum/delete/forum/%'] = array( 'title' => 'Delete forum', 'route_name' => 'forum.delete', ); diff --git a/core/modules/image/image.module b/core/modules/image/image.module index 76d0bd7..4da5fc3 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -93,12 +93,12 @@ function image_menu() { 'description' => 'List the current image styles on the site.', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/config/media/image-styles/manage/%image_style'] = array( + $items['admin/config/media/image-styles/manage/%'] = array( 'title' => 'Edit style', 'description' => 'Configure an image style.', 'route_name' => 'image.style_edit', ); - $items['admin/config/media/image-styles/manage/%image_style/edit'] = array( + $items['admin/config/media/image-styles/manage/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, ); @@ -107,7 +107,7 @@ function image_menu() { 'description' => 'Edit an existing effect within a style.', 'route_name' => 'image.effect_edit_form', ); - $items['admin/config/media/image-styles/manage/%image_style/effects/%/delete'] = array( + $items['admin/config/media/image-styles/manage/%/effects/%/delete'] = array( 'title' => 'Delete image effect', 'description' => 'Delete an existing effect from a style.', 'route_name' => 'image.effect_delete', diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 9a67e37..39f3f49 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -81,11 +81,11 @@ function language_menu() { 'route_name' => 'language.add', 'type' => MENU_SIBLING_LOCAL_TASK, ); - $items['admin/config/regional/language/edit/%language'] = array( + $items['admin/config/regional/language/edit/%'] = array( 'title' => 'Edit language', 'route_name' => 'language.edit', ); - $items['admin/config/regional/language/edit/%language/edit'] = array( + $items['admin/config/regional/language/edit/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index 189c479..97d2e31 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -85,26 +85,26 @@ function menu_menu() { 'type' => MENU_LOCAL_TASK, 'weight' => 100, ); - $items['admin/structure/menu/manage/%menu'] = array( + $items['admin/structure/menu/manage/%'] = array( 'title' => 'Edit menu', 'route_name' => 'menu.menu_edit', 'title callback' => 'entity_page_label', 'title arguments' => array(4), ); - $items['admin/structure/menu/manage/%menu/edit'] = array( + $items['admin/structure/menu/manage/%/edit'] = array( 'title' => 'Edit menu', 'type' => MENU_DEFAULT_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, ); - $items['admin/structure/menu/item/%menu_link/edit'] = array( + $items['admin/structure/menu/item/%/edit'] = array( 'title' => 'Edit menu link', 'route_name' => 'menu.link_edit', ); - $items['admin/structure/menu/item/%menu_link/reset'] = array( + $items['admin/structure/menu/item/%/reset'] = array( 'title' => 'Reset menu link', 'route_name' => 'menu.link_reset', ); - $items['admin/structure/menu/item/%menu_link/delete'] = array( + $items['admin/structure/menu/item/%/delete'] = array( 'title' => 'Delete menu link', 'route_name' => 'menu.link_delete', ); diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 2468f38..705f276 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -991,13 +991,13 @@ function node_menu() { 'route_name' => 'node.type_add', 'type' => MENU_LOCAL_ACTION, ); - $items['admin/structure/types/manage/%node_type'] = array( + $items['admin/structure/types/manage/%'] = array( 'title' => 'Edit content type', 'title callback' => 'entity_page_label', 'title arguments' => array(4), 'route_name' => 'node.type_edit', ); - $items['admin/structure/types/manage/%node_type/edit'] = array( + $items['admin/structure/types/manage/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, ); @@ -1005,52 +1005,52 @@ function node_menu() { 'title' => 'Add content', 'route_name' => 'node.add_page', ); - $items['node/add/%node_type'] = array( + $items['node/add/%'] = array( 'title callback' => 'entity_page_label', 'title arguments' => array(2), 'description callback' => 'node_type_get_description', 'description arguments' => array(2), 'route_name' => 'node.add', ); - $items['node/%node'] = array( + $items['node/%'] = array( 'title callback' => 'node_page_title', 'title arguments' => array(1), // The controller also sets the #title in case the routes' title is // overridden by a menu link. 'route_name' => 'node.view', ); - $items['node/%node/view'] = array( + $items['node/%/view'] = array( 'title' => 'View', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['node/%node/edit'] = array( + $items['node/%/edit'] = array( 'title' => 'Edit', 'route_name' => 'node.page_edit', 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, ); - $items['node/%node/delete'] = array( + $items['node/%/delete'] = array( 'title' => 'Delete', 'route_name' => 'node.delete_confirm', 'weight' => 10, 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_INLINE, ); - $items['node/%node/revisions'] = array( + $items['node/%/revisions'] = array( 'title' => 'Revisions', 'route_name' => 'node.revision_overview', 'weight' => 20, 'type' => MENU_LOCAL_TASK, ); - $items['node/%node/revisions/%node_revision/view'] = array( + $items['node/%/revisions/%/view'] = array( 'title' => 'Revisions', 'route_name' => 'node.revision_show', ); - $items['node/%node/revisions/%node_revision/revert'] = array( + $items['node/%/revisions/%/revert'] = array( 'title' => 'Revert to earlier revision', 'route_name' => 'node.revision_revert_confirm', ); - $items['node/%node/revisions/%node_revision/delete'] = array( + $items['node/%/revisions/%/delete'] = array( 'title' => 'Delete earlier revision', 'route_name' => 'node.revision_delete_confirm', ); diff --git a/core/modules/path/path.module b/core/modules/path/path.module index 1cdcc49..3311f2e 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -66,11 +66,11 @@ function path_menu() { 'title' => 'List', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/config/search/path/edit/%path'] = array( + $items['admin/config/search/path/edit/%'] = array( 'title' => 'Edit alias', 'route_name' => 'path.admin_edit', ); - $items['admin/config/search/path/delete/%path'] = array( + $items['admin/config/search/path/delete/%'] = array( 'title' => 'Delete alias', 'route_name' => 'path.delete', ); diff --git a/core/modules/picture/picture.module b/core/modules/picture/picture.module index 2a6e6d2..90a161f 100644 --- a/core/modules/picture/picture.module +++ b/core/modules/picture/picture.module @@ -64,16 +64,16 @@ function picture_menu() { 'route_name' => 'picture.mapping_page_add', 'type' => MENU_LOCAL_ACTION, ); - $items['admin/config/media/picturemapping/%picture_mapping'] = array( + $items['admin/config/media/picturemapping/%'] = array( 'title' => 'Edit picture mapping', 'route_name' => 'picture.mapping_page_edit', ); - $items['admin/config/media/picturemapping/%picture_mapping/edit'] = array( + $items['admin/config/media/picturemapping/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, ); - $items['admin/config/media/picturemapping/%picture_mapping/duplicate'] = array( + $items['admin/config/media/picturemapping/%/duplicate'] = array( 'title' => 'Duplicate picture mapping', 'route_name' => 'picture.mapping_page_duplicate', ); diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 175206d..550e0d7 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -90,36 +90,36 @@ function shortcut_menu() { 'description' => 'Add and modify shortcut sets.', 'route_name' => 'shortcut.set_admin', ); - $items['admin/config/user-interface/shortcut/manage/%shortcut_set'] = array( + $items['admin/config/user-interface/shortcut/manage/%'] = array( 'title' => 'Edit shortcuts', 'route_name' => 'shortcut.set_customize', 'title callback' => 'entity_page_label', 'title arguments' => array(5), ); - $items['admin/config/user-interface/shortcut/manage/%shortcut_set/links'] = array( + $items['admin/config/user-interface/shortcut/manage/%/links'] = array( 'title' => 'List links', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/config/user-interface/shortcut/manage/%shortcut_set/edit'] = array( + $items['admin/config/user-interface/shortcut/manage/%/edit'] = array( 'title' => 'Edit set name', 'route_name' => 'shortcut.set_edit', 'type' => MENU_LOCAL_TASK, 'weight' => 10, ); - $items['admin/config/user-interface/shortcut/manage/%shortcut_set/add-link'] = array( + $items['admin/config/user-interface/shortcut/manage/%/add-link'] = array( 'title' => 'Add shortcut', - 'route_name' => 'shortcut.link_edit', + 'route_name' => 'shortcut.link_add', 'type' => MENU_LOCAL_ACTION, ); - $items['admin/config/user-interface/shortcut/link/%menu_link'] = array( + $items['admin/config/user-interface/shortcut/link/%'] = array( 'title' => 'Edit shortcut', 'route_name' => 'shortcut.link_edit', ); - $items['admin/config/user-interface/shortcut/link/%menu_link/delete'] = array( + $items['admin/config/user-interface/shortcut/link/%/delete'] = array( 'title' => 'Delete shortcut', 'route_name' => 'shortcut.link_delete', ); - $items['user/%user/shortcuts'] = array( + $items['user/%/shortcuts'] = array( 'title' => 'Shortcuts', 'route_name' => 'shortcut.overview', 'type' => MENU_LOCAL_TASK, diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 600b06b..60654e0 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -597,7 +597,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * section below). For example, your module could register path * 'my-module/%mymodule_abc/edit': * @code - * $items['my-module/%mymodule_abc/edit'] = array( + * $items['my-module/%/edit'] = array( * 'page callback' => 'mymodule_abc_edit', * 'page arguments' => array(1), * ); diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module index cc8800e..4978b74 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.module +++ b/core/modules/system/tests/modules/entity_test/entity_test.module @@ -243,13 +243,13 @@ function entity_test_menu() { 'route_name' => "entity_test.add_$entity_type", ); - $items[$entity_type . '/manage/%' . $entity_type] = array( + $items[$entity_type . '/manage/%'] = array( 'title' => 'Edit @type', 'title arguments' => array('@type' => $entity_type), 'route_name' => "entity_test.edit_$entity_type", ); - $items[$entity_type . '/manage/%' . $entity_type . '/edit'] = array( + $items[$entity_type . '/manage/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, ); diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module index 566a620..3328abd 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.module +++ b/core/modules/system/tests/modules/menu_test/menu_test.module @@ -79,10 +79,7 @@ function menu_test_menu() { 'route_name' => 'menu_test.no_theme_callback', ); // Path containing "exotic" characters. - $path = "menu-test/ -._~!$'\"()*@[]?&+%#,;=:" . // "Special" ASCII characters. - "%23%25%26%2B%2F%3F" . // Characters that look like a percent-escaped string. - "éøïвβ中國書۞"; // Characters from various non-ASCII alphabets. - $items[$path] = array( + $items['menu-test/%'] = array( 'title' => '"Exotic" path', 'route_name' => 'menu_test.exotic_path', ); @@ -119,27 +116,27 @@ function menu_test_menu() { 'type' => MENU_LOCAL_TASK, 'weight' => 5, ); - $items['menu-test/hidden/menu/manage/%menu'] = array( + $items['menu-test/hidden/menu/manage/%'] = array( 'title' => 'Customize menu', 'route_name' => 'menu_test.hidden_manage', ); - $items['menu-test/hidden/menu/manage/%menu/list'] = array( + $items['menu-test/hidden/menu/manage/%/list'] = array( 'title' => 'List links', 'type' => MENU_DEFAULT_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, ); - $items['menu-test/hidden/menu/manage/%menu/add'] = array( + $items['menu-test/hidden/menu/manage/%/add'] = array( 'title' => 'Add link', 'route_name' => 'menu_test.hidden_manage_add', 'type' => MENU_LOCAL_ACTION, ); - $items['menu-test/hidden/menu/manage/%menu/edit'] = array( + $items['menu-test/hidden/menu/manage/%/edit'] = array( 'title' => 'Edit menu', 'route_name' => 'menu_test.hidden_manage_edit', 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, ); - $items['menu-test/hidden/menu/manage/%menu/delete'] = array( + $items['menu-test/hidden/menu/manage/%/delete'] = array( 'title' => 'Delete menu', 'route_name' => 'menu_test.hidden_manage_delete', ); diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 4a17f3d..8fc1a2a 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -249,31 +249,31 @@ function taxonomy_menu() { 'type' => MENU_SIBLING_LOCAL_TASK, ); - $items['taxonomy/term/%taxonomy_term'] = array( + $items['taxonomy/term/%'] = array( 'title' => 'Taxonomy term', 'title callback' => 'taxonomy_term_title', 'title arguments' => array(2), 'route_name' => 'taxonomy.term_page', ); - $items['taxonomy/term/%taxonomy_term/view'] = array( + $items['taxonomy/term/%/view'] = array( 'title' => 'View', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['taxonomy/term/%taxonomy_term/edit'] = array( + $items['taxonomy/term/%/edit'] = array( 'title' => 'Edit', 'route_name' => 'taxonomy.term_edit', 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, 'weight' => 10, ); - $items['taxonomy/term/%taxonomy_term/delete'] = array( + $items['taxonomy/term/%/delete'] = array( 'title' => 'Delete', 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_INLINE, 'weight' => 20, 'route_name' => 'taxonomy.term_delete', ); - $items['taxonomy/term/%taxonomy_term/feed'] = array( + $items['taxonomy/term/%/feed'] = array( 'title' => 'Taxonomy term', 'title callback' => 'taxonomy_term_title', 'title arguments' => array(2), @@ -281,21 +281,21 @@ function taxonomy_menu() { 'type' => MENU_CALLBACK, ); - $items['admin/structure/taxonomy/manage/%taxonomy_vocabulary'] = array( + $items['admin/structure/taxonomy/manage/%'] = array( 'route_name' => 'taxonomy.overview_terms', 'title callback' => 'entity_page_label', 'title arguments' => array(4), ); - $items['admin/structure/taxonomy/manage/%taxonomy_vocabulary/list'] = array( + $items['admin/structure/taxonomy/manage/%/list'] = array( 'title' => 'List', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/structure/taxonomy/manage/%taxonomy_vocabulary/edit'] = array( + $items['admin/structure/taxonomy/manage/%/edit'] = array( 'title' => 'Edit', 'route_name' => 'taxonomy.vocabulary_edit', 'type' => MENU_LOCAL_TASK, ); - $items['admin/structure/taxonomy/%taxonomy_vocabulary/delete'] = array( + $items['admin/structure/taxonomy/manage/%/delete'] = array( 'title' => 'Delete', 'type' => MENU_LOCAL_TASK, 'context' => MENU_CONTEXT_INLINE, @@ -303,7 +303,7 @@ function taxonomy_menu() { 'route_name' => 'taxonomy.vocabulary_delete', ); - $items['admin/structure/taxonomy/manage/%taxonomy_vocabulary/add'] = array( + $items['admin/structure/taxonomy/manage/%/add'] = array( 'title' => 'Add term', 'route_name' => 'taxonomy.term_add', 'type' => MENU_LOCAL_ACTION, diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php index e19fd06..fef6904 100644 --- a/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php +++ b/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php @@ -93,24 +93,32 @@ function testUpdateManagerCoreSecurityUpdateMessages() { // about core missing a security update. $this->drupalGet('admin/modules/install'); + $this->assertResponse(200); $this->assertNoText(t('There is a security update available for your version of Drupal.')); $this->drupalGet('admin/modules/update'); + $this->assertResponse(200); $this->assertNoText(t('There is a security update available for your version of Drupal.')); $this->drupalGet('admin/appearance/install'); + $this->assertResponse(200); $this->assertNoText(t('There is a security update available for your version of Drupal.')); $this->drupalGet('admin/appearance/update'); + $this->assertResponse(200); $this->assertNoText(t('There is a security update available for your version of Drupal.')); $this->drupalGet('admin/reports/updates/install'); + $this->assertResponse(200); $this->assertNoText(t('There is a security update available for your version of Drupal.')); $this->drupalGet('admin/reports/updates/update'); + $this->assertResponse(200); $this->assertNoText(t('There is a security update available for your version of Drupal.')); $this->drupalGet('admin/update/ready'); + $this->assertResponse(200); $this->assertNoText(t('There is a security update available for your version of Drupal.')); } + } diff --git a/core/modules/update/update.routing.yml b/core/modules/update/update.routing.yml index fcfbdd1..38adf41 100644 --- a/core/modules/update/update.routing.yml +++ b/core/modules/update/update.routing.yml @@ -63,7 +63,7 @@ update.module_update: _access_update_manager: 'TRUE' update.theme_install: - path: '/admin/theme/install' + path: '/admin/appearance/install' defaults: _content: '\Drupal\update\Form\UpdateForm::themeInstall' options: @@ -73,7 +73,7 @@ update.theme_install: _access_update_manager: 'TRUE' update.theme_update: - path: '/admin/theme/update' + path: '/admin/appearance/update' defaults: _content: '\Drupal\update\Form\UpdateForm::themeUpdate' _title: 'Update' diff --git a/core/modules/user/tests/modules/user_form_test/user_form_test.module b/core/modules/user/tests/modules/user_form_test/user_form_test.module index 134804f..d5094b9 100644 --- a/core/modules/user/tests/modules/user_form_test/user_form_test.module +++ b/core/modules/user/tests/modules/user_form_test/user_form_test.module @@ -12,7 +12,7 @@ */ function user_form_test_menu() { $items = array(); - $items['user_form_test_current_password/%user'] = array( + $items['user_form_test_current_password/%'] = array( 'title' => 'User form test for current password validation', 'route_name' => 'user_form_test.current_password', 'type' => MENU_SUGGESTED_ITEM, diff --git a/core/modules/user/user.module b/core/modules/user/user.module index aa2b2e8..689c714 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -799,15 +799,15 @@ function user_menu() { 'type' => MENU_LOCAL_ACTION, ); - $items['admin/people/roles/manage/%user_role'] = array( + $items['admin/people/roles/manage/%'] = array( 'title' => 'Edit role', 'route_name' => 'user.role_edit', ); - $items['admin/people/roles/manage/%user_role/edit'] = array( + $items['admin/people/roles/manage/%/edit'] = array( 'title' => 'Edit', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/people/roles/manage/%user_role/delete'] = array( + $items['admin/people/roles/manage/%/delete'] = array( 'title' => 'Delete role', 'route_name' => 'user.role_delete', 'weight' => 10, @@ -830,24 +830,24 @@ function user_menu() { 'route_name' => 'user.account_settings', ); - $items['user/%user'] = array( + $items['user/%'] = array( 'title' => 'My account', 'title callback' => 'user_page_title', 'title arguments' => array(1), 'route_name' => 'user.view', ); - $items['user/%user/view'] = array( + $items['user/%/view'] = array( 'title' => 'View', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['user/%user/cancel'] = array( + $items['user/%/cancel'] = array( 'route_name' => 'user.cancel', ); - $items['user/%user/cancel/confirm/%/%'] = array( + $items['user/%/cancel/confirm'] = array( 'title' => 'Confirm account cancellation', 'route_name' => 'user.cancel_confirm', ); - $items['user/%user/edit'] = array( + $items['user/%/edit'] = array( 'title' => 'Edit', 'route_name' => 'user.edit', 'type' => MENU_LOCAL_TASK, diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index 6da5339..3384d25 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -49,7 +49,7 @@ function views_ui_menu() { 'type' => MENU_DEFAULT_LOCAL_TASK, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, ); - $items['admin/structure/views/view/%/preview/%'] = array( + $items['admin/structure/views/view/%/preview'] = array( 'route_name' => 'views_ui.preview', 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE, 'type' => MENU_VISIBLE_IN_BREADCRUMB,