From b54a72c24075a4df6b7ba0dd9d925efc1cde9b60 Mon Sep 17 00:00:00 2001 From: maxwell Date: Thu, 9 Dec 2010 13:57:43 -0800 Subject: [PATCH] Revert "Revert "fixed commenting bug on current user's profile page"" This reverts commit 166202d0b255de0f33e8b49e2bf23f29d2f154c8. --- app/controllers/people_controller.rb | 3 +-- app/views/people/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 4dd0b5751..fdea0ad0b 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -47,13 +47,12 @@ class PeopleController < ApplicationController if @person @profile = @person.profile @contact = current_user.contact_for(@person) - @is_contact = @person != current_user.person && @contact if @contact @aspects_with_person = @contact.aspects end - @commenting_disabled = !@contact + @commenting_disabled = (current_user.person.id != @person.id) && !@contact @posts = current_user.posts_from(@person).paginate :page => params[:page] @post_hashes = hashes_for_posts @posts diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 491664192..df078a437 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -17,7 +17,7 @@ = link_to t('_photos'), person_photos_path(@person) .span-8.append-1.last - = render :partial => 'people/profile_sidebar', :locals => {:person => @person, :is_contact => @is_contact} + = render :partial => 'people/profile_sidebar', :locals => {:person => @person, :is_contact => @contact} .span-15.last - unless @contact || current_user.person == @person