summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-21 14:57:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-21 14:57:53 +0000
commitdfc76ce642ee1ca5f50f15a0d3956c688d38246a (patch)
treee05e07f4ad02f85e98d31efaa27e66e26c0edef5 /lib
parent7087a53f27a878864800ba08d20212cd160b7193 (diff)
downloadredmine-dfc76ce642ee1ca5f50f15a0d3956c688d38246a.tar.gz
redmine-dfc76ce642ee1ca5f50f15a0d3956c688d38246a.zip
Fixed: new gantt chart discloses all private projects names (#6276).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4425 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/helpers/gantt.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index ac8f80d0f..4218c51ef 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -91,7 +91,7 @@ module Redmine
if @project
return number_of_rows_on_project(@project)
else
- Project.roots.inject(0) do |total, project|
+ Project.roots.visible.inject(0) do |total, project|
total += number_of_rows_on_project(project)
end
end
@@ -119,7 +119,7 @@ module Redmine
end
# Subprojects
- project.children.each do |subproject|
+ project.children.visible.each do |subproject|
count += number_of_rows_on_project(subproject)
end
@@ -134,7 +134,7 @@ module Redmine
if @project
output << render_project(@project, options)
else
- Project.roots.each do |project|
+ Project.roots.visible.each do |project|
output << render_project(project, options)
end
end
@@ -150,7 +150,7 @@ module Redmine
if @project
output << render_project(@project, options)
else
- Project.roots.each do |project|
+ Project.roots.visible.each do |project|
output << render_project(project, options)
end
end
@@ -191,7 +191,7 @@ module Redmine
end
# Fourth, subprojects
- project.children.each do |project|
+ project.children.visible.each do |project|
subproject_rendering = render_project(project, options)
output << subproject_rendering if options[:format] == :html
end