]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/View.pm
introduce PublicInbox::MIME wrapper class
[public-inbox.git] / lib / PublicInbox / View.pm
index e4e9d7d2e30860fb168c0635329a71f41a61ad60..2c37cd424e38026ad48f8b3b52ec87382d5d1b1b 100644 (file)
@@ -299,7 +299,7 @@ sub stream_thread ($$) {
        }
        return missing_thread($ctx) unless $mime;
 
-       $mime = Email::MIME->new($mime);
+       $mime = PublicInbox::MIME->new($mime);
        $ctx->{-title_html} = ascii_html($mime->header('Subject'));
        $ctx->{-html_tip} = thread_index_entry($ctx, $level, $mime);
        PublicInbox::WwwStream->response($ctx, 200, sub {
@@ -311,7 +311,7 @@ sub stream_thread ($$) {
                        unshift @q, map { ($cl, $_) } @{$node->{children}};
                        my $mid = $node->{id};
                        if ($mime = $inbox->msg_by_smsg($node->{smsg})) {
-                               $mime = Email::MIME->new($mime);
+                               $mime = PublicInbox::MIME->new($mime);
                                return thread_index_entry($ctx, $level, $mime);
                        } else {
                                return ghost_index_entry($ctx, $level, $node);
@@ -362,7 +362,7 @@ sub thread_html {
                $mime = $inbox->msg_by_smsg($mime) and last;
        }
        return missing_thread($ctx) unless $mime;
-       $mime = Email::MIME->new($mime);
+       $mime = PublicInbox::MIME->new($mime);
        $ctx->{-title_html} = ascii_html($mime->header('Subject'));
        $ctx->{-html_tip} = '<pre>'.index_entry($mime, $ctx, scalar @$msgs);
        $mime = undef;
@@ -372,7 +372,7 @@ sub thread_html {
                        $mime = $inbox->msg_by_smsg($mime) and last;
                }
                if ($mime) {
-                       $mime = Email::MIME->new($mime);
+                       $mime = PublicInbox::MIME->new($mime);
                        return index_entry($mime, $ctx, scalar @$msgs);
                }
                $msgs = undef;