user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] searchview: do not link Atom feed by relevance
@ 2015-09-14  0:10  7% Eric Wong
  0 siblings, 0 replies; 1+ results
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	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-14  0:10  7% [PATCH] searchview: do not link Atom feed by relevance Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).