Merged r3050 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@3052 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2009-11-14 20:18:57 +00:00
parent 540d204e9a
commit ce41d4f9b0
3 changed files with 14 additions and 1 deletions
+7 -1
View File
@@ -82,7 +82,13 @@ class ApplicationController < ActionController::Base
def require_login
if !User.current.logged?
redirect_to :controller => "account", :action => "login", :back_url => url_for(params)
# Extract only the basic url parameters on non-GET requests
if request.get?
url = url_for(params)
else
url = url_for(:controller => params[:controller], :action => params[:action], :id => params[:id], :project_id => params[:project_id])
end
redirect_to :controller => "account", :action => "login", :back_url => url
return false
end
true