X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/65d6cbd5043e3d211001db12bcf54efbd62a9cdb..a1e758a1390d045046ed1aa6022a3f62647ef261:/selfforum-cgi/shared/Template/Archive.pm?ds=sidebyside 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'},