replaced deprecated controller instance variables: @params, @session, @request

git-svn-id: http://redmine.rubyforge.org/svn/trunk@127 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2006-12-26 21:33:44 +00:00
parent b3a3d3e2fa
commit 95cc65f14e
12 changed files with 32 additions and 32 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ class ApplicationController < ActionController::Base
end
# authorizes the user for the requested action.
def authorize(ctrl = @params[:controller], action = @params[:action])
def authorize(ctrl = params[:controller], action = params[:action])
# check if action is allowed on public projects
if @project.is_public? and Permission.allowed_to_public "%s/%s" % [ ctrl, action ]
return true
@@ -92,7 +92,7 @@ class ApplicationController < ActionController::Base
# store current uri in session.
# return to this location by calling redirect_back_or_default
def store_location
session[:return_to] = @request.request_uri
session[:return_to] = request.request_uri
end
# move to the last store_location call or to the passed default one