X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FSearchView.pm;h=8932c73da5671429e23ca60cabf9801d296c2f04;hb=ab9c03ff4aa369b397dc1a8c8936153c8565fd05;hp=b1cdb480d75d2ef97a76d024ab95ad8736f85f52;hpb=08b543eb6c67cc19ea8e86afe6b9494df79e2fea;p=public-inbox.git diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index b1cdb480..8932c73d 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{
};
@@ -319,16 +325,16 @@ sub mset_thread {
 
 	@$msgs = reverse @$msgs if $r;
 	$ctx->{msgs} = $msgs;
-	PublicInbox::WwwStream::aresponse($ctx, 200, \&mset_thread_i);
+	PublicInbox::WwwStream::aresponse($ctx, \&mset_thread_i);
 }
 
 # callback for PublicInbox::WwwStream::getline
 sub mset_thread_i {
 	my ($ctx, $eml) = @_;
-	$ctx->zmore($ctx->html_top) if exists $ctx->{-html_tip};
+	print { $ctx->zfh } $ctx->html_top if exists $ctx->{-html_tip};
 	$eml and return PublicInbox::View::eml_entry($ctx, $eml);
 	my $smsg = shift @{$ctx->{msgs}} or
-		$ctx->zmore(${delete($ctx->{skel})});
+		print { $ctx->zfh } ${delete($ctx->{skel})};
 	$smsg;
 }
 
@@ -353,7 +359,7 @@ sub adump {
 	my ($cb, $mset, $q, $ctx) = @_;
 	$ctx->{ids} = $ctx->{ibx}->isrch->mset_to_artnums($mset);
 	$ctx->{search_query} = $q; # used by WwwAtomStream::atom_header
-	PublicInbox::WwwAtomStream->response($ctx, 200, \&adump_i);
+	PublicInbox::WwwAtomStream->response($ctx, \&adump_i);
 }
 
 # callback for PublicInbox::WwwAtomStream::getline