Changeset 123

Show
Ignore:
Timestamp:
02/23/06 21:15:09
Author:
miyagawa
Message:

Oops, [122] broke the FeedBurnerPermalink? plugin. Revert it and add $e->id_safe

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Entry.pm

    r122 r123  
    33 
    44use base qw( Class::Accessor::Fast ); 
    5 __PACKAGE__->mk_accessors(qw( title author tags date link summary body rate  meta)); 
     5__PACKAGE__->mk_accessors(qw( title author tags date link id summary body rate  meta)); 
    66 
    77use Digest::MD5; 
     
    6565} 
    6666 
    67 sub id
     67sub id_safe
    6868    my $self = shift; 
    69     $self->{id} = shift if @_
    70     $self->{id} || Digest::MD5::md5_hex($self->permalink)
     69    my $id   = $self->id || $self->link
     70    $id =~ m!^https?://! ? Digest::MD5::md5_hex($id) : $id
    7171} 
    7272 
  • trunk/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r122 r123  
    5858            if eval { $e->issued }; 
    5959        $entry->link($e->link); 
    60         $entry->id( $e->id ) if $e->id !~ m!^http://!
     60        $entry->id($e->id)
    6161        $entry->body($e->content->body); 
    6262 
  • trunk/plagger/lib/Plagger/Plugin/Publish/Spotlight.pm

    r122 r123  
    2222 
    2323    for my $entry ($args->{feed}->entries) { 
    24         my $file = $entry->id . '.webbookmark'; 
     24        my $file = $entry->id_safe . '.webbookmark'; 
    2525        my $path = File::Spec->catfile($dir, $file); 
    2626        $context->log(info => "writing output to $path"); 
  • trunk/plagger/lib/Plagger/Plugin/Subscription/Bloglines.pm

    r122 r123  
    101101            $entry->date( Plagger::Date->parse('Mail', $item->{pubDate}) ); 
    102102            $entry->link($item->{link}); 
    103             $entry->id($item->{guid}) 
    104                 if $item->{guid} && $item->{guid} !~ m!^http://!; 
     103            $entry->id($item->{guid}); 
     104 
    105105            $entry->body($item->{description}); 
    106106 
  • trunk/plagger/templates/plugins/gmail_notify.tt

    r67 r123  
    1616[% IF entry.body.match('(?i)^<p[ >]') %][% entry.body %][% ELSE %]<div style="padding: 1em 0">[% entry.body %]</div>[% END %] 
    1717[% ELSE %]<br />[% END %] 
    18 <div style="font-size:0.8em">[% IF entry.date %]Posted on [% entry.date.format('Mail') %][% END %] | <a href="[% entry.permalink | html %]">permalink</a> | <a href="[% feed.link | html %]">[% feed.title | html %]</a>[% FOREACH widget = entry.widgets %] | [% widget.html(entry) %][% END %]<br clear="all" /></div> 
     18<div style="font-size:0.8em">[% IF entry.date %]Posted on [% entry.date.format('Mail') %][% END %] | <a href="[% item.permalink | html %]">permalink</a> | <a href="[% feed.link | html %]">[% feed.title | html %]</a>[% FOREACH widget = entry.widgets %] | [% widget.html(entry) %][% END %]<br clear="all" /></div> 
    1919</div> 
    2020[% UNLESS loop.last %]<hr />[% END %]