X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FView.pm;h=0eb20ae0d7f7f8bc2d1ba103ae70ee151614f72a;hp=040604b08b926552aa797725e3960bebeeacb0ee;hb=0d41983a642b4dccb90d04c4e2c5e2602885444c;hpb=d4cb7fb06031435cd25f5e000bf9c0e4b8b30177 diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 040604b0..0eb20ae0 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -40,11 +40,7 @@ sub msg_html_i { # fake an EOF if generating the footer fails; # we want to at least show the message if something # here crashes: - eval { - my $hdr = delete($ctx->{hdr}); - '
' . html_footer($hdr, 1, $ctx) . - '' . msg_reply($ctx, $hdr) - }; + eval { html_footer($ctx) }; } else { undef } @@ -113,7 +109,7 @@ sub msg_html_more { } # /$INBOX/$MESSAGE_ID/#R -sub msg_reply { +sub msg_reply ($$) { my ($ctx, $hdr) = @_; my $se_url = 'https://kernel.org/pub/software/scm/git/docs/git-send-email.html'; @@ -800,17 +796,17 @@ sub _parent_headers { $rv; } +# returns a string buffer via ->getline sub html_footer { - my ($hdr, $standalone, $ctx, $rhref) = @_; - - my $ibx = $ctx->{-inbox} if $ctx; + my ($ctx) = @_; + my $ibx = $ctx->{-inbox}; + my $hdr = delete $ctx->{hdr}; my $upfx = '../'; - my $tpfx = ''; - my $skel = $standalone ? " index" : ''; - my $irt = ''; - if ($skel && $ibx->over) { + my $skel = " index"; + my $rv = '
'; + if ($ibx->over) { $skel .= "\n"; - thread_skel(\$skel, $ctx, $hdr, $tpfx); + thread_skel(\$skel, $ctx, $hdr, ''); my ($next, $prev); my $parent = ' '; $next = $prev = ' '; @@ -839,13 +835,12 @@ sub html_footer { } elsif ($u) { # unlikely $parent = " parent"; } - $irt = "$next $prev$parent "; - } else { - $irt = ''; + $rv .= "$next $prev$parent "; } - $rhref ||= '#R'; - $irt .= qq(reply); - $irt .= $skel; + $rv .= qq(reply); + $rv .= $skel; + $rv .= ''; + $rv .= msg_reply($ctx, $hdr); } sub linkify_ref_no_over {