diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-03 14:31:32 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-03 14:31:32 +0000 |
commit | 3c06f66d716cb7abba98f5efec203afb0e3578e8 (patch) | |
tree | cdd6ad515364936a7cb69e5297c80856e210b691 /app/controllers/queries_controller.rb | |
parent | 87bcb215630263f7ccb6480d2a44cf8901ea84d5 (diff) | |
download | redmine-3c06f66d716cb7abba98f5efec203afb0e3578e8.tar.gz redmine-3c06f66d716cb7abba98f5efec203afb0e3578e8.zip |
Shorten query[column_names] param name.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5304 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/queries_controller.rb')
-rw-r--r-- | app/controllers/queries_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/queries_controller.rb b/app/controllers/queries_controller.rb index e54c9befb..60f3b445f 100644 --- a/app/controllers/queries_controller.rb +++ b/app/controllers/queries_controller.rb @@ -25,10 +25,11 @@ class QueriesController < ApplicationController @query.project = params[:query_is_for_all] ? nil : @project @query.user = User.current @query.is_public = false unless User.current.allowed_to?(:manage_public_queries, @project) || User.current.admin? - @query.column_names = nil if params[:default_columns] @query.add_filters(params[:fields] || params[:f], params[:operators] || params[:op], params[:values] || params[:v]) if params[:fields] || params[:f] @query.group_by ||= params[:group_by] + @query.column_names = params[:c] if params[:c] + @query.column_names = nil if params[:default_columns] if request.post? && params[:confirm] && @query.save flash[:notice] = l(:notice_successful_create) @@ -45,6 +46,8 @@ class QueriesController < ApplicationController @query.attributes = params[:query] @query.project = nil if params[:query_is_for_all] @query.is_public = false unless User.current.allowed_to?(:manage_public_queries, @project) || User.current.admin? + @query.group_by ||= params[:group_by] + @query.column_names = params[:c] if params[:c] @query.column_names = nil if params[:default_columns] if @query.save |