Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-dropin.php
===================================================================
--- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-dropin.php	(revision 4980)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-dropin.php	(working copy)
@@ -40,6 +40,12 @@
 		if ( is_admin() ) {
 			remove_filter( 'the_title', 'bbp_get_reply_title_fallback', 2 );
 		}
+
+		// Filter out hidden reply references from public views
+		add_filter( 'bbp_get_topic_last_reply_id',   array( $this, 'get_last_public_reply_id' ), 10, 2 );
+		add_filter( 'bbp_get_topic_last_active',     array( $this, 'get_last_public_post_time' ), 10, 2 );
+		add_filter( 'bbp_get_topic_last_active_id',  array( $this, 'get_last_public_post_id' ), 10, 2 );
+		add_filter( 'bbp_get_topic_reply_count_int', array( $this, 'get_public_reply_count' ), 10, 2 );
 	}
 
 	/**
@@ -328,4 +334,68 @@
 			}
 		}
 	}
+
+	/**
+	 * Return the ID of the last public reply in a topic.
+	 *
+	 * @param int $reply_id Reply ID.
+	 * @param int $topic_id Topic ID.
+	 * @return int Last public reply ID.
+	 */
+	function get_last_public_reply_id( $reply_id, $topic_id ) {
+		if ( 'publish' !== get_post_status( $reply_id ) ) {
+			$reply_id = bbp_get_public_child_last_id( $topic_id, bbp_get_reply_post_type() );
+		}
+
+		return $reply_id;
+	}
+
+	/**
+	 * Return last public activity time for a topic.
+	 *
+	 * @param string $last_active Last activity time.
+	 * @param int $topic_id Topic ID.
+	 * @return string Last public activity time.
+	 */
+	function get_last_public_post_time( $last_active, $topic_id ) {
+		if ( bbp_get_topic_reply_count_hidden( $topic_id ) ) {
+			$reply_id = bbp_get_topic_last_reply_id( $topic_id );
+
+			$last_active = get_post_field( 'post_date', $reply_id );
+			$last_active = ! empty( $last_active ) ? bbp_get_time_since( bbp_convert_date( $last_active ) ) : '';
+		}
+
+		return $last_active;
+	}
+
+	/**
+	 * Return the ID of the last public post in a topic.
+	 *
+	 * @param int $active_id Last post ID.
+	 * @param int $topic_id Topic ID.
+	 * @return int Last public post ID.
+	 */
+	function get_last_public_post_id( $active_id, $topic_id ) {
+		if ( bbp_get_topic_reply_count_hidden( $topic_id ) ) {
+			$active_id = bbp_get_topic_last_reply_id( $topic_id );
+		}
+
+		return $active_id;
+	}
+
+	/**
+	 * Return public reply count for a topic.
+	 *
+	 * @param int $replies Reply count.
+	 * @param int $topic_id Topic ID.
+	 * @return int Public reply count.
+	 */
+	function get_public_reply_count( $replies, $topic_id ) {
+		if ( bbp_get_topic_reply_count_hidden( $topic_id ) ) {
+			$replies = bbp_get_public_child_count( $topic_id, bbp_get_reply_post_type() );
+		}
+
+		return $replies;
+	}
+
 }
