Changeset 1488
- Timestamp:
- 08/20/06 17:19:56
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Subscription/Bookmarks/Safari.pm
r996 r1488 9 9 10 10 my $plist = Mac::Tie::PList->new_from_file($self->conf->{path}); 11 $self->find_feed($context, $plist , []);11 $self->find_feed($context, $plist); 12 12 } 13 13 14 14 sub find_feed { 15 my($self, $context, $plist, $tags) = @_;15 my($self, $context, $plist, @tags) = @_; 16 16 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}; 19 19 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); 22 22 } 23 23 } elsif($plist->{URLString}) { … … 35 35 $feed->url($url->as_string); 36 36 $feed->title($plist->{URIDictionary}->{title}); 37 $feed->tags( $tags);37 $feed->tags(\@tags); 38 38 $context->subscription->add($feed); 39 39 }
