]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: remove mbox.gz and Atom from topic view
authorEric Wong <e@80x24.org>
Mon, 16 Aug 2021 23:35:20 +0000 (23:35 +0000)
committerEric Wong <e@80x24.org>
Tue, 17 Aug 2021 00:48:26 +0000 (00:48 +0000)
This declutters the topic view since these links seem rarely
used.  Atom and mbox.gz links probably make most sense when
users have read the HTML and decide the topic is worth following
or downloading.

Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://public-inbox.org/meta/20210816154444.sj3ks2sikq3x2ywx@nitro.local/
lib/PublicInbox/View.pm
t/psgi_bad_mids.t

index c80a675efedca05e527fa8c6cf536b0675aab7a5..17d38302f3d58b42082f6206138ddd3a7ee8f027 100644 (file)
@@ -1154,10 +1154,8 @@ sub dump_topics {
                        $anchor = '#t'; # thread skeleton
                }
 
-               my $mbox = qq(<a\nhref="$href/t.mbox.gz">mbox.gz</a>);
-               my $atom = qq(<a\nhref="$href/t.atom">Atom</a>);
                my $s = "<a\nhref=\"$href/T/$anchor\">$top_subj</a>\n" .
-                       " $ds UTC $n - $mbox / $atom\n";
+                       " $ds UTC $n\n";
                for (my $i = 0; $i < scalar(@extra); $i += 2) {
                        my $level = $extra[$i];
                        my $subj = $extra[$i + 1]; # already normalized
index f92e4f97bf98196378286716596e88a5f0086284..8e531b5414ef8aa1fc75142a1f2c3e5ba09b2665 100644 (file)
@@ -53,7 +53,7 @@ test_psgi(sub { $www->call(@_) }, sub {
                ok(index($raw, $mid) < 0, "escaped $mid");
        }
 
-       my (@xmids) = ($raw =~ m!\bhref="([^"]+)/t\.mbox\.gz"!sg);
+       my (@xmids) = ($raw =~ m!\bhref="([^"]+?)/T/#u"!sg);
        is(scalar(@xmids), scalar(@mids),
                'got escaped links to all messages');