Changeset 1793

Show
Ignore:
Timestamp:
10/24/06 12:43:32
Author:
miyagawa
Message:

Publish::Maildir: use entry date as email date. fix enclosure if local file path is not found

Files:

Legend:

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

    r1790 r1793  
    7575    my $from = $cfg->{mailfrom} || 'plagger@localhost'; 
    7676    my $id   = md5_hex($entry->id_safe); 
    77     my $now  = Plagger::Date->now(timezone => $context->conf->{timezone}); 
     77    my $date = $entry->date || Plagger::Date->now(timezone => $context->conf->{timezone}); 
    7878    my @enclosure_cb; 
    7979 
     
    8282    } 
    8383    $msg = MIME::Lite->new( 
    84         Date    => $now->format('Mail'), 
     84        Date    => $date->format('Mail'), 
    8585        From    => encode('MIME-Header', qq("$feed_title" <$from>)), 
    8686        To      => $cfg->{mailto}, 
     
    142142 
    143143        for my $enclosure (grep $_->local_path, $entry->enclosures) { 
     144            if (!-e $enclosure->local_path) { 
     145                Plagger->context->log(warning => $enclosure->local_path .  " doesn't exist.  Skip"); 
     146                next; 
     147            } 
     148 
    144149            my %param = ( 
    145150                Type     => $enclosure->type,