diff options
author | Eric Wong <e@80x24.org> | 2017-04-12 21:10:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-04-12 21:10:05 +0000 |
commit | 3d6bb5064927764e57758d195db78639f4ec87f3 (patch) | |
tree | 93bec3910c76164f105ddcea46a3fcc365f10d1a /lib/PublicInbox/SearchView.pm | |
parent | 8a3fc4a2f027b36f27225ceee5908c571c8f4f47 (diff) | |
parent | de243560e2caa1d19bcbf518edfaf8b016161245 (diff) | |
download | public-inbox-3d6bb5064927764e57758d195db78639f4ec87f3.tar.gz |
* origin/master: search: fix help message for searching within quotes learn: scan all inboxes when learning spam watchmaildir: do not reject lowercase flags on Maildir files searchview: show full (&x=t) messages in ascending chronlogical order searchview: add "t" id to link to thread overview extmsg: use updated mail-archive.com URL view: escape HTML description name
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index f1c4b6a0..cec87c6a 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -145,7 +145,7 @@ sub search_nav_bot { my $o = $q->{o}; my $end = $o + $nr; my $beg = $o + 1; - my $rv = '</pre><hr><pre>'; + my $rv = '</pre><hr><pre id=t>'; if ($beg <= $end) { $rv .= "Results $beg-$end of $total"; $rv .= ' (estimated)' if $end != $total; @@ -185,9 +185,9 @@ sub mset_thread { $pct{$smsg->mid} = $i->get_percent; $smsg; } ($mset->items) ]}); - + my $r = $q->{r}; my $rootset = PublicInbox::SearchThread::thread($msgs, - $q->{r} ? sort_relevance(\%pct) : *PublicInbox::View::sort_ts); + $r ? sort_relevance(\%pct) : *PublicInbox::View::sort_ts); my $skel = search_nav_bot($mset, $q). "<pre>"; my $inbox = $ctx->{-inbox}; $ctx->{-upfx} = ''; @@ -203,11 +203,11 @@ sub mset_thread { PublicInbox::View::walk_thread($rootset, $ctx, *PublicInbox::View::pre_thread); - + @$msgs = reverse @$msgs if $r; my $mime; sub { return unless $msgs; - while ($mime = shift @$msgs) { + while ($mime = pop @$msgs) { $mime = $inbox->msg_by_smsg($mime) and last; } if ($mime) { |