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

Download (1.62 KB)

View differences:

redmine/app/controllers/projects_controller.rb 2010-04-29 23:10:11.926410602 +0400
334 334
    @activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty?
335 335

  
336 336
    events = @activity.events(@date_from, @date_to)
337

  
338
    # The private issues should be removed from events
339
    events.delete_if { |e| e.is_a?(Issue) && !e.visible? || e.is_a?(Journal) && !e.issue.visible? }
340 337
    
341 338
    if events.empty? || stale?(:etag => [events.first, User.current])
342 339
      respond_to do |format|
redmine/lib/redmine/activity/fetcher.rb 2010-04-29 22:48:01.133768191 +0400
69 69
      # sorted in reverse chronological order
70 70
      def events(from = nil, to = nil, options={})
71 71
        e = []
72
        @options[:limit] = options[:limit]
72
#        @options[:limit] = options[:limit]
73 73
        
74 74
        @scope.each do |event_type|
75 75
          constantized_providers(event_type).each do |provider|
76 76
            e += provider.find_events(event_type, @user, from, to, @options)
77 77
          end
78 78
        end
79
        e.delete_if { |a| a.is_a?(Issue) && !a.visible? || a.is_a?(Journal) && !a.issue.visible? }
79 80
        
80 81
        e.sort! {|a,b| b.event_datetime <=> a.event_datetime}
81 82