Changeset 1959

Show
Ignore:
Timestamp:
09/29/07 13:59:04
Author:
otsune
Message:

- Add copyright.
- fix add_enclosure in RSS (see CAVEATS at perldoc XML::RSS::LibXML).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Publish/Feed.pm

    r1898 r1959  
    4949    $feed->modified(Plagger::Date->now); 
    5050    $feed->generator("Plagger/$Plagger::VERSION"); 
    51     $feed->description($f->description || ''); 
     51    $feed->description($f->description); 
     52    $feed->copyright($f->meta->{copyright}) if $f->meta->{copyright}; 
    5253    $feed->author( $self->make_author($f->author, $feed_format) ) 
    5354        if $f->primary_author; 
     
    149150*XML::Feed::Entry::RSS::add_enclosure = sub { 
    150151    my($entry, $enclosure) = @_; 
    151     $entry->{entry}->{enclosure} = { 
    152         url    => $enclosure->{url}, 
    153         type   => $enclosure->{type}, 
    154         length => $enclosure->{length}, 
    155     }; 
     152    $entry->{entry}->{enclosure} = XML::RSS::LibXML::MagicElement->new( 
     153        attributes => { 
     154            url    => $enclosure->{url}, 
     155            type   => $enclosure->{type}, 
     156            length => $enclosure->{length}, 
     157        } 
     158    ); 
    156159}; 
    157  
    158160 
    1591611;