unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] searchview: do not link Atom feed by relevance
@ 2015-09-14  0:10 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-09-14  0:10 UTC (permalink / raw)
  To: meta

Atom feeds only make sense when sorted by time, not when our
search indexing rules change and affect relevance.  So do not
include the relevance option when linking to Atom feeds.

However, we shall still honor the 'r' query parameter in case
somebody wants to manually include that in the URL for
testing/experimental purposes.  We simply will not advertise
it.
---
 lib/PublicInbox/SearchView.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index b65351a..6bc66ce 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -108,7 +108,7 @@ sub search_nav_top {
 		$rv .= qq{<a\nhref="?$s">summary</a>|};
 		$rv .= qq{<b>threaded</b>};
 	}
-	my $A = $q->qs_html(x => 'A');
+	my $A = $q->qs_html(x => 'A', r => undef);
 	$rv .= qq{|<a\nhref="?$A">Atom</a>};
 	$rv .= ']';
 }
@@ -216,7 +216,7 @@ sub html_start {
 	my $query = PublicInbox::Hval->new_oneline($q->{q});
 
 	my $qh = $query->as_html;
-	my $A = $q->qs_html(x => 'A');
+	my $A = $q->qs_html(x => 'A', r => undef);
 	my $res = "<html><head><title>$qh - search results</title>" .
 		qq{<link\nrel=alternate\ntitle="Atom feed"\n} .
 		qq!href="?$A"\ntype="application/atom+xml"/></head>! .
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-14  0:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14  0:10 [PATCH] searchview: do not link Atom feed by relevance Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).