mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-09 19:42:38 +01:00
Improve author(s) column in quotegrab html export
This commit is contained in:
parent
3d233dcdfe
commit
fd12d228d8
@ -109,6 +109,8 @@ sub save_quotegrabs {
|
|||||||
$self->export_quotegrabs();
|
$self->export_quotegrabs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub uniq { my %seen; grep !$seen{$_}++, @_ }
|
||||||
|
|
||||||
sub export_quotegrabs() {
|
sub export_quotegrabs() {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return "Not enabled" if not defined $self->{export_path};
|
return "Not enabled" if not defined $self->{export_path};
|
||||||
@ -151,7 +153,7 @@ sub export_quotegrabs() {
|
|||||||
print FILE "<td>" . ($quotegrab->{id}) . "</td>";
|
print FILE "<td>" . ($quotegrab->{id}) . "</td>";
|
||||||
|
|
||||||
my @nicks = split /\+/, $quotegrab->{nick};
|
my @nicks = split /\+/, $quotegrab->{nick};
|
||||||
$text = join ', ', sort @nicks;
|
$text = join ', ', uniq(@nicks);
|
||||||
print FILE "<td>" . encode_entities($text) . "</td>";
|
print FILE "<td>" . encode_entities($text) . "</td>";
|
||||||
|
|
||||||
my $nick;
|
my $nick;
|
||||||
|
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 441,
|
BUILD_REVISION => 442,
|
||||||
BUILD_DATE => "2013-10-11",
|
BUILD_DATE => "2013-10-12",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user