]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: fix Atom feed link in full message view page
authorEric Wong <e@80x24.org>
Sat, 9 Jan 2016 09:45:22 +0000 (09:45 +0000)
committerEric Wong <e@80x24.org>
Sat, 9 Jan 2016 09:46:50 +0000 (09:46 +0000)
Oops :x

lib/PublicInbox/View.pm

index 829806d86cafc69b278233a7fe0757fa1bcce54d..0783a1d688500baa96390603803dfde252e90f4f 100644 (file)
@@ -558,10 +558,11 @@ sub html_footer {
 
        my $srch = $ctx->{srch} if $ctx;
        my $upfx = $full_pfx ? '../' : '../../';
+       my $tpfx = $full_pfx ? '' : '../';
        my $idx = $standalone ? " <a\nhref=\"$upfx\">index</a>" : '';
 
        if ($srch && $standalone) {
-               $idx .= qq{ / follow: <a\nhref="t.atom">Atom feed</a>\n};
+               $idx .= qq{ / follow: <a\nhref="${tpfx}t.atom">Atom feed</a>\n};
        }
        if ($idx && $srch) {
                my $p = $ctx->{parent_msg};
@@ -579,7 +580,6 @@ sub html_footer {
                        $irt .= ' ' x length('next ');
                }
                if ($p || $next) {
-                       my $tpfx = $full_pfx ? '' : '../';
                        $irt .= "<a\nhref=\"${tpfx}t/#u\">thread</a> ";
                } else {
                        $irt .= ' ' x length('thread ');