mirror of
https://github.com/redmine/redmine.git
synced 2025-11-04 20:35:57 +01:00
Cleanup of finders with :conditions option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11963 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -185,7 +185,7 @@ module QueriesHelper
|
||||
if !params[:query_id].blank?
|
||||
cond = "project_id IS NULL"
|
||||
cond << " OR project_id = #{@project.id}" if @project
|
||||
@query = IssueQuery.find(params[:query_id], :conditions => cond)
|
||||
@query = IssueQuery.where(cond).find(params[:query_id])
|
||||
raise ::Unauthorized unless @query.visible?
|
||||
@query.project = @project
|
||||
session[:query] = {:id => @query.id, :project_id => @query.project_id}
|
||||
|
||||
Reference in New Issue
Block a user