3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +01:00

Skip channels without factoids in html export

This commit is contained in:
Pragmatic Software 2013-10-13 10:23:49 +00:00
parent b6a09e50e3
commit d374fdfc01
2 changed files with 4 additions and 2 deletions

View File

@ -125,12 +125,14 @@ sub export_factoids {
my $table_id = 1;
foreach my $channel (sort keys %{ $self->factoids->hash }) {
next if not scalar keys %{ $self->factoids->hash->{$channel} };
my $chan = $channel eq '.*' ? 'global' : $channel;
print FILE "<a href='#" . $chan . "'>$chan</a><br>\n";
print FILE "<a href='#" . $chan . "'>" . encode_entities($chan) . "</a><br>\n";
}
foreach my $channel (sort keys %{ $self->factoids->hash }) {
next if not scalar keys %{ $self->factoids->hash->{$channel} };
my $chan = $channel eq '.*' ? 'global' : $channel;
print FILE "<a name='$chan'></a>\n";
print FILE "<hr>\n<h3>$chan</h3>\n<hr>\n";

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 449,
BUILD_REVISION => 450,
BUILD_DATE => "2013-10-13",
};