about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-09-10 08:17:12 +0000
committerEric Wong <e@80x24.org>2022-09-10 19:50:41 +0000
commitc28e2f8b175cefeafba7c4e9fbb65e5b6021dded (patch)
treee481e826a82daacfa5c8a7b9b05cdd991e5cf752 /lib/PublicInbox/View.pm
parent5ca29b7f2789517f0a41f1482509f504b8b601e1 (diff)
downloadpublic-inbox-c28e2f8b175cefeafba7c4e9fbb65e5b6021dded.tar.gz
We can build `$u' in one line, and drop an unnecessary empty
line to reduce the amount of scrolling required to read this
sub.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 52d37a9f..b27523b2 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -811,7 +811,6 @@ ${fallback}other threads:[<a
 href="$upfx?t=$t">~$t_fmt UTC</a>|<a
 href="$upfx">newest</a>]
 EOF
-
                 thread_skel(\$skel, $ctx, $hdr);
                 my ($next, $prev);
                 my $parent = '       ';
@@ -821,12 +820,8 @@ EOF
                         $n = mid_href($n);
                         $next = "<a\nhref=\"$upfx$n/\"\nrel=next>next</a>";
                 }
-                my $u;
                 my $par = $ctx->{parent_msg};
-                if ($par) {
-                        $u = mid_href($par);
-                        $u = "$upfx$u/";
-                }
+                my $u = $par ? $upfx.mid_href($par).'/' : undef;
                 if (my $p = $ctx->{prev_msg}) {
                         $prev = mid_href($p);
                         if ($p && $par && $p eq $par) {