mirror of
https://github.com/redmine/redmine.git
synced 2026-03-06 04:21:23 +01:00
Removes calls to child_ids.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2151 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -79,7 +79,7 @@ class Project < ActiveRecord::Base
|
||||
def issues_with_subprojects(include_subprojects=false)
|
||||
conditions = nil
|
||||
if include_subprojects
|
||||
ids = [id] + child_ids
|
||||
ids = [id] + descendants.collect(&:id)
|
||||
conditions = ["#{Project.table_name}.id IN (#{ids.join(',')}) AND #{Project.visible_by}"]
|
||||
end
|
||||
conditions ||= ["#{Project.table_name}.id = ?", id]
|
||||
|
||||
@@ -268,10 +268,10 @@ class Query < ActiveRecord::Base
|
||||
# main project only
|
||||
else
|
||||
# all subprojects
|
||||
ids += project.child_ids
|
||||
ids += project.descendants.collect(&:id)
|
||||
end
|
||||
elsif Setting.display_subprojects_issues?
|
||||
ids += project.child_ids
|
||||
ids += project.descendants.collect(&:id)
|
||||
end
|
||||
project_clauses << "#{Project.table_name}.id IN (%s)" % ids.join(',')
|
||||
elsif project
|
||||
|
||||
Reference in New Issue
Block a user