diff --git a/modules/comment/comment.admin.inc b/modules/comment/comment.admin.inc index 0806d753575547dc8e675bb13a5230201a4d0a4a..57f15e543e77907393deb389f05b94f3ea7c3064 100644 --- a/modules/comment/comment.admin.inc +++ b/modules/comment/comment.admin.inc @@ -116,7 +116,7 @@ function comment_admin_overview_validate($form, &$form_state) { // We can't execute any 'Update options' if no comments were selected. if (count($form_state['values']['comments']) == 0) { form_set_error('', t('Please select one or more comments to perform the update on.')); - drupal_goto('admin/content/comment'); + drupal_goto('admin/content/content/comment'); } } @@ -147,7 +147,7 @@ function comment_admin_overview_submit($form, &$form_state) { } cache_clear_all(); drupal_set_message(t('The update has been performed.')); - $form_state['redirect'] = 'admin/content/comment'; + $form_state['redirect'] = 'admin/content/content/comment'; } } @@ -183,12 +183,12 @@ function comment_multiple_delete_confirm(&$form_state) { if (!$comment_counter) { drupal_set_message(t('There do not appear to be any comments to delete, or your selected comment was deleted by another administrator.')); - drupal_goto('admin/content/comment'); + drupal_goto('admin/content/content/comment'); } else { return confirm_form($form, t('Are you sure you want to delete these comments and all their children?'), - 'admin/content/comment', t('This action cannot be undone.'), + 'admin/content/content/comment', t('This action cannot be undone.'), t('Delete comments'), t('Cancel')); } } @@ -207,7 +207,7 @@ function comment_multiple_delete_confirm_submit($form, &$form_state) { cache_clear_all(); drupal_set_message(t('The comments have been deleted.')); } - $form_state['redirect'] = 'admin/content/comment'; + $form_state['redirect'] = 'admin/content/content/comment'; } /** diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 48bf19425e719ea48f98e558ae4a0968e2773293..e4d6e43b629b109c33c167b93d7eb7ba81d8d7ed 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -159,19 +159,20 @@ function comment_theme() { * Implement hook_menu(). */ function comment_menu() { - $items['admin/content/comment'] = array( + $items['admin/content/content/comment'] = array( 'title' => 'Comments', 'description' => 'List and edit site comments and the comment approval queue.', 'page callback' => 'comment_admin', 'access arguments' => array('administer comments'), + 'type' => MENU_LOCAL_TASK, ); // Tabs begin here. - $items['admin/content/comment/new'] = array( + $items['admin/content/content/comment/new'] = array( 'title' => 'Published comments', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, ); - $items['admin/content/comment/approval'] = array( + $items['admin/content/content/comment/approval'] = array( 'title' => 'Approval queue', 'page arguments' => array('approval'), 'access arguments' => array('administer comments'), @@ -2409,3 +2410,11 @@ function comment_ranking() { ), ); } + +/** + * Implement hook_menu_alter(). + */ +function comment_menu_alter(&$items) { + // Add comments to the description for admin/content/content. + $items['admin/content/content']['description'] = "View, edit, and delete your site's content and comments."; +} diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 8fa08f8dab55eb34bf8e126754c2408ed628a673..9145eaa723a5b3ce0460b4b3a6e5c523253ff316 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -203,7 +203,7 @@ class CommentHelperCase extends DrupalWebTestCase { $edit = array(); $edit['operation'] = $operation; $edit['comments[' . $comment->id . ']'] = TRUE; - $this->drupalPost('admin/content/comment' . ($approval ? '/approval' : ''), $edit, t('Update')); + $this->drupalPost('admin/content/content/comment' . ($approval ? '/approval' : ''), $edit, t('Update')); if ($operation == 'delete') { $this->drupalPost(NULL, array(), t('Delete comments')); @@ -223,7 +223,7 @@ class CommentHelperCase extends DrupalWebTestCase { * Comment id. */ function getUnapprovedComment($subject) { - $this->drupalGet('admin/content/comment/approval'); + $this->drupalGet('admin/content/content/comment/approval'); preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this->drupalGetContent(), $match); return $match[2]; @@ -422,19 +422,19 @@ class CommentAnonymous extends CommentHelperCase { $this->drupalLogin($this->admin_user); $this->performCommentOperation($anonymous_comment3, 'unpublish'); - $this->drupalGet('admin/content/comment/approval'); + $this->drupalGet('admin/content/content/comment/approval'); $this->assertRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was unpublished.')); // Publish comment. $this->performCommentOperation($anonymous_comment3, 'publish', TRUE); - $this->drupalGet('admin/content/comment'); + $this->drupalGet('admin/content/content/comment'); $this->assertRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was published.')); // Delete comment. $this->performCommentOperation($anonymous_comment3, 'delete'); - $this->drupalGet('admin/content/comment'); + $this->drupalGet('admin/content/content/comment'); $this->assertNoRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was deleted.')); // Reset. @@ -562,7 +562,7 @@ class CommentApprovalTest extends CommentHelperCase { } /** - * Test comment approval functionality through admin/content/comment. + * Test comment approval functionality through admin/content/content/comment. */ function testApprovalAdminInterface() { $this->drupalLogin($this->admin_user); diff --git a/modules/node/node.module b/modules/node/node.module index 56b4dba04045d010856c36c5e6670499ac7c8aab..8143b70bc5df7bef77d1858aef84cdb4cc931c88 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1648,16 +1648,15 @@ function _node_add_access() { * Implement hook_menu(). */ function node_menu() { - $items['admin/content/node'] = array( + $items['admin/content/content'] = array( 'title' => 'Content', 'description' => "View, edit, and delete your site's content.", 'page callback' => 'drupal_get_form', 'page arguments' => array('node_admin_content'), 'access arguments' => array('administer nodes'), ); - - $items['admin/content/node/overview'] = array( - 'title' => 'List', + $items['admin/content/content/node'] = array( + 'title' => 'Content', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, ); diff --git a/modules/system/system.test b/modules/system/system.test index 0970d42a284721a017fb1b8551c42e4676ca2de7..18c420ee64dbddeaba024dcea4061417ae104fca 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -402,7 +402,7 @@ class AdminOverviewTestCase extends DrupalWebTestCase { // Comments on permissions follow the format: [task], [module] that the permission relates to. $permissions = array(); $permissions[] = 'access administration pages'; - $permissions[] = 'administer comments'; // Content management, Comment. + $permissions[] = 'administer nodes'; // Content management, Comment. $permissions[] = 'administer blocks'; // Site building, Block. $permissions[] = 'administer filters'; // Site configuration, Filter. $permissions[] = 'administer users'; // User management, User. @@ -414,7 +414,7 @@ class AdminOverviewTestCase extends DrupalWebTestCase { $this->checkOverview(array(t('Content management'), t('User management'), t('Reports'), t('Site building'), t('Site configuration'))); $this->drupalGet('admin/by-module'); - $this->checkOverview(array(t('Comment'), t('Block'), t('Filter'), t('User'), t('Database logging'))); + $this->checkOverview(array(t('Node'), t('Block'), t('Filter'), t('User'), t('Database logging'))); } /**