Skip to content

Commit

Permalink
Fix atom self link, fix the enclosure tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Aug 4, 2010
1 parent e87e44e commit f17ec1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions vendor/modules/feed/app/controllers/feed/rss_renderer.rb
Expand Up @@ -35,6 +35,7 @@ def feed

results = renderer_cache(nil,site_node.id.to_s, :skip => @options.timeout <= 0, :expires => @options.timeout*60) do |cache|
data = @handler.get_feed
data[:self_link] = Configuration.domain_link site_node.node_path
if @handler_info[:custom]
cache[:output] = render_to_string(:partial => @handler_info[:custom],:locals => { :data => data})
else
Expand Down
6 changes: 3 additions & 3 deletions vendor/modules/feed/app/views/feed/rss/_feed.rxml
@@ -1,6 +1,6 @@
xml.instruct!

xml.rss "version" => "2.0", "xmlns:atom" => "http://www.w3.org/2005/Atom", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns:media" => "http://search.yahoo.com/mrss" do
xml.rss "version" => "2.0", "xmlns:atom" => "http://www.w3.org/2005/Atom", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns:media" => "http://search.yahoo.com/mrss/" do

xml.channel do
xml.title(data[:title])
Expand Down Expand Up @@ -28,10 +28,10 @@ xml.channel do
xml.pubDate item[:published_at]
xml.description item[:description]
if item[:enclosure]
xml.enclosure( :url => item[:enclosure].full_url, :size => item[:enclosure].file_size, :type => item[:enclosure].mime_type )
xml.enclosure( :url => item[:enclosure].full_url, :length => item[:enclosure].file_size, :type => item[:enclosure].mime_type )
end
if item[:thumbnail]
xml.media( :thumbnail, :url => item[:thumbnail].full_url(:preview), :type => item[:thumbnail].mime_type, :width => item[:thumbnail].width(:preview), :height => item[:thumbnail].height(:preview) )
xml.media( :thumbnail, :url => item[:thumbnail].full_url(:preview), :width => item[:thumbnail].width(:preview), :height => item[:thumbnail].height(:preview) )
end
end
end
Expand Down

0 comments on commit f17ec1d

Please sign in to comment.