unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH 1/5] view: Email::Address cache purge is optional
@ 2014-08-28  2:47 Eric Wong
  2014-08-28  2:47 ` [PATCH 2/5] redo main HTML index to show nested messages Eric Wong
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eric Wong @ 2014-08-28  2:47 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

We will reuse the html_footer function in a nested index.
---
 lib/PublicInbox/View.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 8bc28cd..ab607a0 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><hr />' . PRE_WRAP .
-		html_footer($mime) . $footer .
+		html_footer($mime, 1) . $footer .
 		'</pre></body></html>';
 }
 
@@ -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:/;
-- 
EW


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-28  2:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28  2:47 [PATCH 1/5] view: Email::Address cache purge is optional Eric Wong
2014-08-28  2:47 ` [PATCH 2/5] redo main HTML index to show nested messages Eric Wong
2014-08-28  2:47 ` [PATCH 3/5] view: increase MAX_INLINE_QUOTED threshold to 12 Eric Wong
2014-08-28  2:47 ` [PATCH 4/5] feed: show permalink to home page Eric Wong
2014-08-28  2:47 ` [PATCH 5/5] feed: deal with removed files Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).