diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorAdminTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorAdminTest.php index bb17201..0ca0425 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorAdminTest.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorAdminTest.php @@ -51,7 +51,7 @@ function testAdmin() { $ckeditor = $manager->createInstance('ckeditor'); $this->drupalLogin($this->admin_user); - $this->drupalGet('admin/config/content/formats/filtered_html'); + $this->drupalGet('admin/config/content/formats/manage/filtered_html'); // Ensure no Editor config entity exists yet. $editor = entity_load('editor', 'filtered_html'); @@ -114,7 +114,7 @@ function testAdmin() { $this->assertIdentical($expected_settings, $editor->settings, 'The Editor config entity has the correct settings.'); // Configure the Styles plugin, and ensure the updated settings are saved. - $this->drupalGet('admin/config/content/formats/filtered_html'); + $this->drupalGet('admin/config/content/formats/manage/filtered_html'); $edit = array( 'editor[settings][plugins][stylescombo][styles]' => "h1.title|Title\np.callout|Callout\n\n", ); @@ -127,7 +127,7 @@ function testAdmin() { // Change the buttons that appear on the toolbar (in JavaScript, this is // done via drag and drop, but here we can only emulate the end result of // that interaction). Test multiple toolbar rows and a divider within a row. - $this->drupalGet('admin/config/content/formats/filtered_html'); + $this->drupalGet('admin/config/content/formats/manage/filtered_html'); $expected_settings['toolbar']['buttons'] = array( array('Undo', '|', 'Redo'), array('JustifyCenter'), @@ -144,7 +144,7 @@ function testAdmin() { // CKEditor plugin — this should not affect the Editor config entity. module_enable(array('ckeditor_test')); drupal_container()->get('plugin.manager.ckeditor.plugin')->clearCachedDefinitions(); - $this->drupalGet('admin/config/content/formats/filtered_html'); + $this->drupalGet('admin/config/content/formats/manage/filtered_html'); $ultra_llama_mode_checkbox = $this->xpath('//input[@type="checkbox" and @name="editor[settings][plugins][llama_contextual_and_button][ultra_llama_mode]" and not(@checked)]'); $this->assertTrue(count($ultra_llama_mode_checkbox) === 1, 'The "Ultra llama mode" checkbox exists and is not checked.'); $editor = entity_load('editor', 'filtered_html'); @@ -152,12 +152,12 @@ function testAdmin() { $this->assertIdentical($expected_settings, $editor->settings, 'The Editor config entity has the correct settings.'); // Finally, check the "Ultra llama mode" checkbox. - $this->drupalGet('admin/config/content/formats/filtered_html'); + $this->drupalGet('admin/config/content/formats/manage/filtered_html'); $edit = array( 'editor[settings][plugins][llama_contextual_and_button][ultra_llama_mode]' => '1', ); $this->drupalPost(NULL, $edit, t('Save configuration')); - $this->drupalGet('admin/config/content/formats/filtered_html'); + $this->drupalGet('admin/config/content/formats/manage/filtered_html'); $ultra_llama_mode_checkbox = $this->xpath('//input[@type="checkbox" and @name="editor[settings][plugins][llama_contextual_and_button][ultra_llama_mode]" and @checked="checked"]'); $this->assertTrue(count($ultra_llama_mode_checkbox) === 1, 'The "Ultra llama mode" checkbox exists and is checked.'); $expected_settings['plugins']['llama_contextual_and_button']['ultra_llama_mode'] = '1'; diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditorAdminTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditorAdminTest.php index 27cc458..0bc89e1 100644 --- a/core/modules/editor/lib/Drupal/editor/Tests/EditorAdminTest.php +++ b/core/modules/editor/lib/Drupal/editor/Tests/EditorAdminTest.php @@ -50,7 +50,7 @@ function setUp() { */ function testNoEditorAvailable() { $this->drupalLogin($this->admin_user); - $this->drupalGet('admin/config/content/formats/filtered_html'); + $this->drupalGet('admin/config/content/formats/manage/filtered_html'); // Ensure the form field order is correct. $roles_pos = strpos($this->drupalGetContent(), 'Roles'); @@ -75,7 +75,7 @@ function testNoEditorAvailable() { function testAddEditorToExistingFormat() { $this->enableUnicornEditor(); $this->drupalLogin($this->admin_user); - $this->drupalGet('admin/config/content/formats/filtered_html'); + $this->drupalGet('admin/config/content/formats/manage/filtered_html'); $edit = $this->selectUnicornEditor(); // Configure Unicorn Editor's setting to another value. $edit['editor[settings][foo]'] = 'baz'; @@ -155,7 +155,7 @@ protected function verifyUnicornEditorConfiguration($format_id, $foo = 'bar') { $this->assertIdentical($editor->settings['ponies too'], true, 'The text editor defaults are retrieved correctly.'); $this->assertIdentical($editor->settings['rainbows'], true, 'The text editor defaults added by hook_editor_settings_defaults() are retrieved correctly.'); $this->assertIdentical($editor->settings['sparkles'], false, 'The text editor defaults modified by hook_editor_settings_defaults_alter() are retrieved correctly.'); - $this->drupalGet('admin/config/content/formats/'. $format_id); + $this->drupalGet('admin/config/content/formats/manage/'. $format_id); $select = $this->xpath('//select[@name="editor[editor]"]'); $select_is_disabled = $this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]'); $options = $this->xpath('//select[@name="editor[editor]"]/option'); diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 3299c8a..8bf213a 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -56,7 +56,7 @@ function filter_help($path, $arg) { $output .= '

' . t('Text formats are presented on content editing pages in the order defined on this page. The first format available to a user will be selected by default.') . '

'; return $output; - case 'admin/config/content/formats/%': + case 'admin/config/content/formats/manage/%': $output = '

' . t('A text format contains filters that change the user input, for example stripping out malicious HTML or making URLs clickable. Filters are executed from top to bottom and the order is important, since one filter may prevent another filter from doing its job. For example, when URLs are converted into links before disallowed HTML tags are removed, all links may be removed. When this happens, the order of filters may need to be re-arranged.') . '

'; return $output; } @@ -123,9 +123,9 @@ function filter_menu() { $items['admin/config/content/formats'] = array( 'title' => 'Text formats', 'description' => 'Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters.', - 'route_name' => 'filter_view', + 'route_name' => 'filter_admin_overview', ); - $items['admin/config/content/formats/list'] = array( + $items['admin/config/content/formats/manage/list'] = array( 'title' => 'List', 'type' => MENU_DEFAULT_LOCAL_TASK, ); @@ -134,10 +134,10 @@ function filter_menu() { 'type' => MENU_LOCAL_ACTION, 'route_name' => 'filter_format_add', ); - $items['admin/config/content/formats/%filter_format'] = array( + $items['admin/config/content/formats/manage/%filter_format'] = array( 'route_name' => 'filter_format_edit', ); - $items['admin/config/content/formats/%filter_format/disable'] = array( + $items['admin/config/content/formats/manage/%filter_format/disable'] = array( 'title' => 'Disable text format', 'route_name' => 'filter_admin_disable', ); @@ -215,7 +215,7 @@ function filter_permission() { if (!empty($permission)) { // Only link to the text format configuration page if the user who is // viewing this will have access to that page. - $format_name_replacement = user_access('administer filters') ? l($format->name, 'admin/config/content/formats/' . $format->format) : drupal_placeholder($format->name); + $format_name_replacement = user_access('administer filters') ? l($format->name, 'admin/config/content/formats/manage/' . $format->format) : drupal_placeholder($format->name); $perms[$permission] = array( 'title' => t("Use the !text_format text format", array('!text_format' => $format_name_replacement,)), 'description' => drupal_placeholder(t('Warning: This permission may have security implications depending on how the text format is configured.')), diff --git a/core/modules/filter/filter.routing.yml b/core/modules/filter/filter.routing.yml index 8828807..1f65a7d 100644 --- a/core/modules/filter/filter.routing.yml +++ b/core/modules/filter/filter.routing.yml @@ -1,11 +1,11 @@ filter_admin_disable: - pattern: '/admin/config/content/formats/{filter_format}/disable' + pattern: '/admin/config/content/formats/manage/{filter_format}/disable' defaults: _form: '\Drupal\filter\Form\DisableForm' requirements: _filter_disable_format_access: 'TRUE' -filter_view: +filter_admin_overview: pattern: '/admin/config/content/formats' defaults: _form: '\Drupal\filter\Form\FilterOverview' @@ -13,17 +13,15 @@ filter_view: _permission: 'administer filters' filter_format_add: - pattern: '/admin/config/content/formats/{notexisting}' + pattern: '/admin/config/content/formats/manage/add' defaults: _form: '\Drupal\filter\Form\FilterAdmin' - notexisting: ~ requirements: - notexisting: '[ad]{3}' _permission: 'administer filters' filter_format_edit: - pattern: '/admin/config/content/formats/{filter_format}' + pattern: '/admin/config/content/formats/manage/{filter_format}' defaults: _form: '\Drupal\filter\Form\FilterAdmin' requirements: - _permission: 'administer filters' \ No newline at end of file + _permission: 'administer filters' diff --git a/core/modules/filter/lib/Drupal/filter/Form/FilterOverview.php b/core/modules/filter/lib/Drupal/filter/Form/FilterOverview.php index 618a1db..acbc28f 100644 --- a/core/modules/filter/lib/Drupal/filter/Form/FilterOverview.php +++ b/core/modules/filter/lib/Drupal/filter/Form/FilterOverview.php @@ -52,7 +52,7 @@ public function buildForm(array $form, array &$form_state, FilterFormat $filter_ $links = array(); $links['configure'] = array( 'title' => t('configure'), - 'href' => "admin/config/content/formats/$id", + 'href' => "admin/config/content/formats/manage/$id", ); // Check whether this is the fallback text format. This format is available // to all roles and cannot be disabled via the admin interface. @@ -72,7 +72,7 @@ public function buildForm(array $form, array &$form_state, FilterFormat $filter_ $roles_markup = $roles ? implode(', ', $roles) : t('No roles may use this format'); $links['disable'] = array( 'title' => t('disable'), - 'href' => "admin/config/content/formats/$id/disable", + 'href' => "admin/config/content/formats/manage/$id/disable", ); } diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php index 81d5321..b3bad07 100644 --- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php +++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php @@ -73,8 +73,8 @@ function testFormatAdmin() { // Edit text format. $this->drupalGet('admin/config/content/formats'); - $this->assertLinkByHref('admin/config/content/formats/' . $format_id); - $this->drupalGet('admin/config/content/formats/' . $format_id); + $this->assertLinkByHref('admin/config/content/formats/manage/' . $format_id); + $this->drupalGet('admin/config/content/formats/manage/' . $format_id); $this->drupalPost(NULL, array(), t('Save configuration')); // Verify that the custom weight of the text format has been retained. @@ -82,12 +82,12 @@ function testFormatAdmin() { $this->assertFieldByName("formats[$format_id][weight]", 5, 'Text format weight was retained.'); // Disable text format. - $this->assertLinkByHref('admin/config/content/formats/' . $format_id . '/disable'); - $this->drupalGet('admin/config/content/formats/' . $format_id . '/disable'); + $this->assertLinkByHref('admin/config/content/formats/manage/' . $format_id . '/disable'); + $this->drupalGet('admin/config/content/formats/manage/' . $format_id . '/disable'); $this->drupalPost(NULL, array(), t('Disable')); // Verify that disabled text format no longer exists. - $this->drupalGet('admin/config/content/formats/' . $format_id); + $this->drupalGet('admin/config/content/formats/manage/' . $format_id); $this->assertResponse(404, 'Disabled text format no longer exists.'); // Attempt to create a format of the same machine name as the disabled @@ -127,8 +127,8 @@ function testFilterAdmin() { // Check that the fallback format exists and cannot be disabled. $this->assertTrue($plain == filter_fallback_format(), 'The fallback format is set to plain text.'); $this->drupalGet('admin/config/content/formats'); - $this->assertNoRaw('admin/config/content/formats/' . $plain . '/disable', 'Disable link for the fallback format not found.'); - $this->drupalGet('admin/config/content/formats/' . $plain . '/disable'); + $this->assertNoRaw('admin/config/content/formats/manage/' . $plain . '/disable', 'Disable link for the fallback format not found.'); + $this->drupalGet('admin/config/content/formats/manage/' . $plain . '/disable'); $this->assertResponse(403, 'The fallback format cannot be disabled.'); // Verify access permissions to Full HTML format. @@ -138,9 +138,9 @@ function testFilterAdmin() { // Add an additional tag. $edit = array(); $edit['filters[filter_html][settings][allowed_html]'] = '