From 20f0dd721e6f54beed46b8b8f1d0818ab3977ea4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 27 Aug 2014 19:34:03 +0000 Subject: view: Email::Address cache purge is optional We will reuse the html_footer function in a nested index. --- lib/PublicInbox/View.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 8bc28cd1..ab607a09 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -30,7 +30,7 @@ sub msg_html { headers_to_html_header($mime, $full_pfx) . multipart_text_as_html($mime, $full_pfx) . '
' . PRE_WRAP . - html_footer($mime) . $footer . + html_footer($mime, 1) . $footer . ''; } @@ -204,7 +204,7 @@ sub headers_to_html_header { } sub html_footer { - my ($mime) = @_; + my ($mime, $purge) = @_; my %cc; # everyone else my $to; # this is the From address @@ -219,7 +219,7 @@ sub html_footer { $to ||= $dst; } } - Email::Address->purge_cache; + Email::Address->purge_cache if $purge; my $subj = $mime->header('Subject') || ''; $subj = "Re: $subj" unless $subj =~ /\bRe:/; -- cgit v1.2.3-24-ge0c7