]> source.dussan.org Git - redmine.git/commitdiff
Do not use instance variable.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 23 Nov 2011 18:32:21 +0000 (18:32 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 23 Nov 2011 18:32:21 +0000 (18:32 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7897 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/query.rb

index 2f99d0fe7292ecc5697c442c5132edd7b4b2e22b..a215ac4e4b2575d0106a37660db2885f5146dad7 100644 (file)
@@ -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")