From: fox_two <> Date: Mon, 4 Jun 2001 18:45:53 +0000 (+0000) Subject: -n/a- X-Git-Url: https://git.p6c8.net/selfforum.git/commitdiff_plain/1bc8d7a9de9ec3bcd8bd1d494449a5dcf4250b71?hp=a1e758a1390d045046ed1aa6022a3f62647ef261 -n/a- --- diff --git a/selfforum-cgi/shared/Template/Archive.pm b/selfforum-cgi/shared/Template/Archive.pm index c71c359..08d215c 100644 --- a/selfforum-cgi/shared/Template/Archive.pm +++ b/selfforum-cgi/shared/Template/Archive.pm @@ -73,10 +73,29 @@ sub print_month_as_HTML($$$) { my $template = new Template $tempfile; + # + # check if XML file exists + # + unless (-e $mainfile) { + print ${$template->scrap( + $assign->{'error'}, + { + $assign->{'errorText'} => "Es existieren keine Nachrichten für diesen Monat." + } + )}; + return; + } + + # + # try locking and read/parse threads + # my ($threads, $locked); unless ($locked = lock_file($mainfile) and $threads = get_all_threads($mainfile, KILL_DELETED)) { print ${$template->scrap( - $assign->{'errorLocking'} + $assign->{'error'}, + { + $assign->{'errorText'} => "Fehler beim Locking." + } )}; return; } @@ -143,6 +162,19 @@ sub print_thread_as_HTML($$$) { my $template = new Template $tempfile; + # + # check if XML file exists + # + unless (-e $mainfile) { + print ${$template->scrap( + $assign->{'error'}, + { + $assign->{'errorText'} => "Der gewünschte Thread existiert nicht." + } + )}; + return; + } + my $view = get_view_params ({ 'adminDefault' => $param->{'adminDefault'} }); @@ -180,7 +212,8 @@ sub print_thread_as_HTML($$$) { print ${$template->scrap( $assign->{'threadDocStart'}, - $tmplparam + $tmplparam, + 1 )}; # @@ -191,7 +224,7 @@ sub print_thread_as_HTML($$$) { my $header = get_message_header($mnode); my $body = get_message_body($xml, 'm'.$_->{'mid'}); - my $text = message_field ( + my $text = message_field( $body, { 'quoteChars' => plain($view->{'quoteChars'}), @@ -213,7 +246,8 @@ sub print_thread_as_HTML($$$) { $assign->{'msgCategory'} => plain($header->{'category'}), $assign->{'msgSubject'} => plain($header->{'subject'}), $assign->{'msgBody'} => $text - } + }, + 1 )}; } @@ -222,7 +256,8 @@ sub print_thread_as_HTML($$$) { # print ${$template->scrap( $assign->{'threadDocEnd'}, - $tmplparam + $tmplparam, + 1 )}; }