? 405238-forum_duplicate_id-rev13.patch
? 520736-validate-tid-forum-pages-inc-rev5.patch
? 649820-hook_menu_menu_local_action_docs-rev3.patch
? changes.patch
Index: modules/forum/forum-icon.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum-icon.tpl.php,v
retrieving revision 1.6
diff -u -p -r1.6 forum-icon.tpl.php
--- modules/forum/forum-icon.tpl.php	9 Oct 2009 00:59:59 -0000	1.6
+++ modules/forum/forum-icon.tpl.php	4 Dec 2009 15:57:09 -0000
@@ -9,17 +9,15 @@
  * - $new_posts: Indicates whether or not the topic contains new posts.
  * - $icon: The icon to display. May be one of 'hot', 'hot-new', 'new',
  *   'default', 'closed', or 'sticky'.
+ * - $first_new: Indicates whether this is the first topic with
+ *   new posts.
  *
  * @see template_preprocess_forum_icon()
  * @see theme_forum_icon()
  */
 ?>
-<?php if ($new_posts): ?>
-  <a id="new">
+<?php if ($first_new): ?>
+  <a id="new" />
 <?php endif; ?>
 
 <?php print theme('image', array('path' => "misc/forum-$icon.png")) ?>
-
-<?php if ($new_posts): ?>
-  </a>
-<?php endif; ?>
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.539
diff -u -p -r1.539 forum.module
--- modules/forum/forum.module	3 Dec 2009 20:21:50 -0000	1.539
+++ modules/forum/forum.module	4 Dec 2009 15:57:09 -0000
@@ -54,7 +54,7 @@ function forum_theme() {
     ),
     'forum_icon' => array(
       'template' => 'forum-icon',
-      'variables' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0),
+      'arguments' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0, 'first_new' => FALSE),
     ),
     'forum_submitted' => array(
       'template' => 'forum-submitted',
@@ -838,6 +838,7 @@ function forum_get_topics($tid, $sortby,
   }
 
   $topics = array();
+  $first_new_found = FALSE;
   foreach ($result as $topic) {
     if ($user->uid) {
       // folder is new if topic is new or there are new comments since last visit
@@ -855,6 +856,13 @@ function forum_get_topics($tid, $sortby,
       $topic->new_replies = 0;
       $topic->new = 0;
     }
+    
+    // Make sure only one topic is indicated as the first new topic.
+    $topic->first_new = FALSE;
+    if (($topic->new != 0) && (!$first_new_found)) {
+      $topic->first_new = TRUE;
+      $first_new_found = TRUE;
+    }
 
     if ($topic->comment_count > 0) {
       $last_reply = new stdClass();
@@ -1017,7 +1025,7 @@ function template_preprocess_forum_topic
   if (!empty($variables['topics'])) {
     $row = 0;
     foreach ($variables['topics'] as $id => $topic) {
-      $variables['topics'][$id]->icon = theme('forum_icon', array('new_posts' => $topic->new, 'num_posts' => $topic->comment_count, 'comment_mode' => $topic->comment_mode, 'sticky' => $topic->sticky));
+      $variables['topics'][$id]->icon = theme('forum_icon', array('new_posts' => $topic->new, 'num_posts' => $topic->comment_count, 'comment_mode' => $topic->comment_mode, 'sticky' => $topic->sticky, $topic->first_new));
       $variables['topics'][$id]->zebra = $row % 2 == 0 ? 'odd' : 'even';
       $row++;
 
@@ -1066,6 +1074,7 @@ function template_preprocess_forum_topic
  * - $num_posts = 0
  * - $comment_mode = 0
  * - $sticky = 0
+ * - $first_new
  *
  * @see forum-icon.tpl.php
  * @see theme_forum_icon()
