Index: mod/forumng/forum_post.php =================================================================== RCS file: /home/cvs_repositories/globalcvs/ou-moodle/mod/forumng/forum_post.php,v retrieving revision 1.28 diff -u -r1.28 forum_post.php --- mod/forumng/forum_post.php 4 Jun 2010 13:21:58 -0000 1.28 +++ mod/forumng/forum_post.php 9 Jun 2010 16:04:58 -0000 @@ -372,6 +372,15 @@ } /** + * Checks if this post has any children (replies). + * @return bool True if post has one or more replies + */ + public function has_children() { + $this->require_children(); + return count($this->children) > 0; + } + + /** * Marks this post as being expanded from the start. */ public function force_expand() { Index: mod/forumng/type/forum_type.php =================================================================== RCS file: /home/cvs_repositories/globalcvs/ou-moodle/mod/forumng/type/forum_type.php,v retrieving revision 1.35 diff -u -r1.35 forum_type.php --- mod/forumng/type/forum_type.php 26 May 2010 16:05:58 -0000 1.35 +++ mod/forumng/type/forum_type.php 9 Jun 2010 16:04:58 -0000 @@ -775,6 +775,10 @@ // viewing it has the ability to view deleted posts. $deletedhide = $post->get_deleted() && !$options[forum_post::OPTION_VIEW_DELETED_INFO]; + //Hide deleted messages if they have no replies + if ($deletedhide && !$post->has_children()) { + return ''; + } // Save some bandwidth by not sending link full paths except in emails if ($options[forum_post::OPTION_FULL_ADDRESSES]) { @@ -868,7 +872,7 @@ $out .= $lf . '