Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.729
diff -u -p -r1.729 comment.module
--- modules/comment/comment.module	27 Jun 2009 10:13:28 -0000	1.729
+++ modules/comment/comment.module	28 Jun 2009 21:54:15 -0000
@@ -159,6 +159,13 @@ function comment_theme() {
  * Implement hook_menu().
  */
 function comment_menu() {
+  $items['admin/content/%comment_admin'] = array(
+    'title callback' => 'comment_admin_title',
+    // This works because both every string (but '0') is == TRUE.
+    'access callback' => 'comment_admin_to_arg',
+    'options' => array('alter' => TRUE),
+    'description' => "View, edit, and delete your site's content and comments.",
+  );
   $items['admin/content/content/comment'] = array(
     'title' => 'Comments',
     'description' => 'List and edit site comments and the comment approval queue.',
@@ -217,6 +224,43 @@ function comment_menu() {
 }
 
 /**
+ * Title callback for admin/content/%.
+ */
+function comment_admin_title() {
+  return comment_admin_to_arg() == 'content' ? t('Content') : t('Comments');
+}
+
+/**
+ * To_arg and access callback for admin/content/%.
+ */
+function comment_admin_to_arg() {
+  $item = menu_get_item('admin/content/content');
+  if ($item && $item['access']) {
+    return 'content';
+  }
+  $item = menu_get_item('admin/content/content/comment');
+  if ($item && $item['access']) {
+    return 'content/comment';
+  }
+}
+
+/**
+ * Implement hook_translated_menu_link_alter.
+ */
+function comment_translated_menu_link_alter($link) {
+  if ($link['link_path'] == 'admin/content/%' && comment_admin_to_arg() == 'content/comment') {
+    $link['description'] = t('Comment administration and approval.');
+  }
+}
+
+/**
+ * Implement hook_menu_alter().
+ */
+function comment_menu_alter(&$items) {
+  $items['admin/content/content']['type'] = MENU_CALLBACK;
+}
+
+/**
  * Implement hook_node_type().
  */
 function comment_node_type($op, $info) {
@@ -2410,11 +2454,3 @@ 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.";
-}
Index: modules/comment/comment.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.test,v
retrieving revision 1.34
diff -u -p -r1.34 comment.test
--- modules/comment/comment.test	27 Jun 2009 10:13:28 -0000	1.34
+++ modules/comment/comment.test	28 Jun 2009 21:54:15 -0000
@@ -552,7 +552,7 @@ class CommentPagerTest extends CommentHe
   }
 }
 
-class CommentApprovalTest extends CommentHelperCase {
+class CommentAdminTestCase extends CommentHelperCase {
   public static function getInfo() {
     return array(
       'name' => t('Comment approval'),
@@ -562,6 +562,23 @@ class CommentApprovalTest extends Commen
   }
 
   /**
+   * Test integration with content administration.
+   */
+  function testCommentAdmin() {
+    $comment_admin = $this->drupalCreateUser('administer comments', 'access administration pages');
+    $this->drupalGet('admin');
+    $this->assertText(t('Comments'), t('Comment administration is available as an administration link.'));
+    $this->drupalGet('admin/content/content');
+    $this->assertTitle(t('Comments'), t('Comments administration is shown as the default menu tab.'));
+
+    $content_admin = $this->drupalCreateUser('access administration pages', 'administer comments', 'administer nodes');
+    $this->drupalGet('admin');
+    $this->assertText(t("View, edit, and delete your site's content and comments."), t('Content administration is shown.'));
+    $this->drupalGet('admin/content/content');
+    $this->assertTitle(t('Content'), t('Content is shown as the default menu tab.'));
+  }
+
+  /**
    * Test comment approval functionality through admin/content/content/comment.
    */
   function testApprovalAdminInterface() {
