X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwStream.pm;h=1178a3c976615e64a53093055acf41b314218430;hb=0a14f0a22c7d7ce35a740df574878269c0d947f5;hp=66e34a12e885c12c95454933cb42f5082545c53e;hpb=db7c206a4e2c71d08dd286d6dfa92431976e9693;p=public-inbox.git
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index 66e34a12..1178a3c9 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2020 all contributors
+# Copyright (C) 2016-2021 all contributors
# License: AGPL-3.0+
#
# HTML body stream for which yields getline+close methods for
@@ -12,7 +12,8 @@ our @EXPORT_OK = qw(html_oneshot);
use bytes (); # length
use PublicInbox::Hval qw(ascii_html prurl ts2str);
our $TOR_URL = 'https://www.torproject.org/';
-our $CODE_URL = 'https://public-inbox.org/public-inbox.git';
+our $CODE_URL = [ qw(http://ou63pmih66umazou.onion/public-inbox.git
+ https://public-inbox.org/public-inbox.git) ];
sub base_url ($) {
my $ctx = shift;
@@ -39,8 +40,8 @@ sub html_top ($) {
my $desc = ascii_html($ibx->description);
my $title = delete($ctx->{-title_html}) // $desc;
my $upfx = $ctx->{-upfx} || '';
- my $help = $upfx.'_/text/help';
- my $color = $upfx.'_/text/color';
+ my $help = $upfx.'_/text/help/';
+ my $color = $upfx.'_/text/color/';
my $atom = $ctx->{-atom} || $upfx.'new.atom';
my $top = "$desc";
if (my $t_max = $ctx->{-t_max}) {
@@ -78,22 +79,24 @@ sub html_top ($) {
sub coderepos ($) {
my ($ctx) = @_;
- my $ibx = $ctx->{ibx};
+ my $cr = $ctx->{ibx}->{coderepo} // return ();
+ my $cfg = $ctx->{www}->{pi_cfg};
+ my $upfx = ($ctx->{-upfx} // ''). '../';
my @ret;
- if (defined(my $cr = $ibx->{coderepo})) {
- my $cfg = $ctx->{www}->{pi_cfg};
- my $env = $ctx->{env};
- for my $cr_name (@$cr) {
- my $urls = $cfg->{"coderepo.$cr_name.cgiturl"};
- if ($urls) {
- $ret[0] //= <{"coderepo.$cr_name.cgiturl"} // next;
+ $ret[0] //= <{env}, $u));
+ $ret[0] .= qq(\n\t$u);
}
}
- @ret; # may be empty
+ @ret; # may be empty, this sub is called as an arg for join()
}
sub code_footer ($) {