diff options
author | Eric Wong <e@80x24.org> | 2023-11-28 14:56:27 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-11-29 02:13:26 +0000 |
commit | a8e3c2ad544f9f78ebbe91bfe0dece0e2d385322 (patch) | |
tree | 7f304b6f51c9f5babfb2b687c4b6e128efb7dbec /lib/PublicInbox/WwwText.pm | |
parent | 83655d5dd1679e7c44586aaae4e16a2bffdeaa1a (diff) | |
download | public-inbox-a8e3c2ad544f9f78ebbe91bfe0dece0e2d385322.tar.gz |
The HTML is still extremely rough, but links seem to be mostly working...
Diffstat (limited to 'lib/PublicInbox/WwwText.pm')
-rw-r--r-- | lib/PublicInbox/WwwText.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm index 4b4b2e4c..5e23005e 100644 --- a/lib/PublicInbox/WwwText.pm +++ b/lib/PublicInbox/WwwText.pm @@ -252,19 +252,17 @@ sub coderepos_raw ($$) { my $cr = $cfg->repo_objs($ctx->{ibx}) or return (); my $buf = 'Code repositories for project(s) associated with this '. $ctx->{ibx}->thing_type . ":\n"; - my @recs = map { [ 0, $_ ] } @$cr; - my @todo = @recs; - $cfg->each_cindex('load_commit_times', \@todo); - @recs = sort { $b->[0] <=> $a->[0] } @recs; + my @recs = PublicInbox::CodeSearch::repos_sorted($cfg, @$cr); my $cr_score = $ctx->{ibx}->{-cr_score}; + my $env = $ctx->{env}; for (@recs) { my ($t, $git) = @$_; - for ($git->pub_urls($ctx->{env})) { + for ($git->pub_urls($env)) { my $u = m!\A(?:[a-z\+]+:)?//!i ? $_ : $top_url.$_; my $nr = $cr_score->{$git->{nick}}; $buf .= "\n"; $buf .= $nr ? sprintf('% 9u', $nr) : (' 'x9); - $buf .= ' '.fmt_ts($t).' '.prurl($ctx->{env}, $u); + $buf .= ' '.fmt_ts($t).' '.prurl($env, $u); } } ($buf); |