} # FIXME при удалении непустой темы модератором почистить recent.html
my ($tree,$lockfd) = gettree($dir . "/".$forum->{indexfile});
delete_from_list($tree,"topiclist","topic",$id);
- savetree($tree,$dir ."/".$forum->{indexfile});
+ savetree($dir ."/".$forum->{indexfile},$tree);
unlink $topic;
my $redirect_url = $cgi->path_info;
$redirect_url =~ s/\/[^\/]*$//;
}
sub savetree {
my ($filename,$tree,$lockfd) = @_;
+ print STDERR "Savetree(@_)\n";
replacefile($filename,output_html($tree));
close $lockfd if defined($lockfd);
}
#
sub output_html {
my $tree=shift;
+ print STDERR "output_html(@_)\n";
return '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'.
$tree->as_HTML("<>&");
}