From 356a1e46b26aa64cf1667d392f8ac573eccfd9e8 Mon Sep 17 00:00:00 2001 From: Uiri Date: Sat, 25 Sep 2010 09:50:29 -0400 Subject: [PATCH 1/4] it is fixed, I think --- script/server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/server b/script/server index 3804ccad9..f1e5b7ec5 100755 --- a/script/server +++ b/script/server @@ -8,6 +8,6 @@ then else mkdir -p -v log/thin/ bundle exec ruby ./script/websocket_server.rb& - bundle exec thin start $@ + bundle exec thin -p 80 -a 192.168.0.191 start $@ fi From 0b19b77b5fe692b978f0fffbc3e886caea82645e Mon Sep 17 00:00:00 2001 From: Uiri Date: Sat, 25 Sep 2010 17:34:13 -0400 Subject: [PATCH 2/4] A fix for the image breaking if you don't change anything on the edit profile page but hit update profile instead of cancel --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 819a88d28..30555d20a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -31,7 +31,7 @@ class UsersController < ApplicationController params[:profile].delete(:image_url) else url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/' - params[:profile][:image_url] = url + params[:profile][:image_url] + params[:profile][:image_url] = params[:profile][:image_url] end end From ceb4f71714091ddfd31db4c7b79dd4285c1bb401 Mon Sep 17 00:00:00 2001 From: Uiri Date: Sat, 25 Sep 2010 18:35:28 -0400 Subject: [PATCH 3/4] Don't want my personal changes to be pulled into the master with my pull request --- script/server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/server b/script/server index f1e5b7ec5..3804ccad9 100755 --- a/script/server +++ b/script/server @@ -8,6 +8,6 @@ then else mkdir -p -v log/thin/ bundle exec ruby ./script/websocket_server.rb& - bundle exec thin -p 80 -a 192.168.0.191 start $@ + bundle exec thin start $@ fi From 151a57cc93f02e06b6d2b5f55e4acbd79ad69069 Mon Sep 17 00:00:00 2001 From: Uiri Date: Sun, 26 Sep 2010 11:47:34 -0400 Subject: [PATCH 4/4] well, that explains why it was adding the url variable. Fixed so that now new pictures work too. --- app/controllers/users_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7041066bd..13d97479c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -26,11 +26,15 @@ class UsersController < ApplicationController private def prep_image_url(params) + url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/' if params[:profile][:image_url].empty? params[:profile].delete(:image_url) else - url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/' - params[:profile][:image_url] = params[:profile][:image_url] + if /^http:\/\// =~ params[:profile][:image_url] + params[:profile][:image_url] = params[:profile][:image_url] + else + params[:profile][:image_url] = url + params[:profile][:image_url] + end end end