Commit d429d86a1bf448d45569c08e0119ae72a45b700d

Authored by Victor Costa
2 parents cde7fd7c c330e5cc

Merge branch 'fix_profile_wall' into stable

Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
app/controllers/public/profile_controller.rb
@@ -207,7 +207,10 @@ class ProfileController < PublicController @@ -207,7 +207,10 @@ class ProfileController < PublicController
207 207
208 def more_comments 208 def more_comments
209 profile_filter = @profile.person? ? {:user_id => @profile} : {:target_id => @profile} 209 profile_filter = @profile.person? ? {:user_id => @profile} : {:target_id => @profile}
210 - activity = ActionTracker::Record.find(:first, :conditions => {:id => params[:activity]}.merge(profile_filter)) 210 + activity = ActionTracker::Record.where(:id => params[:activity])
  211 + activity = activity.where(profile_filter) if !logged_in? || !current_person.follows?(@profile)
  212 + activity = activity.first
  213 +
211 comments_count = activity.comments.count 214 comments_count = activity.comments.count
212 comment_page = (params[:comment_page] || 1).to_i 215 comment_page = (params[:comment_page] || 1).to_i
213 comments_per_page = 5 216 comments_per_page = 5