Changeset 1488

Show
Ignore:
Timestamp:
08/20/06 17:19:56
Author:
youpy
Message:
  • added test for Subscription::Bookmarks::Safari
  • Subscription::bookmarks::Safari: fix tagging
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Subscription/Bookmarks/Safari.pm

    r996 r1488  
    99 
    1010    my $plist = Mac::Tie::PList->new_from_file($self->conf->{path}); 
    11     $self->find_feed($context, $plist, []); 
     11    $self->find_feed($context, $plist); 
    1212} 
    1313 
    1414sub find_feed { 
    15     my($self, $context, $plist, $tags) = @_; 
     15    my($self, $context, $plist, @tags) = @_; 
    1616 
    17     if(my @children = @{$plist->{Children}}) { 
    18         push(@$tags, $plist->{Title}) if $plist->{Title}; 
     17    if($plist->{Children}) { 
     18        push(@tags, $plist->{Title}) if $plist->{Title}; 
    1919 
    20         for my $child (@children) { 
    21             $self->find_feed($context, $child, $tags); 
     20        for my $child (@{$plist->{Children}}) { 
     21            $self->find_feed($context, $child, @tags); 
    2222        } 
    2323    } elsif($plist->{URLString}) { 
     
    3535        $feed->url($url->as_string); 
    3636        $feed->title($plist->{URIDictionary}->{title}); 
    37         $feed->tags($tags); 
     37        $feed->tags(\@tags); 
    3838        $context->subscription->add($feed); 
    3939    }