- my $tpar = {thread => $param -> {thread},
- template => $param -> {tree},
- start => $param -> {posting},
- cgi => $cgi};
-
- my $plink = %$pheader?(query_string ({$cgi -> {thread} => $param -> {thread}, $cgi -> {posting} => ($pnode -> getAttribute ('id') =~ /(\d+)/)[0]})):'';
-
- print ${$template -> scrap ($assign->{mainDoc},
- {$assign->{name} => plain($header->{name}),
- $assign->{email} => plain($header->{email}),
- $assign->{home} => plain($header->{home}),
- $assign->{image} => plain($header->{image}),
- $assign->{time} => plain(hr_time($header->{time})),
- $assign->{message} => $text,
- $assign->{messageTitle} => plain($header->{subject}),
- $assign->{parentTitle} => plain($pheader->{subject}),
- $assign->{messageCat} => plain($header->{category}),
- $assign->{parentCat} => plain($pheader->{category}),
- $assign->{parentName} => plain($pheader->{name}),
- $assign->{parentLink} => $plink,
- $assign->{parentTime} => plain(hr_time($pheader->{time})),
- $param->{tree}->{main} => html_thread ($msg, $template, $tpar),
- $formact->{post}->{assign} => $formact->{post}->{url},
- $formact->{vote}->{assign} => $formact->{vote}->{url},
- $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($view -> {quoteChars}),
- $formdata->{userID} ->{assign}->{value} => '',
- }, $pars)};
-
+ my $tpar = {
+ thread => $param -> {thread},
+ template => $param -> {tree},
+ start => $param -> {posting},
+ cgi => $cgi
+ };
+
+ my $parent_pars;
+
+ $parent_pars = {
+ $assign->{parentTitle} => plain($pheader->{subject}),
+ $assign->{parentCat} => plain($pheader->{category}),
+ $assign->{parentName} => plain($pheader->{name}),
+ $assign->{parentTime} => plain(hr_time($pheader->{time})),
+ $assign->{parentLink} => query_string (
+ { $cgi -> {thread} => $param -> {thread},
+ $cgi -> {posting} => ($pnode -> getAttribute ('id') =~ /(\d+)/)[0]
+ })
+ } if (%$pheader);
+
+ print ${$template -> scrap (
+ $assign->{mainDoc},
+ { $assign->{name} => plain($header->{name}),
+ $assign->{email} => plain($header->{email}),
+ $assign->{home} => plain($header->{home}),
+ $assign->{image} => plain($header->{image}),
+ $assign->{time} => plain(hr_time($header->{time})),
+ $assign->{message} => $text,
+ $assign->{messageTitle} => plain($header->{subject}),
+ $assign->{messageCat} => plain($header->{category}),
+ $param->{tree}->{main} => html_thread ($msg, $template, $tpar),
+ $formact->{post}->{assign} => $formact->{post}->{url},
+ $formact->{vote}->{assign} => $formact->{vote}->{url},
+ $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($view -> {quoteChars}),
+ $formdata->{userID} ->{assign}->{value} => ''
+ },
+ $pars,
+ $parent_pars
+ )};
+
+ return;