about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-02-15 09:46:35 +0000
committerEric Wong <e@yhbt.net>2020-02-16 00:06:36 +0000
commitb2666c45f6ce539cbe64367675230b13e613b1fb (patch)
treea2ad9aec63eb2fe2a2d74b7df39eab56a4ad9742
parent79587ed2cfa012137712508fd7e7f657fab75087 (diff)
downloadpublic-inbox-b2666c45f6ce539cbe64367675230b13e613b1fb.tar.gz
We use `$top' in other places, so name it to `$top_subj'
consistently for `$subj' and `$prev_subj' comparisons down
the function.
-rw-r--r--lib/PublicInbox/View.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 45c191db..f0446723 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -1087,13 +1087,13 @@ sub dump_topics {
 
         # sort by recency, this allows new posts to "bump" old topics...
         foreach my $topic (sort { $b->[0] <=> $a->[0] } @$order) {
-                my ($ds, $n, $seen, $top, @ex) = @$topic;
+                my ($ds, $n, $seen, $top_subj, @ex) = @$topic;
                 @$topic = ();
-                next unless defined $top;  # ghost topic
-                my $mid = delete $seen->{$top};
+                next unless defined $top_subj;  # ghost topic
+                my $mid = delete $seen->{$top_subj};
                 my $href = mid_escape($mid);
-                my $prev_subj = [ split(/ /, $top) ];
-                $top = PublicInbox::Hval->new($top)->as_html;
+                my $prev_subj = [ split(/ /, $top_subj) ];
+                $top_subj = PublicInbox::Hval->new($top_subj)->as_html;
                 $ds = fmt_ts($ds);
 
                 # $n isn't the total number of posts on the topic,
@@ -1109,7 +1109,7 @@ sub dump_topics {
 
                 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</a>\n" .
+                my $s = "<a\nhref=\"$href/T/$anchor\">$top_subj</a>\n" .
                         " $ds UTC $n - $mbox / $atom\n";
                 for (my $i = 0; $i < scalar(@ex); $i += 2) {
                         my $level = $ex[$i];