Commit 192b9008 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

fixed: error on feeds/news when no news exist

git-svn-id: http://redmine.rubyforge.org/svn/trunk@336 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 56d0af47
......@@ -3,7 +3,7 @@ xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
xml.channel do
xml.title "#{Setting.app_title}: #{l(:label_news_latest)}"
xml.link url_for(:controller => 'welcome', :only_path => false)
xml.pubDate CGI.rfc1123_date(@news.first.created_on)
xml.pubDate CGI.rfc1123_date(@news.first ? @news.first.created_on : Time.now)
xml.description l(:label_news_latest)
@news.each do |news|
xml.item do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment