Changeset 35 in bookmarks
- Timestamp:
- 05/25/13 02:01:08 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BookmarkApp.pm
r33 r35 69 69 # list all the bookmarks 70 70 my $format = $q->param('format') || 'html'; 71 my $tag = $q->param('tag'); 72 my @tags = $q->param('tag'); 73 # special case: handle the empty tag 74 if (@tags == 1 && $tags[0] eq '') { 75 @tags = (); 76 } 71 72 my @tags = grep { $_ ne '' } $q->param('tag'); 77 73 my $limit = $q->param('limit'); 78 74 my $offset = $q->param('offset'); … … 82 78 offset => $offset, 83 79 }); 84 my @all_tags = $bookmarks->get_tags({ selected => $tag });80 my @all_tags = $bookmarks->get_tags({ selected => $tags[0] }); 85 81 my @cotags = $bookmarks->get_cotags({ tag => \@tags }); 86 82 … … 186 182 base_url => $base_url, 187 183 title => $title, 188 selected_tag => $tag ,184 selected_tag => $tags[0], 189 185 search_tags => \@tags, 190 186 links => \@links, … … 201 197 my $q = $self->query; 202 198 203 my $tag = $q->param('tag'); 204 my @tags = $q->param('tag'); 205 # special case: handle the empty tag 206 if (@tags == 1 && $tags[0] eq '') { 207 @tags = (); 208 } 209 199 my @tags = grep { $_ ne '' } $q->param('tag'); 210 200 my $title = 'Bookmarks' . (@tags ? " tagged as " . join(' & ', @tags) : ''); 211 201
Note: See TracChangeset
for help on using the changeset viewer.