mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Skip channels without factoids in html export
This commit is contained in:
parent
b6a09e50e3
commit
d374fdfc01
@ -125,12 +125,14 @@ sub export_factoids {
|
|||||||
my $table_id = 1;
|
my $table_id = 1;
|
||||||
|
|
||||||
foreach my $channel (sort keys %{ $self->factoids->hash }) {
|
foreach my $channel (sort keys %{ $self->factoids->hash }) {
|
||||||
|
next if not scalar keys %{ $self->factoids->hash->{$channel} };
|
||||||
my $chan = $channel eq '.*' ? 'global' : $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 }) {
|
foreach my $channel (sort keys %{ $self->factoids->hash }) {
|
||||||
|
next if not scalar keys %{ $self->factoids->hash->{$channel} };
|
||||||
my $chan = $channel eq '.*' ? 'global' : $channel;
|
my $chan = $channel eq '.*' ? 'global' : $channel;
|
||||||
print FILE "<a name='$chan'></a>\n";
|
print FILE "<a name='$chan'></a>\n";
|
||||||
print FILE "<hr>\n<h3>$chan</h3>\n<hr>\n";
|
print FILE "<hr>\n<h3>$chan</h3>\n<hr>\n";
|
||||||
|
@ -13,7 +13,7 @@ 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 => 449,
|
BUILD_REVISION => 450,
|
||||||
BUILD_DATE => "2013-10-13",
|
BUILD_DATE => "2013-10-13",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user