X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/65d6cbd5043e3d211001db12bcf54efbd62a9cdb..dd4ab9aedf7e7eaebddaf5c00f506972dad42b4c:/selfforum-cgi/shared/Template/Archive.pm diff --git a/selfforum-cgi/shared/Template/Archive.pm b/selfforum-cgi/shared/Template/Archive.pm index ec5ee22..c71c359 100644 --- a/selfforum-cgi/shared/Template/Archive.pm +++ b/selfforum-cgi/shared/Template/Archive.pm @@ -73,7 +73,14 @@ sub print_month_as_HTML($$$) { my $template = new Template $tempfile; - my $threads = get_all_threads($mainfile, KILL_DELETED); + my ($threads, $locked); + unless ($locked = lock_file($mainfile) and $threads = get_all_threads($mainfile, KILL_DELETED)) { + print ${$template->scrap( + $assign->{'errorLocking'} + )}; + return; + } + unlock_file($mainfile); my $tmplparam = { $assign->{'year'} => $param->{'year'},