From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, T_RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 66900202AF for ; Thu, 8 Oct 2015 01:00:10 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] view: remove attribution for topics in top-level view Date: Thu, 8 Oct 2015 01:00:10 +0000 Message-Id: <20151008010010.17017-1-e@80x24.org> List-Id: It clutters up the page unnecessarily, as identity of the topic starter/updater probably doesn't matter if there's no exact message to attribute the message to. --- lib/PublicInbox/View.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index beb9989..534b553 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -823,11 +823,10 @@ sub add_topic { my $mid = mid_clean($x->header('Message-ID')); - my $u = $x->header('X-PI-From'); my $ts = $x->header('X-PI-TS'); my $exist = $state->{latest}->{$topic}; if (!$exist || $exist->[2] < $ts) { - $state->{latest}->{$topic} = [ $mid, $u, $ts ]; + $state->{latest}->{$topic} = [ $mid, $ts ]; } } else { # ghost message, do not bump level @@ -851,10 +850,9 @@ sub dump_topics { while (defined(my $info = shift @$order)) { my ($level, $subj, $topic) = @$info; my $n = delete $subjs->{$topic}; - my ($mid, $u, $ts) = @{delete $latest->{$topic}}; + my ($mid, $ts) = @{delete $latest->{$topic}}; $mid = PublicInbox::Hval->new($mid)->as_href; $subj = PublicInbox::Hval->new($subj)->as_html; - $u = PublicInbox::Hval->new($u)->as_html; $pfx = INDENT x ($level - 1); my $nl = $level == $prev ? "\n" : ''; my $dot = $level == 0 ? '' : '` '; @@ -863,13 +861,13 @@ sub dump_topics { my $attr; $ts = POSIX::strftime('%Y-%m-%d %H:%M', gmtime($ts)); if ($n == 1) { - $attr = "created by $u @ $ts UTC"; + $attr = "created @ $ts UTC"; $n = ""; } else { # $n isn't the total number of posts on the topic, # just the number of posts in the current results # window, so leave it unlabeled - $attr = "updated by $u @ $ts UTC"; + $attr = "updated @ $ts UTC"; $n = " ($n)"; } if ($level == 0 || $attr ne $prev_attr) { -- EW