X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FSearchView.pm;h=b025ec964b8060157e881272701ebd6a9dd94424;hb=23af251dd607c4e75ab1e68063f2c885c48cc035;hp=a42867c5f577aee444eeacb2681b538dca717dd2;hpb=96b0a14be7e62742ad06f0a37c3cba61fe6c51e7;p=public-inbox.git diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index a42867c5..b025ec96 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # # Displays search results for the web interface @@ -193,18 +193,24 @@ sub search_nav_top { my $x = $q->{x}; my $pfx = "\t\t\t"; - if ($x eq '') { - my $t = $q->qs_html(x => 't'); - $rv .= qq{summary|nested} - } elsif ($x eq 't') { + if ($x eq 't') { my $s = $q->qs_html(x => ''); $rv .= qq{summary|nested}; $pfx = "thread overview below | "; + } else { + my $t = $q->qs_html(x => 't'); + $rv .= qq{summary|nested} } my $A = $q->qs_html(x => 'A', r => undef); - $rv .= qq{|Atom feed]}; + $rv .= qq{|Atom feed]\n}; + $rv .= <{t}; +*** "t=1" collapses threads in summary, "full threads" requires mbox.gz *** +EOM + $rv .= <{ibx}->isrch->has_threadid) { - $rv .= qq{\n${pfx}download mbox.gz: } . + $rv .= qq{${pfx}download mbox.gz: } . # we set name=z w/o using it since it seems required for # lynx (but works fine for w3m). qq{}; } else { # BOFH needs to --reindex - $rv .= qq{\n${pfx}download: } . + $rv .= qq{${pfx}download: } . qq{} } $rv .= qq{
};
@@ -274,10 +280,10 @@ sub search_nav_bot { # also used by WwwListing for searching extindex miscidx
 }
 
 sub sort_relevance {
-	[ sort {
+	@{$_[0]} = sort {
 		(eval { $b->topmost->{pct} } // 0) <=>
 		(eval { $a->topmost->{pct} } // 0)
-	} @{$_[0]} ]
+	} @{$_[0]};
 }
 
 sub mset_thread {