From: Eric Wong Date: Tue, 28 Nov 2023 17:55:09 +0000 (+0000) Subject: www: load cindex join data for ->ALL, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d440959d8df609f3f2422d89381978116db4ad04;p=thirdparty%2Fpublic-inbox.git www: load cindex join data for ->ALL, too This ensures the /all/ extindex can have auto-associations with coderepos just like normal inboxes do. --- diff --git a/lib/PublicInbox/CodeSearch.pm b/lib/PublicInbox/CodeSearch.pm index 7c0dd063a..5c5774cfb 100644 --- a/lib/PublicInbox/CodeSearch.pm +++ b/lib/PublicInbox/CodeSearch.pm @@ -339,6 +339,15 @@ EOM my $s = $git->{ibx_score}; @$s = sort { $b->[0] <=> $a->[0] } @$s if $s; } + my $ALL = $pi_cfg->ALL or return; + my @alls_gits = sort { + scalar @{$b->{ibx_score} // []} <=> + scalar @{$a->{ibx_score} // []} + } values %$coderepos; + my $gits = $ALL->{-repo_objs} //= []; + push @$gits, @alls_gits; + my $cr_score = $ALL->{-cr_score} //= {}; + $cr_score->{$_->{nick}} //= scalar(@{$_->{ibx_score}//[]}) for @$gits; } sub repos_sorted {