修复未公开项目动态仍在主页最新动态显示的问题

This commit is contained in:
sw 2014-06-23 14:19:01 +08:00
parent 0dce86d47e
commit 358d4a53b8
2 changed files with 14 additions and 3 deletions

View File

@ -88,10 +88,21 @@ module Redmine
def events_welcome(from = nil, to = nil, options={})
e = []
@options[:limit] = options[:limit]
@scope.each do |event_type|
constantized_providers(event_type).each do |provider|
e += provider.find_events1(event_type, @user, from, to, @options)
cur_objs = provider.find_events1(event_type, @user, from, to, @options)
cur_objs.each do |cur_obj|
if cur_obj.class == Issue
if cur_obj.project != nil && cur_obj.project.project_status != nil
e += [cur_obj]
end
else
e += [cur_obj]
end
end
end
if e.count > options[:limit]
break
end
end