# See Documentation/design_www.txt for this.
package PublicInbox::View;
use strict;
-use warnings;
-use bytes (); # only for bytes::length
+use v5.10.1;
use List::Util qw(max);
use PublicInbox::MsgTime qw(msg_datestamp);
use PublicInbox::Hval qw(ascii_html obfuscate_addrs prurl mid_href
# /$INBOX/$MSGID/t/ and /$INBOX/$MSGID/T/
sub thread_html {
my ($ctx) = @_;
+ $ctx->{-upfx} = '../../';
my $mid = $ctx->{mid};
my $ibx = $ctx->{ibx};
my ($nr, $msgs) = $ibx->over->get_thread($mid);
$skel .= " (download: <a\nhref=\"../t.mbox.gz\">mbox.gz</a>";
$skel .= " / follow: <a\nhref=\"../t.atom\">Atom feed</a>)\n";
$skel .= "-- links below jump to the message on this page --\n";
- $ctx->{-upfx} = '../../';
$ctx->{cur_level} = 0;
$ctx->{skel} = \$skel;
$ctx->{prev_attr} = '';
return unless $part->{bdy};
my $nl = $idx eq '1' ? '' : "\n"; # like join("\n", ...)
- my $size = bytes::length($part->body);
+ my $size = length($part->body);
# hide attributes normally, unless we want to aid users in
# spotting MUA problems:
$anchor = '#t'; # thread skeleton
}
- my $mbox = qq(<a\nhref="$href/t.mbox.gz">mbox.gz</a>);
- my $atom = qq(<a\nhref="$href/t.atom">Atom</a>);
my $s = "<a\nhref=\"$href/T/$anchor\">$top_subj</a>\n" .
- " $ds UTC $n - $mbox / $atom\n";
+ " $ds UTC $n\n";
for (my $i = 0; $i < scalar(@extra); $i += 2) {
my $level = $extra[$i];
my $subj = $extra[$i + 1]; # already normalized