]> source.dussan.org Git - redmine.git/commitdiff
fixed: error on feeds/news when no news exist
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 15 Mar 2007 19:20:49 +0000 (19:20 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 15 Mar 2007 19:20:49 +0000 (19:20 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@336 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/feeds/news.rxml

index 8c7a855b8a2b541f0e842f31116f8d4eecd41d7a..a85d86715e2d987f774014a10db5d8bd5aebb801 100644 (file)
@@ -3,7 +3,7 @@ xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
   xml.channel do\r
     xml.title "#{Setting.app_title}: #{l(:label_news_latest)}"\r
     xml.link url_for(:controller => 'welcome', :only_path => false)\r
-    xml.pubDate CGI.rfc1123_date(@news.first.created_on)\r
+    xml.pubDate CGI.rfc1123_date(@news.first ? @news.first.created_on : Time.now)\r
     xml.description l(:label_news_latest)\r
     @news.each do |news|\r
       xml.item do\r