From f5e2daa70e0a1a75d1220d84193f3eeebb799c38 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 10 Sep 2022 20:10:23 +0000 Subject: view: fix solver links with multiple messages For redundant messages sharing Message-IDs, the link to solver (/$INBOX/$OID/s/) was going up too many levels for /$INBOX/$MSGID/ when there were multiple messages sharing the same $MSGID. Unfortunately, redundant messages are common with /all/ due to signature trailers. So dynamically assigning {-spfx} is tricky and error prone from counting `/'. So simplify the code a bit by setting {-spfx} once per HTTP request, instead of every single message. --- lib/PublicInbox/Feed.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index affe0fb6..de1e7dfe 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -70,6 +70,7 @@ sub new_html { } $ctx->{-html_tip} = '
';
 	$ctx->{-upfx} = '';
+	$ctx->{-spfx} = '' if $ctx->{ibx}->{coderepo};
 	$ctx->{-hr} = 1;
 	PublicInbox::WwwStream::aresponse($ctx, \&new_html_i);
 }
-- 
cgit v1.2.3-24-ge0c7