X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwListing.pm;h=8d6100375e65df772fbe7f0733716b51ddfa5dab;hb=9f5a583694396f84;hp=1faade6cd39959c581481755ccec4863092b147c;hpb=78fe6a9e601fcf3ec2983c82edaeb825e61275cf;p=public-inbox.git diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index 1faade6c..8d610037 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -6,7 +6,7 @@ package PublicInbox::WwwListing; use strict; use warnings; -use PublicInbox::Hval qw(ascii_html); +use PublicInbox::Hval qw(ascii_html prurl); use PublicInbox::Linkify; use PublicInbox::View; use PublicInbox::Inbox; @@ -32,7 +32,7 @@ sub list_all ($$$) { sub list_match_domain_i { my ($ibx, $arg) = @_; my ($list, $hide_key, $re) = @$arg; - if (!$ibx->{-hide}->{$hide_key} && $ibx->{url} =~ $re) { + if (!$ibx->{-hide}->{$hide_key} && grep($re, @{$ibx->{url}})) { push @$list, $ibx; } } @@ -84,13 +84,13 @@ sub new { sub ibx_entry { my ($mtime, $ibx, $env) = @_; my $ts = PublicInbox::View::fmt_ts($mtime); - my $url = PublicInbox::Hval::prurl($env, $ibx->{url}); + my $url = prurl($env, $ibx->{url}); my $tmp = <<""; * $ts - $url ${\$ibx->description} if (defined(my $info_url = $ibx->{infourl})) { - $tmp .= ' ' . $info_url . "\n"; + $tmp .= ' ' . prurl($env, $info_url) . "\n"; } $tmp; } @@ -136,9 +136,7 @@ sub fingerprint ($) { my ($git) = @_; # TODO: convert to qspawn for fairness when there's # thousands of repos - my ($fh, $pid) = $git->popen('show-ref') or - die "popen($git->{git_dir} show-ref) failed: $!"; - + my ($fh, $pid) = $git->popen('show-ref'); my $dig = Digest::SHA->new(1); while (read($fh, my $buf, 65536)) { $dig->add($buf);