summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/admin_controller.rb2
-rw-r--r--app/controllers/application.rb4
-rw-r--r--app/controllers/help_controller.rb8
-rw-r--r--app/controllers/issues_controller.rb4
-rw-r--r--app/controllers/my_controller.rb2
-rw-r--r--app/controllers/projects_controller.rb10
-rw-r--r--app/controllers/roles_controller.rb4
-rw-r--r--app/controllers/users_controller.rb2
-rw-r--r--app/helpers/application_helper.rb8
-rw-r--r--app/helpers/sort_helper.rb16
-rw-r--r--app/views/enumerations/list.rhtml2
-rw-r--r--app/views/layouts/base.rhtml2
12 files changed, 32 insertions, 32 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 2c9f67586..a9a6a8f0b 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -31,7 +31,7 @@ class AdminController < ApplicationController
@project_count = Project.count
@project_pages = Paginator.new self, @project_count,
15,
- @params['page']
+ params['page']
@projects = Project.find :all, :order => sort_clause,
:limit => @project_pages.items_per_page,
:offset => @project_pages.current.offset
diff --git a/app/controllers/application.rb b/app/controllers/application.rb
index 483d0a102..516285d77 100644
--- a/app/controllers/application.rb
+++ b/app/controllers/application.rb
@@ -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
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index 32d822993..4accfb33c 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -23,11 +23,11 @@ class HelpController < ApplicationController
# displays help page for the requested controller/action
def index
# select help page to display
- if @params[:ctrl] and @help_config['pages'][@params[:ctrl]]
- if @params[:page] and @help_config['pages'][@params[:ctrl]][@params[:page]]
- template = @help_config['pages'][@params[:ctrl]][@params[:page]]
+ if params[:ctrl] and @help_config['pages'][params[:ctrl]]
+ if params[:page] and @help_config['pages'][params[:ctrl]][params[:page]]
+ template = @help_config['pages'][params[:ctrl]][params[:page]]
else
- template = @help_config['pages'][@params[:ctrl]]['index']
+ template = @help_config['pages'][params[:ctrl]]['index']
end
end
# choose language according to available help translations
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 94e036ab3..7a3679386 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -72,7 +72,7 @@ class IssuesController < ApplicationController
#@history.status = @issue.status
if @issue.save
flash[:notice] = l(:notice_successful_update)
- Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
+ Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
redirect_to :action => 'show', :id => @issue
return
end
@@ -97,7 +97,7 @@ class IssuesController < ApplicationController
@issue.status = @new_status
if @issue.update_attributes(params[:issue])
flash[:notice] = l(:notice_successful_update)
- Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
+ Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
redirect_to :action => 'show', :id => @issue
end
rescue ActiveRecord::StaleObjectError
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index ff12b74d7..ec6b88b4c 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -58,7 +58,7 @@ class MyController < ApplicationController
def change_password
@user = self.logged_in_user
flash[:notice] = l(:notice_can_t_change_password) and redirect_to :action => 'account' and return if @user.auth_source_id
- if @user.check_password?(@params[:password])
+ if @user.check_password?(params[:password])
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
if @user.save
flash[:notice] = l(:notice_account_password_updated)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 59f8f3564..3a6986bee 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -42,7 +42,7 @@ class ProjectsController < ApplicationController
@project_count = Project.count(["is_public=?", true])
@project_pages = Paginator.new self, @project_count,
15,
- @params['page']
+ params['page']
@projects = Project.find :all, :order => sort_clause,
:conditions => ["is_public=?", true],
:limit => @project_pages.items_per_page,
@@ -59,7 +59,7 @@ class ProjectsController < ApplicationController
if request.get?
@custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) }
else
- @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
+ @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids]
@custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
@project.custom_values = @custom_values
if params[:repository_enabled] && params[:repository_enabled] == "1"
@@ -95,7 +95,7 @@ class ProjectsController < ApplicationController
# Edit @project
def edit
if request.post?
- @project.custom_fields = IssueCustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
+ @project.custom_fields = IssueCustomField.find(params[:custom_field_ids]) if params[:custom_field_ids]
if params[:custom_fields]
@custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
@project.custom_values = @custom_values
@@ -213,7 +213,7 @@ class ProjectsController < ApplicationController
if @issue.save
@attachments.each(&:save)
flash[:notice] = l(:notice_successful_create)
- Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
+ Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
redirect_to :action => 'list_issues', :id => @project
end
end
@@ -236,7 +236,7 @@ class ProjectsController < ApplicationController
if @query.valid?
@issue_count = Issue.count(:include => [:status, :project], :conditions => @query.statement)
- @issue_pages = Paginator.new self, @issue_count, @results_per_page, @params['page']
+ @issue_pages = Paginator.new self, @issue_count, @results_per_page, params['page']
@issues = Issue.find :all, :order => sort_clause,
:include => [ :author, :status, :tracker, :project ],
:conditions => @query.statement,
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb
index 2307c5730..a4bee5dd1 100644
--- a/app/controllers/roles_controller.rb
+++ b/app/controllers/roles_controller.rb
@@ -32,7 +32,7 @@ class RolesController < ApplicationController
def new
@role = Role.new(params[:role])
if request.post?
- @role.permissions = Permission.find(@params[:permission_ids]) if @params[:permission_ids]
+ @role.permissions = Permission.find(params[:permission_ids]) if params[:permission_ids]
if @role.save
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list'
@@ -44,7 +44,7 @@ class RolesController < ApplicationController
def edit
@role = Role.find(params[:id])
if request.post? and @role.update_attributes(params[:role])
- @role.permissions = Permission.find(@params[:permission_ids] || [])
+ @role.permissions = Permission.find(params[:permission_ids] || [])
Permission.allowed_to_role_expired
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list'
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index ab4aae08d..4c403a8d6 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -35,7 +35,7 @@ class UsersController < ApplicationController
@user_count = User.count
@user_pages = Paginator.new self, @user_count,
15,
- @params['page']
+ params['page']
@users = User.find :all,:order => sort_clause,
:limit => @user_pages.items_per_page,
:offset => @user_pages.current.offset
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 397b747d5..5c28c2359 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -70,17 +70,17 @@ module ApplicationHelper
html = ''
html << link_to_remote(('&#171; ' + l(:label_previous)),
{:update => "content", :url => { :page => paginator.current.previous }},
- {:href => url_for(:action => 'list', :params => @params.merge({:page => paginator.current.previous}))}) + ' ' if paginator.current.previous
+ {:href => url_for(:action => 'list', :params => params.merge({:page => paginator.current.previous}))}) + ' ' if paginator.current.previous
html << (pagination_links_each(paginator, options) do |n|
link_to_remote(n.to_s,
- {:url => {:action => 'list', :params => @params.merge({:page => n})}, :update => 'content'},
- {:href => url_for(:action => 'list', :params => @params.merge({:page => n}))})
+ {:url => {:action => 'list', :params => params.merge({:page => n})}, :update => 'content'},
+ {:href => url_for(:action => 'list', :params => params.merge({:page => n}))})
end || '')
html << ' ' + link_to_remote((l(:label_next) + ' &#187;'),
{:update => "content", :url => { :page => paginator.current.next }},
- {:href => url_for(:action => 'list', :params => @params.merge({:page => paginator.current.next}))}) if paginator.current.next
+ {:href => url_for(:action => 'list', :params => params.merge({:page => paginator.current.next}))}) if paginator.current.next
html
end
diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb
index 04a84c8e4..ec14ecbe1 100644
--- a/app/helpers/sort_helper.rb
+++ b/app/helpers/sort_helper.rb
@@ -61,7 +61,7 @@ module SortHelper
# defaults to '<controller_name>_sort'.
#
def sort_init(default_key, default_order='asc', name=nil)
- @sort_name = name || @params[:controller] + @params[:action] + '_sort'
+ @sort_name = name || params[:controller] + params[:action] + '_sort'
@sort_default = {:key => default_key, :order => default_order}
end
@@ -69,21 +69,21 @@ module SortHelper
# sort_clause.
#
def sort_update()
- if @params[:sort_key]
- sort = {:key => @params[:sort_key], :order => @params[:sort_order]}
- elsif @session[@sort_name]
- sort = @session[@sort_name] # Previous sort.
+ if params[:sort_key]
+ sort = {:key => params[:sort_key], :order => params[:sort_order]}
+ elsif session[@sort_name]
+ sort = session[@sort_name] # Previous sort.
else
sort = @sort_default
end
- @session[@sort_name] = sort
+ session[@sort_name] = sort
end
# Returns an SQL sort clause corresponding to the current sort state.
# Use this to sort the controller's table items collection.
#
def sort_clause()
- @session[@sort_name][:key] + ' ' + @session[@sort_name][:order]
+ session[@sort_name][:key] + ' ' + session[@sort_name][:order]
end
# Returns a link which sorts by the named column.
@@ -93,7 +93,7 @@ module SortHelper
# - A sort icon image is positioned to the right of the sort link.
#
def sort_link(column, caption=nil)
- key, order = @session[@sort_name][:key], @session[@sort_name][:order]
+ key, order = session[@sort_name][:key], session[@sort_name][:order]
if key == column
if order.downcase == 'asc'
icon = 'sort_asc'
diff --git a/app/views/enumerations/list.rhtml b/app/views/enumerations/list.rhtml
index 15b91c1ac..2d5726bcf 100644
--- a/app/views/enumerations/list.rhtml
+++ b/app/views/enumerations/list.rhtml
@@ -2,7 +2,7 @@
<% Enumeration::OPTIONS.each do |option, name| %>
- <% if @params[:opt]==option %>
+ <% if params[:opt]==option %>
<p><%= image_tag 'dir_open' %> <b><%= l(name) %></b></p>
<ul>
diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml
index eeea3ef26..0f7be43a3 100644
--- a/app/views/layouts/base.rhtml
+++ b/app/views/layouts/base.rhtml
@@ -49,7 +49,7 @@
<li class="submenu"><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "picAdmin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li>
<% end %>
- <li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => @params[:controller], :page => @params[:action] }, :target => "new", :class => "picHelp" %></li>
+ <li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :target => "new", :class => "picHelp" %></li>
<% if loggedin? %>
<li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li>