]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
www: preload all inboxes if using ->ALL
authorEric Wong <e@80x24.org>
Wed, 11 Sep 2024 21:25:49 +0000 (21:25 +0000)
committerEric Wong <e@80x24.org>
Thu, 12 Sep 2024 21:22:33 +0000 (21:22 +0000)
This ought to improve memory layout and ensure the regexp
for address => inbox linkification works when hitting
/$EXTINBOX/$MSGID/ links first (instead of /$INBOX/$MSGID)

This fill_all call is redundant for cindex users who get the
preload anyways, but necessary for non-cindex users.

This should also avoid the broken/empty regexps problem described in
3b51fcc196e3 (view: fix addr2url mapping corruption, 2024-09-06)

Fixes: 48cbe0c3c8dc4d26 (www: linkify inbox addresses in To/Cc headers, 2024-01-09)
Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://public-inbox.org/meta/20240910-strong-rainbow-warthog-d6fe69@lemur/
Tested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
lib/PublicInbox/WWW.pm

index 289599b8cc33ec17b1ba3e131222cc6fa9a47d0e..1bc2966d3e893b82d3907e32d0cb52b139c5ba15 100644 (file)
@@ -187,7 +187,10 @@ sub preload {
                if (defined($pi_cfg->{'publicinbox.cgitrc'})) {
                        $pi_cfg->limiter('-cgit');
                }
-               $pi_cfg->ALL and require PublicInbox::Isearch;
+               if ($pi_cfg->ALL) {
+                       require PublicInbox::Isearch;
+                       $pi_cfg->fill_all;
+               }
                $self->cgit;
                $self->coderepo;
                $self->stylesheets_prepare($_) for ('', '../', '../../');