From 35bc86f6a6948f4699e0a0060ab5a73f2ed6d287 Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 22 Mar 2011 10:54:10 -0700 Subject: [PATCH 1/2] dont auto embedd images, untill we think of something better to do --- public/javascripts/stream.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index 17e4eaba8..105a1680a 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -11,9 +11,8 @@ var Stream = { Diaspora.widgets.timeago.updateTimeAgo(); $stream.not(".show").delegate("a.show_post_comments", "click", Stream.toggleComments); //audio linx - // Stream.setUpAudioLinks(); - Stream.setUpImageLinks(); + //Stream.setUpImageLinks(); // comment link form focus $stream.delegate(".focus_comment_textarea", "click", function(e){ @@ -86,7 +85,7 @@ var Stream = { //collapse publisher Publisher.close(); Publisher.clear(); - Stream.setUpImageLinks(); + //Stream.setUpImageLinks(); Stream.setUpAudioLinks(); }); From dc6018103381d0b594668a91fff6be66342e075e Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 22 Mar 2011 11:26:39 -0700 Subject: [PATCH 2/2] 404 googlebotz left and right on public remote person pages --- app/controllers/people_controller.rb | 6 ++++++ spec/controllers/people_controller_spec.rb | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 1ee4d787b..452724bc8 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -50,6 +50,12 @@ class PeopleController < ApplicationController def show @person = Person.where(:id => params[:id]).first + if @person && @person.remote? && !user_signed_in? + render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404 + return + end + + @post_type = :all @aspect = :profile @share_with = (params[:share_with] == 'true') diff --git a/spec/controllers/people_controller_spec.rb b/spec/controllers/people_controller_spec.rb index e20ada745..73d18d99d 100644 --- a/spec/controllers/people_controller_spec.rb +++ b/spec/controllers/people_controller_spec.rb @@ -154,6 +154,13 @@ describe PeopleController do assigns[:posts].should =~ public_posts end + + it 'throws 404 if the person is remote' do + p = Factory(:person) + + get :show, :id => p.id + response.status.should == 404 + end end context "when the person is a contact of the current user" do before do