X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/489e7846289d4fb66eb4b9fab0fed4af719b98ee..6f724da13eb20d81ea9f988a88d8c38f9046d4c7:/selfforum-cgi/shared/Template/Posting.pm?ds=sidebyside diff --git a/selfforum-cgi/shared/Template/Posting.pm b/selfforum-cgi/shared/Template/Posting.pm index 348a7db..0ffb6c2 100644 --- a/selfforum-cgi/shared/Template/Posting.pm +++ b/selfforum-cgi/shared/Template/Posting.pm @@ -24,6 +24,7 @@ use Posting::_lib qw( parse_xml_file hr_time ); +use Posting::Cache; use Template; use Template::_conf; use Template::_query; @@ -169,11 +170,26 @@ sub print_posting_as_HTML ($$$) { $formdata->{uniqueID} ->{assign}->{value} => plain(unique_id), $formdata->{followUp} ->{assign}->{value} => plain($param -> {thread}.';'.$param -> {posting}), $formdata->{quoteChar} ->{assign}->{value} => "ÿ".plain(defined $view -> {quoteChars} ? $view -> {quoteChars} : ''), - $formdata->{userID} ->{assign}->{value} => '' + $formdata->{userID} ->{assign}->{value} => '', + $assign->{firsttime} => $param->{firsttime} ? $param->{firsttime} : '', + $assign->{voted} => $param->{voted} ? $param->{voted} : '' }, $pars, $parent_pars )}; + + # all output done + # + close STDOUT; + + if ($param->{firsttime}) { + my $cache = new Posting::Cache ($param->{cachefile}); + $cache -> add_view ( + { thread => $param -> {thread}, + posting => $param -> {posting} + } + ); + } } }