X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/ba659b53059e637777865e646f0f2a6fb7f2988e..bc4dbfc54e744764e2be7ff3606ccd9a0e86ae08:/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 d10d105..441178d 100644 --- a/selfforum-cgi/shared/Template/Posting.pm +++ b/selfforum-cgi/shared/Template/Posting.pm @@ -12,14 +12,13 @@ use strict; package Template::Posting; -use vars qw(@ISA @EXPORT); - use Encode::Posting; use Encode::Plain; $Encode::Plain::utf8 = 1; use Id; use Lock qw(:WRITE); use Posting::_lib qw(get_message_node get_message_header get_message_body parse_single_thread hr_time); use Template; +use Template::_conf; use Template::_query; use Template::_thread; @@ -29,9 +28,8 @@ use XML::DOM; # Funktionsexport # ==================================================== -require Exporter; -@ISA = qw(Exporter); -@EXPORT = qw(print_posting_as_HTML message_as_HTML); +use base qw(Exporter); +@Template::Posting::EXPORT = qw(print_posting_as_HTML message_as_HTML); ################################ # sub print_posting_as_HTML @@ -45,12 +43,15 @@ sub print_posting_as_HTML ($$$) { my $template = new Template $tempfile; # Datei sperren... (eigentlich) + my $view = get_view_params ({adminDefault => $param -> {adminDefault} + }); + my $xml=new XML::DOM::Parser -> parsefile ($threadpath.'t'.$param -> {thread}.'.xml'); my ($mnode, $tnode) = get_message_node ($xml, 't'.$param -> {thread}, 'm'.$param -> {posting}); my $pnode = $mnode -> getParentNode; my $header = get_message_header ($mnode); - my $msg = parse_single_thread ($tnode, 0, 0); + my $msg = parse_single_thread ($tnode, $param -> {showDeleted}, $view -> {sortedMsg}); my $pheader = ($pnode -> getNodeName eq 'Message')?get_message_header ($pnode):{}; my $assign = $param -> {assign}; @@ -60,7 +61,7 @@ sub print_posting_as_HTML ($$$) { my $body = get_message_body ($xml, 'm'.$param -> {posting}); my $text = message_field ($body, - {quoteChars => '»» ', + {quoteChars => plain($view -> {quoteChars}), quoting => 1, startCite => ${$template -> scrap ($assign -> {startCite})}, endCite => ${$template -> scrap ($assign -> {endCite})} @@ -68,7 +69,7 @@ sub print_posting_as_HTML ($$$) { my $area = answer_field ($body, {quoteArea => 1, - quoteChars => '»» ', + quoteChars => plain($view -> {quoteChars}), messages => $param -> {messages} }); @@ -106,7 +107,7 @@ sub print_posting_as_HTML ($$$) { $formdata->{posterBody}->{assign}->{value} => $area, $formdata->{uniqueID} ->{assign}->{value} => plain(unique_id), $formdata->{followUp} ->{assign}->{value} => plain($param -> {thread}.';'.$param -> {posting}), - $formdata->{quoteChar} ->{assign}->{value} => "ÿ".plain('»» '), + $formdata->{quoteChar} ->{assign}->{value} => "ÿ".plain($view -> {quoteChars}), $formdata->{userID} ->{assign}->{value} => '', }, $pars)};