Changeset 88 in bookmarks for trunk/lib/Bookmarks
- Timestamp:
- 06/04/15 22:00:25 (9 years ago)
- Location:
- trunk/lib/Bookmarks
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Bookmarks/Controller.pm
r75 r88 7 7 use JSON; 8 8 use Bookmarks; 9 use Bookmarks::List; 9 10 use URI; 10 11 use Template; … … 83 84 my $offset = $self->request->param('offset'); 84 85 85 my $list = $self->bookmarks->get_bookmarks({ 86 query => $query, 87 tags => \@tags, 88 limit => $limit, 89 offset => $offset, 86 my $list = Bookmarks::List->new({ 87 bookmarks => $self->bookmarks, 88 search => $self->bookmarks->search({ 89 query => $query, 90 tags => \@tags, 91 limit => $limit, 92 offset => $offset, 93 }), 90 94 }); 91 95 … … 104 108 105 109 # construct a feed from the most recent 12 bookmarks 106 my $list = $self->bookmarks->get_bookmarks({ query => $query, tags => \@tags, limit => 12 }); 110 my $list = Bookmarks::List->new({ 111 bookmarks => $self->bookmarks, 112 search => $self->bookmarks->search({ query => $query, tags => \@tags, limit => 12 }), 113 }); 107 114 return $list->as_atom; 108 115 } -
trunk/lib/Bookmarks/List.pm
r71 r88 13 13 is => 'ro', 14 14 isa => 'Bookmarks::Search', 15 handles => [qw{query tags limit offset }],15 handles => [qw{query tags limit offset results}], 16 16 ); 17 has results => ( is => 'ro' );18 17 has title => ( 19 18 is => 'ro', -
trunk/lib/Bookmarks/Search.pm
r71 r88 11 11 has offset => (is => 'ro'); 12 12 13 has results => (is => 'rw', default => sub { [] }); 14 13 15 # module return 14 16 1;
Note: See TracChangeset
for help on using the changeset viewer.