Changeset 991

Show
Ignore:
Timestamp:
06/14/06 12:49:00
Author:
miyagawa
Message:

support mixi_tos_paranoia mode

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/CustomFeed/MixiDiarySearch.pm

    r961 r991  
    4545    my %query = URI->new($url)->query_form; 
    4646 
     47    # heh, this is a "Cache" 
     48    my $title = "mixi: Search for " . decode("euc-jp", $query{keyword}); 
     49    if (!$self->conf->{mixi_tos_paranoia}) { 
     50        $title .= " (Cache)"; 
     51    } 
     52 
    4753    my $feed = $args->{feed}; 
    48     $feed->title("mixi: Search for " . decode("euc-jp", $query{keyword})); 
     54    $feed->title($title); 
    4955    $feed->link($url); 
    5056 
     
    96102 
    97103        my $entry = Plagger::Entry->new; 
    98         $entry->title($data->{title}); 
     104 
    99105        $entry->link( URI->new_abs($data->{link}, $url) ); 
    100106        $entry->date($data->{date}); 
    101         $entry->body( munge_body($data->{body}) ); 
    102         $entry->icon({ url => URI->new_abs($data->{photo}, $url) }); 
    103         $entry->author( decode_entities($data->{name}) ); 
     107 
     108        if ($self->conf->{mixi_tos_paranoia}) { 
     109            $entry->title( $entry->link->as_string ); 
     110        } else { 
     111            $entry->title($data->{title}); 
     112            $entry->body( munge_body($data->{body}) ); 
     113            $entry->icon({ url => URI->new_abs($data->{photo}, $url) }); 
     114            $entry->author( decode_entities($data->{name}) ); 
     115        } 
    104116 
    105117        $feed->add_entry($entry);