summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-23 18:32:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-23 18:32:21 +0000
commit2081730f42d46170244d36a18d329fa6fd669dc1 (patch)
tree496b7cdf8f9ed6d6400e47ed92a08cb9c46a6bc5
parenta756103b10ecac1e4ec89ebb7d5644c2fff6b7d4 (diff)
downloadredmine-2081730f42d46170244d36a18d329fa6fd669dc1.tar.gz
redmine-2081730f42d46170244d36a18d329fa6fd669dc1.zip
Do not use instance variable.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7897 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/query.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index 2f99d0fe7..a215ac4e4 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -266,21 +266,21 @@ class Query < ActiveRecord::Base
if project
# project specific filters
- categories = @project.issue_categories.all
+ categories = project.issue_categories.all
unless categories.empty?
@available_filters["category_id"] = { :type => :list_optional, :order => 6, :values => categories.collect{|s| [s.name, s.id.to_s] } }
end
- versions = @project.shared_versions.all
+ versions = project.shared_versions.all
unless versions.empty?
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => versions.sort.collect{|s| ["#{s.project.name} - #{s.name}", s.id.to_s] } }
end
- unless @project.leaf?
- subprojects = @project.descendants.visible.all
+ unless project.leaf?
+ subprojects = project.descendants.visible.all
unless subprojects.empty?
@available_filters["subproject_id"] = { :type => :list_subprojects, :order => 13, :values => subprojects.collect{|s| [s.name, s.id.to_s] } }
end
end
- add_custom_fields_filters(@project.all_issue_custom_fields)
+ add_custom_fields_filters(project.all_issue_custom_fields)
else
# global filters for cross project issue list
system_shared_versions = Version.visible.find_all_by_sharing('system')
@@ -460,7 +460,7 @@ class Query < ActiveRecord::Base
def project_statement
project_clauses = []
- if project && !@project.descendants.active.empty?
+ if project && !project.descendants.active.empty?
ids = [project.id]
if has_filter?("subproject_id")
case operator_for("subproject_id")