Changeset 13 in bookmarks
- Timestamp:
- 01/19/13 17:16:14 (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BookmarkApp.pm
r9 r13 70 70 my $format = $q->param('format') || 'html'; 71 71 my $tag = $q->param('tag'); 72 my @resources = $bookmarks->get_resources({ tag => $tag }); 72 my $limit = $q->param('limit'); 73 my $offset = $q->param('offset'); 74 my @resources = $bookmarks->get_resources({ 75 tag => $tag, 76 limit => $limit, 77 offset => $offset, 78 }); 73 79 my @all_tags = $bookmarks->get_tags({ selected => $tag }); 74 80 my @cotags = $bookmarks->get_cotags({ tag => $tag }); -
trunk/Bookmarks.pm
r9 r13 38 38 my $tag = $params->{tag}; 39 39 my $limit = $params->{limit}; 40 my $offset = $params->{offset}; 40 41 41 42 my ($sql, @bind) = sql_interp( … … 43 44 ($tag ? ('join tags on resources.uri = tags.uri where tags.tag =', \$tag) : ''), 44 45 'order by ctime desc', 45 ($limit ? ('limit', \$limit) : ''), 46 ($limit ? ('limit', \$limit) : ()), 47 # an offset is only allowed if we have a limit clause 48 ($limit && $offset ? ('offset', \$offset) : ()), 46 49 ); 47 50
Note: See TracChangeset
for help on using the changeset viewer.