From f0051b3faf6fee449c6796e32a988b9b8ba8fb66 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 9 Jul 2016 03:18:31 +0000 Subject: www: cleanup parameter passing Reduce the size of hashes a bit and drops some unneeded hash lookups for uncommon paths. --- lib/PublicInbox/ExtMsg.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/PublicInbox/ExtMsg.pm') diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm index 019d50a4..2a9316b1 100644 --- a/lib/PublicInbox/ExtMsg.pm +++ b/lib/PublicInbox/ExtMsg.pm @@ -23,16 +23,14 @@ our @EXT_URL = ( sub ext_msg { my ($ctx) = @_; - my $pi_config = $ctx->{pi_config}; my $cur = $ctx->{-inbox}; my $mid = $ctx->{mid}; - my $env = $ctx->{env}; eval { require PublicInbox::Search }; my $have_xap = $@ ? 0 : 1; my (@nox, @ibx, @found); - $pi_config->each_inbox(sub { + $ctx->{www}->{pi_config}->each_inbox(sub { my ($other) = @_; return if $other->{name} eq $cur->{name} || !$other->base_url; -- cgit v1.2.3-24-ge0c7