diff options
author | Eric Wong <e@80x24.org> | 2022-09-02 09:10:54 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-09-02 17:40:05 +0000 |
commit | bedc22c355d570ed07ff6600717a97226f791ff5 (patch) | |
tree | 2b013ca1102186342cfdd2be3bda0f50dbacb1b6 /lib/PublicInbox/View.pm | |
parent | 4fe706e6a86da985755cd101bc52ce813d044554 (diff) | |
download | public-inbox-bedc22c355d570ed07ff6600717a97226f791ff5.tar.gz |
Unindexed v1 inboxes do not have the thread overview skeleton at the bottom of /$MSGID/ pages, so do not link to it. And for rare messages without a Date: header (or any headers!), this also ensures the [thread overview] is shown regardless.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r-- | lib/PublicInbox/View.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 11a94ba9..2b8e220b 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -717,7 +717,13 @@ sub _msg_page_prepare_obuf { for my $v ($eml->header('Date')) { $v = ascii_html($v); obfuscate_addrs($obfs_ibx, $v) if $obfs_ibx; # possible :P - $rv .= qq{Date: $v\t<a\nhref="#r">[thread overview]</a>\n}; + $rv .= qq{Date: $v\n}; + } + # [thread overview] link is typically added after Date, + # but added after Subject, or even nothing. + if ($have_over) { + chop $rv; # drop "\n", or noop if $rv eq '' + $rv .= qq{\t<a\nhref="#r">[thread overview]</a>\n}; } if (!$nr) { # first (and only) message, common case $ctx->{-title_html} = join(' - ', @title); |