Project

General

Profile

Feature #337 » private_issues.v.0.7-0.7.1.diff

for v.0.7 and v.0.7-0.9.3 - Oleg Volkov, 2010-04-29 21:32

View differences:

redmine/app/controllers/projects_controller.rb 2010-04-29 23:10:11.926410602 +0400
@activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty?
events = @activity.events(@date_from, @date_to)
# The private issues should be removed from events
events.delete_if { |e| e.is_a?(Issue) && !e.visible? || e.is_a?(Journal) && !e.issue.visible? }
if events.empty? || stale?(:etag => [events.first, User.current])
respond_to do |format|
redmine/lib/redmine/activity/fetcher.rb 2010-04-29 22:48:01.133768191 +0400
# sorted in reverse chronological order
def events(from = nil, to = nil, options={})
e = []
@options[:limit] = options[:limit]
# @options[:limit] = options[:limit]
@scope.each do |event_type|
constantized_providers(event_type).each do |provider|
e += provider.find_events(event_type, @user, from, to, @options)
end
end
e.delete_if { |a| a.is_a?(Issue) && !a.visible? || a.is_a?(Journal) && !a.issue.visible? }
e.sort! {|a,b| b.event_datetime <=> a.event_datetime}
(15-15/17)