- <% all_comments = []%>
- <% comments = get_all_children(all_comments, @article) %>
+ <% comments = all_replies %>
<% if count > 0 %>
<% comments.each do |comment| %>
diff --git a/app/views/blogs/_homepage.html.erb b/app/views/blogs/_homepage.html.erb
index a076ed15c..6e45fdd88 100644
--- a/app/views/blogs/_homepage.html.erb
+++ b/app/views/blogs/_homepage.html.erb
@@ -46,12 +46,12 @@
<% all_comments = []%>
- <% count=get_all_children(all_comments, activity).count %>
+ <% all_repies = get_all_children(all_comments, activity) %>
+ <% count = all_repies.count %>
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 1} %>
- <% all_comments = []%>
- <% comments = get_all_children(all_comments, activity)[0..2] %>
+ <% comments = all_repies[0..2] %>
<% if count > 0 %>
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1, :user_id => activity.author_id}%>
diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb
index 1321fc83e..0fe72ad36 100644
--- a/app/views/org_document_comments/show.html.erb
+++ b/app/views/org_document_comments/show.html.erb
@@ -75,7 +75,8 @@
<% all_comments = []%>
- <% count=get_all_children(all_comments, @document).count %>
+ <% all_replies = get_all_children(all_comments, @document) %>
+ <% count = all_replies.count %>
<%# if count > 0 %>
@@ -88,8 +89,7 @@
- <% all_comments = []%>
- <% comments = get_all_children(all_comments, @document) %>
+ <% comments = all_replies %>