Changeset 400

Show
Ignore:
Timestamp:
03/14/06 20:38:10
Author:
miyagawa
Message:

Oops, still need this for Bloglines.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/FeedBurnerPermalink.pm

    r399 r400  
    88        $self, 
    99        'aggregator.entry.fixup' => \&fixup, 
     10        'update.entry.fixup' => \&filter, 
    1011    ); 
    1112} 
     
    1819        $args->{entry}->permalink($orig_link); 
    1920        $context->log(info => "Permalink rewritten to $orig_link"); 
     21    } 
     22} 
     23 
     24sub filter { 
     25    my($self, $context, $args) = @_; 
     26 
     27    # RSS 2.0 SmartFeed 
     28    my $entry = $args->{entry}; 
     29    if ($entry->permalink =~ m!^http://feeds\.feedburner\.(com|jp)/!) { 
     30        $entry->permalink( $entry->id . "" ); # stringify guid 
     31        $context->log(info => "Permalink rewritten to " . $entry->permalink); 
    2032    } 
    2133}