Tags seems now ok

This commit is contained in:
Thomas Schwery 2010-09-14 18:04:20 +02:00
parent afcdca0361
commit e675d14331

View file

@ -20,6 +20,8 @@ use Date::Parse;
use Date::Format;
use threads;
use Clone qw(clone);
our ($port, $basedir, $server) = @ARGV;
print "Port is " . $port . "\n";
@ -136,10 +138,13 @@ sub list_blog_entries {
sub list_entries_by_tag {
my $entries;
foreach my $tag (sort keys %tags_entries) {
my %tags_entries_local = %{ clone (\%tags_entries) };
foreach my $tag (sort keys %tags_entries_local) {
$entries .= "i----- " . $tag . " ---------------\tfake\tfake\t0\r\n";
foreach my $entry ($tags_entries{$tag}) {
my ($entry_dir, $entry_name) = split '/',$entry;
foreach my $entry (@{$tags_entries_local{$tag}}) {
$entry =~ m/^(.*)\/(.*)$/;
my $entry_dir = $1;
my $entry_name = $2;
$entries .= map_blog_entry($entry_name, $entry_dir) . "\r\n";
}
}
@ -171,7 +176,7 @@ sub read_entry_file {
my @tag_list = split ',',$tags;
foreach my $tag (@tag_list) {
$tags_entries{$tag} = $entry_file;
push @{ $tags_entries{$tag} }, $entry_file;
}
my $time = str2time($date_file);