Changeset 384

Show
Ignore:
Timestamp:
03/09/06 15:51:59
Author:
miyagawa
Message:

Try real hard in $entry->link. Added $entry->feed_link to point to $feed->link

Files:

Legend:

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

    r310 r384  
    33 
    44use base qw( Plagger::Thing ); 
    5 __PACKAGE__->mk_accessors(qw( title author tags date link id summary body rate icon meta source )); 
     5__PACKAGE__->mk_accessors(qw( title author tags date link feed_link id summary body rate icon meta source )); 
    66 
    77use Digest::MD5; 
     
    4848sub id_safe { 
    4949    my $self = shift; 
    50     my $id   = $self->id || $self->link; 
     50    my $id   = $self->id || $self->permalink; 
     51 
     52    # entry without id or permalink. Try entry's date or title 
     53    unless ($id) { 
     54        $id  = $self->feed_link; 
     55        $id .= $self->date ? $self->date->epoch : $self->title; 
     56    } 
     57 
    5158    $id =~ m!^https?://! ? Digest::MD5::md5_hex($id) : $id; 
    5259} 
  • trunk/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r358 r384  
    9999 
    100100        $entry->link($e->link); 
     101        $entry->feed_link($feed->link); 
    101102        $entry->id($e->id); 
    102103        $entry->body($e->content->body); 
  • trunk/plagger/lib/Plagger/Plugin/Subscription/Bloglines.pm

    r336 r384  
    159159            $entry->date( Plagger::Date->parse('Mail', $item->{pubDate}) ); 
    160160            $entry->link($item->{link}); 
     161            $entry->feed_link($feed->link); 
    161162            $entry->id($item->{guid}); 
    162163