about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-08-17 23:07:43 +0000
committerEric Wong <e@80x24.org>2016-08-18 01:04:44 +0000
commit22e7f3ad672473f19ae5107602e57e9361b8b7f2 (patch)
tree92c4fb926435534bd69153803c09545baf465f33 /lib/PublicInbox/View.pm
parent1031291ec876cf3791077aa7d564a8bf8561ee1f (diff)
downloadpublic-inbox-22e7f3ad672473f19ae5107602e57e9361b8b7f2.tar.gz
There is no point in using an array to join on an
empty string (my original intention was probably to
join on "\n").

This is only preparation for the next change to show
a warning to in the attachment link.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 6f79f601..30572216 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -427,10 +427,10 @@ sub attach_link ($$$$) {
         } else {
                 $sfn = 'a.bin';
         }
-        my @ret = qq($nl<a\nhref="$upfx$idx-$sfn">[-- Attachment #$idx: );
+        my $ret = qq($nl<a\nhref="$upfx$idx-$sfn">[-- Attachment #$idx: );
         my $ts = "Type: $ct, Size: $size bytes";
-        push(@ret, ($desc eq '') ? "$ts --]" : "$desc --]\n[-- $ts --]");
-        join('', @ret, "</a>\n");
+        $ret .= ($desc eq '') ? "$ts --]" : "$desc --]\n[-- $ts --]";
+        $ret .= "</a>\n";
 }
 
 sub add_text_body {