Changeset 1829

Show
Ignore:
Timestamp:
11/11/06 01:31:47
Author:
aimbert
Message:

initial commit to add support of the Atom Threads extension in plagger.
- a new Plagger::Thing::Relationship class
- some small core changes
- a new Namespace::Threads plugin
- a new Publish::DebugThreads? plugin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/feature-antoine-threading/plagger/lib/Plagger.pm

    r1810 r1829  
    1515 
    1616use base qw( Class::Accessor::Fast ); 
    17 __PACKAGE__->mk_accessors( qw(conf update subscription plugins_path cache) ); 
     17__PACKAGE__->mk_accessors( qw(conf update subscription relationship plugins_path cache) ); 
    1818 
    1919use Plagger::Cache; 
     
    2626use Plagger::Template; 
    2727use Plagger::Update; 
     28use Plagger::Thing::Relationship; 
    2829use Plagger::UserAgent; # use to define $XML::Feed::RSS::PREFERRED_PARSER 
    2930 
     
    3940        update => Plagger::Update->new, 
    4041        subscription => Plagger::Subscription->new, 
     42        relationship => Plagger::Thing::Relationship->new, 
    4143        plugins_path => {}, 
    4244        plugins => [], 
     
    291293    $self->run_hook('subscription.load'); 
    292294 
    293     for my $feed ($self->subscription->feeds) { 
     295    # XXX use the arrayref instead of the array here to allow the addition of new feeds on the fly 
     296    # maybe something like an iterator can be better 
     297    for my $feed (@{$self->subscription->feeds}) {  
    294298        if (my $sub = $feed->aggregator) { 
    295299            $sub->($self, { feed => $feed }); 
  • branches/feature-antoine-threading/plagger/lib/Plagger/Entry.pm

    r1741 r1829  
    6464} 
    6565 
     66sub key { $_[0]->id } 
     67 
    6668sub title_text { 
    6769    my $self = shift; 
  • branches/feature-antoine-threading/plagger/lib/Plagger/Feed.pm

    r1741 r1829  
    5353    Plagger::Util::safe_id($self->id); 
    5454} 
     55 
     56sub key { $_[0]->url } 
    5557 
    5658sub title_text { 
  • branches/feature-antoine-threading/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r1769 r1829  
    180180            orig_feed  => $remote, 
    181181        }; 
     182 
     183        $feed->add_entry($entry); 
     184        # the hook is called after the add_entry to allow it to delete the entry. 
    182185        $context->run_hook('aggregator.entry.fixup', $args); 
    183  
    184         $feed->add_entry($entry); 
    185186    } 
    186187 
  • branches/feature-antoine-threading/plagger/lib/Plagger/Thing.pm

    r1741 r1829  
    6565} 
    6666 
     67sub get_relationship { 
     68    my ($self, $r_name) = @_; 
     69    Plagger->context->relationship->get($self, $r_name); 
     70} 
     71 
     72sub set_relationship { 
     73    my ($self, $r_name, $thing) = @_; 
     74    Plagger->context->relationship->set($self, $r_name, $thing); 
     75} 
     76 
    67771;