]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: fix link generation for replies in threads
authorEric Wong <e@80x24.org>
Mon, 25 Apr 2016 00:07:40 +0000 (00:07 +0000)
committerEric Wong <e@80x24.org>
Mon, 25 Apr 2016 00:07:40 +0000 (00:07 +0000)
Oops, gotta test this :x

lib/PublicInbox/View.pm

index 0e65daca1c69eb9386b18fe628331ff73ee0bdd0..177a1a6f4cc0b10e786b003eebae59a257b1623c 100644 (file)
@@ -30,7 +30,7 @@ sub msg_html {
        headers_to_html_header($hdr, $ctx) .
                multipart_text_as_html($mime) .
                '</pre><hr /><pre>' .
-               html_footer($hdr, 1, $ctx) .
+               html_footer($hdr, 1, $ctx, 'R/') .
                $footer .
                '</pre></body></html>';
 }
@@ -139,7 +139,7 @@ sub index_entry {
                index_walk($fh, $_[0], $enc, \$part_nr);
        });
        $mime->body_set('');
-       $rv = "\n" . html_footer($hdr, 0, $ctx, $mhref);
+       $rv = "\n" . html_footer($hdr, 0, $ctx, "$path$href/R");
 
        if (defined $irt) {
                unless (defined $parent_anchor) {
@@ -498,7 +498,7 @@ sub mailto_arg_link {
 }
 
 sub html_footer {
-       my ($hdr, $standalone, $ctx, $mhref) = @_;
+       my ($hdr, $standalone, $ctx, $rhref) = @_;
 
        my $srch = $ctx->{srch} if $ctx;
        my $upfx = '../';
@@ -526,7 +526,7 @@ sub html_footer {
                $irt = '';
        }
 
-       $irt . qq(<a\nhref="${tpfx}R/">reply</a>) . $idx;
+       $irt . qq(<a\nhref="$rhref">reply</a>) . $idx;
 }
 
 sub linkify_ref_nosrch {