From 67ecd56a0aaf977fa1a22aa6e2378c9317c72549 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 28 Nov 2023 14:56:21 +0000 Subject: www: load and use cindex join data This is a major step in solving the problem of having to manually associate hundreds/thousands of coderepos with hundreds/thousands of public-inboxes to power solver (and more). --- lib/PublicInbox/View.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index e5f748f7..d81c66b7 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -80,7 +80,7 @@ sub msg_page { # allow user to easily browse the range around this message if # they have ->over $ctx->{-t_max} = $smsg->{ts}; - $ctx->{-spfx} = '../' if $ibx->{coderepo}; + $ctx->{-spfx} = '../' if $ibx->{-repo_objs}; PublicInbox::WwwStream::aresponse($ctx, \&msg_page_i); } @@ -443,7 +443,7 @@ sub thread_html { my $ibx = $ctx->{ibx}; my ($nr, $msgs) = $ibx->over->get_thread($mid); return missing_thread($ctx) if $nr == 0; - $ctx->{-spfx} = '../../' if $ibx->{coderepo}; + $ctx->{-spfx} = '../../' if $ibx->{-repo_objs}; # link $INBOX_DIR/description text to "index_topics" view around # the newest message in this thread @@ -779,6 +779,9 @@ href=#t>this message: \t(help) EOM + # TODO: related codesearch + # my $csrchv = $ctx->{ibx}->{-csrch} // []; + # push @related, '
'.ascii_html(Dumper($csrchv)).'
'; } if ($ctx->{ibx}->over) { my $t = ts2str($ctx->{-t_max}); -- cgit v1.2.3-24-ge0c7