]> Sergey Matveev's repositories - public-inbox.git/commitdiff
news_www: favor ->ALL URL when using ->ALL
authorEric Wong <e@80x24.org>
Tue, 7 Sep 2021 22:02:03 +0000 (22:02 +0000)
committerEric Wong <e@80x24.org>
Wed, 8 Sep 2021 02:40:58 +0000 (02:40 +0000)
This allows us to link to threads spread across multiple inboxes.

Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://public-inbox.org/meta/20210907140954.4rlh6pn5fz4ljkxp@meerkat.local/
lib/PublicInbox/NewsWWW.pm

index abafc4f97b22c037bb138f7e6fe0c8d798c48d2d..d13731ae3f96b77b1996086647e1868b7615211c 100644 (file)
@@ -82,7 +82,8 @@ sub call {
                                for (@$xr3) {
                                        s/:[0-9]+:$x->{blob}\z// or next;
                                        my $ibx = $by_eidx_key->{$_} // next;
-                                       my $url = $ibx->base_url or next;
+                                       my $url = $ALL->base_url($env) //
+                                                       $ibx->base_url // next;
                                        $url .= mid_escape($mid) . '/';
                                        return redirect(302, $url);
                                }