# HG changeset patch # User Chris Cannam # Date 1301656447 -3600 # Node ID 055518fc4e4cdbd8dc51b0b70bf8e716b82a1c04 # Parent a70a6b9df76b3f297098e27e27a910be9a216723# Parent 7d8567890fa37eeddaa7d547544625d9fd07dda6 Merge from branch "feature_125" diff -r a70a6b9df76b -r 055518fc4e4c app/controllers/application_controller.rb --- a/app/controllers/application_controller.rb Fri Apr 01 12:13:55 2011 +0100 +++ b/app/controllers/application_controller.rb Fri Apr 01 12:14:07 2011 +0100 @@ -263,12 +263,17 @@ uri = URI.parse(back_url) # do not redirect user to another host or to the login or register page if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) + # soundsoftware: if back_url is the home page, + # change it to My Page (#125) + if (uri.path == home_path) + uri.path = uri.path + "/my" + end # soundsoftware: if login page is https but back_url http, # switch back_url to https to ensure cookie validity (#83) if (uri.scheme == "http") && (URI.parse(request.url).scheme == "https") uri.scheme = "https" - back_url = uri.to_s end + back_url = uri.to_s redirect_to(back_url) return end