]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Feed content limit setting has no effect (closes #954).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 30 Mar 2008 08:33:04 +0000 (08:33 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 30 Mar 2008 08:33:04 +0000 (08:33 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1310 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/application.rb

index 98cb4a8272d8e89f6d1e04a4106bd46fa0dddf87..abf62164132805521d507c982f77233aadbdf006 100644 (file)
@@ -150,6 +150,7 @@ class ApplicationController < ActionController::Base
   def render_feed(items, options={})    
     @items = items || []
     @items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
+    @items = @items.slice(0, Setting.feeds_limit.to_i)
     @title = options[:title] || Setting.app_title
     render :template => "common/feed.atom.rxml", :layout => false, :content_type => 'application/atom+xml'
   end