Fix to break remotes to a new line without pointless limits

This commit is contained in:
Ilia Ross
2024-05-31 12:14:45 +03:00
parent f06bc871dc
commit 5d363d60fe

View File

@@ -386,19 +386,17 @@ else {
}
}
# nice_remotes(&monitor, [max])
# nice_remotes(&monitor)
sub nice_remotes
{
my ($s, $max) = @_;
$max ||= 3;
my ($s) = @_;
my @remotes = map { $_ eq "*" ? $text{'index_local'}
: &html_escape($_) }
split(/\s+/, $s->{'remote'});
foreach my $g (split(/\s+/, $s->{'groups'})) {
push(@remotes, &text('index_group', $g));
}
return @remotes > $max ? join(", ", @remotes[0..$max]).", ..."
: join(", ", @remotes);
return join("<br>", @remotes);
}
sub group_desc