#
# Used for displaying the HTML web interface.
# See Documentation/design_www.txt for this.
package PublicInbox::View;
use strict;
use warnings;
-use URI::Escape qw/uri_escape_utf8/;
-use Date::Parse qw/str2time/;
-use Encode::MIME::Header;
-use PublicInbox::Hval qw/ascii_html/;
+use PublicInbox::MsgTime qw(msg_datestamp);
+use PublicInbox::Hval qw/ascii_html obfuscate_addrs/;
use PublicInbox::Linkify;
-use PublicInbox::MID qw/mid_clean id_compress mid2path mid_mime/;
+use PublicInbox::MID qw/id_compress mid_escape mids references/;
use PublicInbox::MsgIter;
use PublicInbox::Address;
+use PublicInbox::WwwStream;
+use PublicInbox::Reply;
require POSIX;
+use Time::Local qw(timegm);
use constant INDENT => ' ';
use constant TCHILD => '` ';
sub th_pfx ($) { $_[0] == 0 ? '' : TCHILD };
# public functions: (unstable)
-# TODO: stream this, since threading is expensive but also oh-so-important
+
sub msg_html {
- my ($ctx, $mime, $footer) = @_;
- $footer = defined($footer) ? "\n$footer" : '';
+ my ($ctx, $mime, $more, $smsg) = @_;
my $hdr = $mime->header_obj;
- headers_to_html_header($hdr, $ctx) .
- multipart_text_as_html($mime, '') .
- '
' .
- html_footer($hdr, 1, $ctx) .
- '
' . msg_reply($ctx, $hdr) .
- '
'. $footer . '