Removes "xxx and return" calls (#4446).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3185 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-12-18 14:22:18 +00:00
parent 0e4525d76c
commit 488c192286
10 changed files with 34 additions and 26 deletions

View File

@@ -30,7 +30,8 @@ class ApplicationController < ActionController::Base
def delete_broken_cookies
if cookies['_redmine_session'] && cookies['_redmine_session'] !~ /--/
cookies.delete '_redmine_session'
redirect_to home_path and return false
redirect_to home_path
return false
end
end
@@ -166,7 +167,8 @@ class ApplicationController < ActionController::Base
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)})
redirect_to(back_url) and return
redirect_to(back_url)
return
end
rescue URI::InvalidURIError
# redirect to default