]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchView.pm
Merge remote-tracking branch 'origin/danga-bundle'
[public-inbox.git] / lib / PublicInbox / SearchView.pm
index 5d500c1b2ee655c26c214e9f75e36d427ecc7b7b..3b3afdee3db7e99d01e4ac7ac6383b4b6ccf1fd5 100644 (file)
@@ -120,6 +120,7 @@ sub mset_summary {
                }
                my $date = PublicInbox::View::fmt_ts($smsg->ds);
                my $mid = PublicInbox::Hval->new_msgid($smsg->mid)->{href};
+               $s = '(no subject)' if $s eq '';
                $$res .= qq{$rank. <b><a\nhref="$mid/">}.
                        $s . "</a></b>\n";
                $$res .= "$pfx  - by $f @ $date UTC [$pct%]\n\n";
@@ -231,7 +232,7 @@ sub mset_thread {
                $r ? sort_relevance(\%pct) : *PublicInbox::View::sort_ds,
                $ctx);
        my $skel = search_nav_bot($mset, $q). "<pre>";
-       my $inbox = $ctx->{-inbox};
+       my $ibx = $ctx->{-inbox};
        $ctx->{-upfx} = '';
        $ctx->{anchor_idx} = 1;
        $ctx->{cur_level} = 0;
@@ -240,7 +241,6 @@ sub mset_thread {
        $ctx->{pct} = \%pct;
        $ctx->{prev_attr} = '';
        $ctx->{prev_level} = 0;
-       $ctx->{seen} = {};
        $ctx->{s_nr} = scalar(@$msgs).'+ results';
 
        # reduce hash lookups in skel_dump
@@ -253,7 +253,7 @@ sub mset_thread {
                return unless $msgs;
                my $smsg;
                while (my $m = pop @$msgs) {
-                       $smsg = $inbox->smsg_mime($m) and last;
+                       $smsg = $ibx->smsg_mime($m) and last;
                }
                if ($smsg) {
                        return PublicInbox::View::index_entry($smsg, $ctx,
@@ -337,7 +337,7 @@ sub qs_html {
                $qs .= "&amp;o=$o";
        }
        if (my $l = $self->{l}) {
-               $qs .= "&amp;l=$l";
+               $qs .= "&amp;l=$l" unless $l == $LIM;
        }
        if (my $r = $self->{r}) {
                $qs .= "&amp;r";