$EXPORT_TAGS{all} = [@EXPORT_OK];
}
-use Text::Template;
+use Text::Xslate qw(html_builder);
use Storable qw(dclone);
use IO::File;
use Data::Dumper;
+### for %text_xslate_functions
+use POSIX;
+use Debbugs::CGI qw(html_escape);
+use Scalar::Util;
+use Debbugs::Common qw(make_list);
+use Debbugs::Status;
+
our %tt_templates;
our %filled_templates;
our $language;
-# This function is what is called when someone does include('foo/bar')
-# {include('foo/bar')}
-
-sub include {
- my $template = shift;
- $filled_templates{$template}++;
- print STDERR "include template $template language $language\n" if $DEBUG;
- # Die if we're in a template loop
- die "Template loop with $template" if $filled_templates{$template} > 10;
- my $filled_tmpl = '';
- eval {
- $filled_tmpl = fill_in_template(template => $template,
- variables => {},
- language => $language,
- );
- };
- if ($@) {
- print STDERR "failed to fill template $template: $@";
- }
- print STDERR "failed to fill template $template\n" if $filled_tmpl eq '' and $DEBUG;
- print STDERR "template $template '$filled_tmpl'\n" if $DEBUG;
- $filled_templates{$template}--;
- return $filled_tmpl;
-};
+
+sub __output_select_options {
+ my ($options,$value) = @_;
+ my @options = @{$options};
+ my $output = '';
+ while (@options) {
+ my ($o_value) = shift @options;
+ if (ref($o_value)) {
+ for (@{$o_value}) {
+ unshift @options,
+ ($_,$_);
+ }
+ next;
+ }
+ my $name = shift @options;
+ my $selected = '';
+ if (defined $value and $o_value eq $value) {
+ $selected = ' selected';
+ }
+ $output .= q(<option value=").html_escape($o_value).qq("$selected>).
+ html_escape($name).qq(</option>\n);
+ }
+ return $output;
+}
+
+sub __text_xslate_functions {
+ return
+ {gm_strftime => sub {POSIX::strftime($_[0],gmtime)},
+ package_links => html_builder(\&Debbugs::CGI::package_links),
+ bug_links => html_builder(\&Debbugs::CGI::bug_links),
+ looks_like_number => \&Scalar::Util::looks_like_number,
+ isstrongseverity => \&Debbugs::Status::isstrongseverity,
+ secs_to_english => \&Debbugs::Common::secs_to_english,
+ maybelink => \&Debbugs::CGI::maybelink,
+ # add in a few utility routines
+ duplicate_array => sub {
+ my @r = map {($_,$_)} make_list(@{$_[0]});
+ return @r;
+ },
+ output_select_options => html_builder(\&__output_select_options),
+ make_list => \&make_list,
+ };
+}
+sub __text_xslate_functions_text {
+ return
+ {bugurl =>
+ sub{
+ return "$_[0]: ".
+ $config{cgi_domain}.'/'.
+ Debbugs::CGI::bug_links(bug=>$_[0],
+ links_only => 1,
+ );
+ },
+ };
+}
+
+
+
+### this function removes leading spaces from line-start code strings and spaces
+### before <:- and spaces after -:>
+sub __html_template_prefilter {
+ my $text = shift;
+ $text =~ s/^\s+:/:/mg;
+ $text =~ s/((?:^:[^\n]*\n)?)\s+(<:-)/$1$2/mg;
+ $text =~ s/(-:>)\s+(^:|)/$1.(length($2)?"\n$2":'')/emg;
+ return $text;
+}
=head2 fill_in_template
language => '..'
);
-Reads a template from disk (if it hasn't already been read in) and
-fills the template in.
+Reads a template from disk (if it hasn't already been read in) andf
+ills the template in.
=cut
-
sub fill_in_template{
my %param = validate_with(params => \@_,
- spec => {template => SCALAR|HANDLE|SCALARREF,
+ spec => {template => SCALAR,
variables => {type => HASHREF,
default => {},
},
output => {type => HANDLE,
optional => 1,
},
- safe => {type => OBJECT|UNDEF,
- optional => 1,
- },
hole_var => {type => HASHREF,
optional => 1,
},
+ output_type => {type => SCALAR,
+ default => 'html',
+ },
},
);
- if ($DEBUG) {
- print STDERR "fill_in_template ";
- print STDERR join(" ",map {exists $param{$_}?"$_:$param{$_}":()} keys %param);
- print STDERR "\n";
- }
-
# Get the text
- my $tt_type = '';
- my $tt_source;
- if (ref($param{template}) eq 'GLOB' or
- ref(\$param{template}) eq 'GLOB') {
- $tt_type = 'FILE_HANDLE';
- $tt_source = $param{template};
- binmode($tt_source,":encoding(UTF-8)");
- }
- elsif (ref($param{template}) eq 'SCALAR') {
- $tt_type = 'STRING';
- $tt_source = ${$param{template}};
- }
- else {
- $tt_type = 'FILE';
- $tt_source = _locate_text($param{template},$param{language});
- }
- if (not defined $tt_source) {
- die "Unable to find template $param{template} with language $param{language}";
- }
-
- $language = $param{language};
+ my $output_type = $param{output_type};
+ my $language = $param{language};
+ my $template = $param{template};
+ $template .= '.tx' unless $template =~ /\.tx$/;
my $tt;
- if ($tt_type eq 'FILE' and
- defined $tt_templates{$tt_source} and
- ($tt_templates{$tt_source}{mtime} + 60) < time and
- (stat $tt_source)[9] <= $tt_templates{$tt_source}{mtime}
+ if (not exists $tt_templates{$output_type}{$language} or
+ not defined $tt_templates{$output_type}{$language}
) {
- $tt = $tt_templates{$tt_source}{template};
- }
- else {
- my $passed_source = $tt_source;
- my $passed_type = $tt_type;
- if ($tt_type eq 'FILE') {
- $tt_templates{$tt_source}{mtime} =
- (stat $tt_source)[9];
- $passed_source = IO::File->new($tt_source,'r');
- binmode($passed_source,":encoding(UTF-8)");
- $passed_type = 'FILEHANDLE';
- }
- $tt = Text::Template->new(TYPE => $passed_type,
- SOURCE => $passed_source,
- UNTAINT => 1,
- );
- if ($tt_type eq 'FILE') {
- $tt_templates{$tt_source}{template} = $tt;
- }
+ $tt_templates{$output_type}{$language} =
+ Text::Xslate->new(# cache in template_cache or temp directory
+ cache_dir => $config{template_cache} //
+ File::Temp::tempdir(CLEANUP => 1),
+ # default to the language, but fallback to en_US
+ path => [$config{template_dir}.'/'.$language.'/',
+ $config{template_dir}.'/en_US/',
+ ],
+ suffix => '.tx',
+ ## use html or text specific functions
+ function =>
+ ($output_type eq 'html' ? __text_xslate_functions() :
+ __text_xslate_functions_text()),
+ syntax => 'Kolon',
+ module => ['Text::Xslate::Bridge::Star',
+ 'Debbugs::Text::XslateBridge',
+ ],
+ type => $output_type,
+ ## use the html-specific pre_process_handler
+ $output_type eq 'html'?
+ (pre_process_handler => \&__html_template_prefilter):(),
+ )
+ or die "Unable to create Text::Xslate";
}
- if (not defined $tt) {
- die "Unable to create Text::Template for $tt_type:$tt_source";
+ $tt = $tt_templates{$output_type}{$language};
+ my $ret =
+ $tt->render($template,
+ {time => time,
+ %{$param{variables}//{}},
+ config => \%config,
+ });
+ if (exists $param{output}) {
+ print {$param{output}} $ret;
+ return '';
}
- my $ret = $tt->fill_in(PACKAGE => 'DTT',
- HASH => {%{$param{variables}//{}},
- (map {my $t = $_; $t =~ s/^\&//; ($t => $param{hole_var}{$_})}
- keys %{$param{hole_var}//{}}),
- include => \&Debbugs::Text::include,
- config => \%config,
- },
- defined $param{output}?(OUTPUT=>$param{output}):(),
- );
- if (not defined $ret) {
- print STDERR $Text::Template::ERROR;
- return '';
- }
- if ($DEBUG) {
- no strict 'refs';
- no warnings 'uninitialized';
- print STDERR "Variables for $param{template}\n";
- }
-
return $ret;
}
-sub _locate_text{
- my ($template,$language) = @_;
- $template =~ s/\.tmpl$//g;
- # if a language doesn't exist, use the en_US template
- if (not -e $config{template_dir}.'/'.$language.'/'.$template.'.tmpl') {
- $language = 'en_US';
- }
- my $loc = $config{template_dir}.'/'.$language.'/'.$template.'.tmpl';
- if (not -e $loc) {
- print STDERR "Unable to locate template $loc\n";
- return undef;
- }
- return $loc;
-}
-
1;
use Debbugs::Control::Service qw(valid_control control_line);
use Debbugs::Recipients qw(determine_recipients);
use Encode qw(encode_utf8 decode);
+use List::AllUtils qw(first uniqnum);
=head1 NAME
my $variables = {config => \%config,
defined($ref)?(ref => $ref):(),
defined($data)?(data => $data):(),
- refs => [map {exists $clonebugs{$_}?$clonebugs{$_}:$_} keys %bug_affected],
+ refs => [sort
+ uniqnum(defined($ref)?($ref):(),
+ map {exists $clonebugs{$_}?$clonebugs{$_}:$_}
+ keys %bug_affected)],
%{$extra_var},
};
- my $hole_var = {'&bugurl' =>
- sub{"$_[0]: ".
- $config{cgi_domain}.'/'.
- Debbugs::CGI::bug_links(bug=>$_[0],
- links_only => 1,
- );
- }
- };
return fill_in_template(template => $template,
variables => $variables,
- hole_var => $hole_var,
+ output_type => 'text',
);
}
use Scalar::Util qw(looks_like_number);
-use List::AllUtils qw(first);
+use List::AllUtils qw(first uniqnum);
use Mail::RFC822::Address;
use Encode qw(decode encode);
my $variables = {config => \%config,
defined($ref)?(ref => $ref):(),
defined($data)?(data => $data):(),
- refs => [map {exists $clonebugs{$_}?$clonebugs{$_}:$_} keys %bug_affected],
+ refs => [sort
+ uniqnum(defined($ref)?($ref):(),
+ map {exists $clonebugs{$_}?$clonebugs{$_}:$_}
+ keys %bug_affected)],
%{$extra_var},
};
- my $hole_var = {'&bugurl' =>
- sub{"$_[0]: ".
- $config{cgi_domain}.'/'.
- Debbugs::CGI::bug_links(bug=>$_[0],
- links_only => 1,
- );
- }
- };
return fill_in_template(template => $template,
variables => $variables,
- hole_var => $hole_var,
+ output_type => 'text',
);
}
+++ /dev/null
-{include(q(html/pre_title))}#{$bug_num} - {html_escape($status{subject})} - {html_escape($config{project})} {html_escape($config{bug})} report logs{include(q(html/post_title.tmpl))}
-<script type="text/javascript">
-<!--
-function toggle_infmessages()
-\{
- allDivs=document.getElementsByTagName("div");
- for (var i = 0 ; i < allDivs.length ; i++ )
- \{
- if (allDivs[i].className == "infmessage")
- \{
- allDivs[i].style.display=(allDivs[i].style.display == 'none' | allDivs[i].style.display == '') ? 'block' : 'none';
- \}
- \}
-\}
--->
-</script>
-</head>
-<body>
-<h1>{html_escape($config{project})} {html_escape($config{bug})} report logs -
-<a href="mailto:{$bug_num}@{html_escape($config{email_domain})}">#{$bug_num}</a><br>
-{html_escape($status{subject})}</h1>
-<div class="versiongraph">{$version_graph}</div>
-{include(q(cgi/bugreport_pkginfo))}
-{include(q(cgi/bugreport_buginfo))}
-{ my $output = '';
- if (looks_like_number($msg)) {
- $output .= sprintf qq(<p><a href="%s">Full log</a></p>),html_escape(bug_links(bug=>$bug_num,links_only=>1));
- }
- else {
- if (not $status{archived}) {
- $output .= qq(<p><a href="mailto:$bug_num\@$config{email_domain}">Reply</a> ).
- qq(or <a href="mailto:$bug_num-subscribe\@$config{email_domain}">subscribe</a> ).
- qq(to this bug.</p>\n);
- }
- $output .= qq(<p><a href="javascript:toggle_infmessages();">Toggle useless messages</a></p>);
- $output .= sprintf qq(<div class="msgreceived"><p>View this report as an <a href="%s">mbox folder</a>, ).
- qq(<a href="%s">status mbox</a>, <a href="%s">maintainer mbox</a></p></div>\n),
- html_escape(bug_links(bug=>$bug_num, links_only=>1,options=>{mbox=>'yes'})),
- html_escape(bug_links(bug=>$bug_num, links_only=>1,options=>{mbox=>'yes',mboxstatus=>'yes'})),
- html_escape(bug_links(bug=>$bug_num, links_only=>1,options=>{mbox=>'yes',mboxmaint=>'yes'}));
- }
- $output;
-}
-{$log}
-<hr>
-<p class="msgreceived">Send a report that <a href="{$config{cgi_domain}}/bugspam.cgi?bug={$bug_num}">this bug log contains spam</a>.</p>
-<hr>
-{include(q(html/html_tail))}
-</body>
-</html>
--- /dev/null
+<: include "html/pre_title.tx" :>#<: $bug_num :> - <: $status.subject :> - <: $config.project :> <: $config.bug :> report logs<: include "html/post_title.tx" :>
+<script type="text/javascript">
+<!--
+function toggle_infmessages()
+{
+ allDivs=document.getElementsByTagName("div");
+ for (var i = 0 ; i < allDivs.length ; i++ )
+ {
+ if (allDivs[i].className == "infmessage")
+ {
+ allDivs[i].style.display=(allDivs[i].style.display == 'none' | allDivs[i].style.display == '') ? 'block' : 'none';
+ }
+ }
+}
+-->
+</script>
+</head>
+<body>
+<h1><: $config.project :> <: $config.bug :> report logs -
+<a href="mailto:<: $bug_num :>@<: $config.email_domain :>">#<: $bug_num :></a><br>
+<: $status.subject :></h1>
+<div class="versiongraph"><: raw($version_graph) :></div>
+<: include "cgi/bugreport_pkginfo.tx" :>
+<: include "cgi/bugreport_buginfo.tx" :>
+: if looks_like_number($msg) {
+<p><a href="<: bug_links(bug => $bug_num, links_only => 1) :>">Full log</a></p>
+: } else {
+: if ! $status.archived {
+<p><a href="mailto:<: $bug_num :>@<: $config.email_domain :>">Reply</a>
+or <a href="mailto:<: $bug_num :>-subscribe@<: $config.email_domain :>">subscribe</a>
+to this bug.</p>
+: }
+<script>
+ document.write("<p><a href=\"javascript:toggle_infmessages();\">Toggle useless messages</a></p>")
+</script>
+<div class="msgreceived"><p>View this report as an
+<a href="<: bug_links("bug",$bug_num,"links_only",1,"options",{"mbox","yes"}) :>">mbox folder</a>,
+<a href="<: bug_links("bug",$bug_num,"links_only",1,"options",{"mbox","yes"}) :>">status mbox</a>,
+<a href="<: bug_links("bug",$bug_num,"links_only",1,"options",{"mbox","yes"}) :>">maintainer mbox</a>
+</p></div>
+: }
+<: raw($log) :>
+<hr>
+<p class="msgreceived">Send a report that <a href="<: $config.cgi_domain :>/bugspam.cgi?bug=<: $bug_num :>">this bug log contains spam</a>.</p>
+<hr>
+<: include "html/html_tail.tx" :>
+</body>
+</html>
+++ /dev/null
-<div class="buginfo">
- <p>Reported by: {package_links(submitter=>$status{originator})}</p>
- <p>Date: {$status{date_text}}</p>
-{ my $output = '';
- if (defined $status{owner} and length $status{owner}) {
- $output = q(<p>Owned by: ).package_links(owner=>$status{owner}).q(</p>);
- }
- $output;
-}
-<p>Severity: {my $output = $status{severity};
- if (isstrongseverity($status{severity})) {
- $output = q(<em class="severity">).$status{severity}.q(</em>);
- }
- $output;
- }</p>
-<p>{@{$status{tags_array}}?q(Tags: ).html_escape(join(q(, ),@{$status{tags_array}})):''}</p>
-{my $output = '';
- if (@{$status{mergedwith_array}}) {
- $output .= q(<p>Merged with ).join(qq(,\n),bug_links(bug=>$status{mergedwith_array})).qq(</p>\n);
- }
- $output;
-}
-{my $output = '';
- if (@{$status{found_versions}}) {
- $output .= q(<p>Found in );
- $output .= (@{$status{found_versions}} == 1) ? 'version ' : 'versions ';
- $output .= join(qq(, ),map {html_escape($_);} @{$status{found_versions}}).qq(</p>\n);
- }
- if (@{$status{fixed_versions}}) {
- $output .= q(<p>Fixed in );
- $output .= (@{$status{fixed_versions}} == 1) ? 'version ' : 'versions ';
- $output .= join(qq(, ),map {html_escape($_);} @{$status{fixed_versions}}).qq(</p>\n);
- }
- $output;
-}
-{ my $output = '';
- if (length($status{done})) {
- $output .= q(<p><strong>Done:</strong> ).html_escape($status{done}).q(</p>)
- }
- $output;
-}
-{ my $output = '';
- if (@{$status{blockedby_array}}) {
- $output .= q(<p>Fix blocked by ).
- join(q(, ),
- map {bug_links(bug=>$_->{bug_num}).q(: ).html_escape($_->{subject})}
- @{$status{blockedby_array}}).q(</p>)
- }
- if (@{$status{blocks_array}}) {
- $output .= q(<p>Blocking fix for ).
- join(q(, ),
- map {bug_links(bug=>$_->{bug_num}).q(: ).html_escape($_->{subject})}
- @{$status{blocks_array}}).q(</p>)
- }
- $output;
-}
-{ my $output = '';
- if (exists $status{archived} and $status{archived}) {
- $output .= q(<p>Bug is archived. No further changes may be made.<p>)
- }
- $output
-}{ my $output = '';
- if (length($status{forwarded})) {
- $output = "<p>Forwarded to " .
- join(', ',
- map {maybelink($_)}
- split /\,\s+/,$status{forwarded}
- )."</p>\n";
- }
- $output;
-}{ my $output = '';
- if (exists $status{summary} and defined $status{summary} and length $status{summary}) {
- $output .= q(<p>Summary: ).html_escape($status{summary}).q(</p>);
- }
- if (exists $status{outlook} and defined $status{outlook} and length $status{outlook}) {
- $output .= q(<p>Outlook: ).html_escape($status{outlook}).q(</p>);
- }
- $output;
-}</div>
--- /dev/null
+<div class="buginfo">
+ <p>Reported by: <: raw(package_links(submitter=>$status.originator )) :></p>
+ <p>Date: <: $status.date_text :></p>
+ : if defined($status.owner) && $status.owner.length() {
+ <p>Owned by: <: raw(package_links("owner",$status.owner)) :></p>
+ : }
+ <p>Severity: <: if $status.severity { :><em class="severity"><: } :><: $status.severity :>
+ <: if $status.severity { :></em><: } :></p>
+ <p><: if $status.tags_array { :>Tags: <: $status.tags_array.join(' ') :></p> <: } :>
+ : if $status.mergedwith_array.count > 0 {
+ <p>Merged with <: bug_links(bug=>$status.mergedwith_array).join(",\n") :></p>
+ : }
+ : if $status.found_versions.count {
+ <p>Found in
+ version<:- if $status.found_versions.count > 1 { -:>s<: } -:>
+ <: $status.found_versions.join(', ') :></p>
+ : }
+ : if $status.fixed_versions.count {
+ <p>Fixed in
+ version<:- if $status.fixed_versions.count > 1 { -:>s<: } -:>
+ <: $status.fixed_versions.join(', ') :></p>
+ : }
+ <: if $status.done.length() { :>
+ <p><strong>Done:</strong> <: $status.done :></p>
+ <: } :>
+ <: if $status.blockedby_array.count { :>
+ <p>Fix blocked by
+ : for $status.blockedby_array -> $bug {
+ <: bug_links("bug",$bug.bug_num) :>: <: $bug.subject :><: if !$~bug.is_last { :>,
+ <: } else { :>.<: } :>
+ : }
+ </p>
+ <: } :>
+ : if $status.blocks_array.count {
+ <p>Blocking fix for
+ : for $status.blocks_array -> $bug {
+ <: bug_links("bug",$bug.bug_num) :>: <: $bug.subject :><:if ! $~bug.is_last { :>,
+ <: } else { :>.<: } :>
+ : }
+ </p>
+ : }
+ : if $status.archived {
+ <p>Bug is archived. No further changes may be made.<p>
+ : }
+ : if defined $status.forwarded and $status.forwarded.length() {
+ <p>Forwarded to <: split($status.forwarded,',\s+').map(maybelink).join(', ') :></p>
+ : }
+ : if defined $status.summary and $status.summary.length() {
+ <p>Summary: <: $status.summary :></p>
+ : }
+ : if defined $status.outlook and $status.outlook.length() {
+ <p>Summary: <: $status.outlook :></p>
+ : }
+</div>
+++ /dev/null
-<div class="pkginfo">
- <p>{if (keys %package > 1) { q(Packages)} else {q(Package)}}:
- {join(q(, ),package_links(package => [map {$_->{package}} grep {!$_->{is_source}} values %package],
- source => [map {$_->{source} } grep { $_->{is_source}} values %package],
- class => q(submitter),
- )
- )};
-{my $output ='';
- for my $package (values %package) {
- $output .= q(Maintainer for ).package_links($package->{is_source}?(source=>$package->{source}):(package=>$package->{package})).qq( is ).
- package_links(maintainer => $package->{maintainer}).qq(; );
- if (exists $package->{source} and not $package->{is_source}) {
- $output .= q(Source for ).package_links(package=>$package->{package}).qq( is ).
- package_links(source => $package->{source}).qq(. );
- }
- }
- $output;
-}</p>
-{ my $output = '';
- if (keys %affects) {
- $output .= q(<p>Affects: ).
- join(q(, ),
- package_links(package => [map {$_->{package}} grep {!$_->{is_source}} values %affects],
- source => [map {$_->{source} } grep { $_->{is_source}} values %affects],
- class => q(submitter),
- )
- ).q(</p>);
- }
- $output;
-}
-</div>
--- /dev/null
+: macro link_to_package -> ($packages) {
+: for $packages.values() -> $pkg {
+: if $pkg.is_source {
+<:- package_links(source => $pkg.source,class=>"submitter"); -:>
+: } else {
+<:- package_links(package => $pkg.package,class=>"submitter"); -:>
+: }
+: if $~pkg.is_last {
+;
+: } else {
+,
+: } } }
+<div class="pkginfo">
+ <p>Package<: if ($package.keys.count > 1) {:>s<: } :>
+ <: link_to_package($package) :>
+: for $package.values() -> $pkg {
+<p>Maintainer for <: package_links($pkg.is_source ? "source": "package",$pkg.is_source ? $pkg.source : $pkg.package ) :> is <: package_links(maintainer => $pkg.maintainer) :>;
+<: if defined($pkg.source) && not $pkg.is_source { :>
+Source for <: package_links(package => $pkg.package) :> is
+<: package_links(source => $pkg.source) :>.
+<: } :></p>
+: }
+: if $affects.keys.size > 0 {
+<p>Affects: <: link_to_package($affects) :>
+</p>
+: }
+</div>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head><title>#{$bug_num} - {$config{project}} {$config{bug}} report logs</title></head>
-<body>
-<h1>{$config{project}} {$config{bug}} report logs - #{$bug_num}</h1>
-<p>There is no record of {$config{bug}} #{$bug_num}.
-Try the <a href="{$config{web_domain}}/">search page</a> instead.</p>
-{#include('html/html_tail')}
-</body></html>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head><title>#<: $bug_num :> - <: $config.project :> .$config.bug report logs</title></head>
+<body>
+<h1>.$config.project .$config.bug report logs - #.$bug_num</h1>
+<p>There is no record of .$config.bug #.$bug_num.
+Try the <a href=".$config.web_domain/">search page</a> instead.</p>
+<: include 'html/html_tail.tx' :>
+</body></html>
+++ /dev/null
-{include(q(html/pre_title))}{html_escape($config{project})} {html_escape($config{bug})} report logs by {html_escape($tag)}{include(q(html/post_title.tmpl))}
-</head>
-<body>
-<h1>{html_escape($config{project})} {html_escape($config{bug})} report logs by {html_escape($tag)}</h1>
-{$note}
-<form>
-<input type="hidden" name="skip" value="{html_escape($param{skip})}">
-<input type="hidden" name="max_results" value="{html_escape($param{max_results})}">
-<input type="hidden" name="indexon" value="{html_escape($param{indexon})}">
-<input type="hidden" name="repeatmerged" value="{html_escape($param{repeatmerged})}">
-<input type="hidden" name="archive" value="{html_escape($param{archive})}">
-<input type="hidden" name="sortby" value="{html_escape($param{sortby})}">
-{ my $output = '';
-if (defined $param{first}) {
- $output .= qq(<input type="hidden" name="first" value=").html_escape($param{first}).qq(">\n);
-} else {
- $output .= q(<p>);
- if ($param{skip}> 0) {
- $output .= q(<input type="submit" name="prev" value="Prev">);
- }
- if (keys %count > ($param{skip} + $param{max_results})) {
- $output .= q(<input type="submit" name="next" value="Next">);
- }
- $output .= qq(</p>\n);
-}
-$output;
-}
-{ $result }
-<hr/>
-{include(q(html/html_tail))}
-</body>
-</html>
--- /dev/null
+<: include "html/pre_title.tx":>.$config.project) .$config.bug report logs by <: $tag :><:include "html/post_title.tx":>
+</head>
+<body>
+ <h1>.$config.project .$config.bug report logs by .$tag</h1>
+ .$note
+ <form>
+ <input type="hidden" name="skip" value=".$param.skip">
+ <input type="hidden" name="max_results" value=".$param.max_results">
+ <input type="hidden" name="indexon" value=".$param.indexon">
+ <input type="hidden" name="repeatmerged" value=".$param.repeatmerged">
+ <input type="hidden" name="archive" value=".$param.archive">
+ <input type="hidden" name="sortby" value=".$param.sortby">
+ : if (defined $param.first) {
+ <input type="hidden" name="first" value="<: $param.first :>">
+ : } else {
+ <p>
+ : if ($param.skip> 0) {
+ <input type="submit" name="prev" value="Prev">
+ : }
+ : if (keys %count > ($param.skip + $param.max_results)) {
+ <input type="submit" name="next" value="Next">
+ : }
+ </p>
+ : }
+ <: $result :>
+ <hr/>
+ <: include "html/html_tail.tx" :>
+</body>
+</html>
+++ /dev/null
-<script type="text/javascript">
-<!--
-toggle_extra_status_visible();
-function pagemain() \{
- toggle(1);
-// toggle(2);
- enable(1);
-\}
-
-var visible_extra_status = 0;
-
-function toggle_extra_status_visible() \{
- all_divs = document.getElementsByTagName("div");
- for (var i = 0; i < all_divs.length; i++) \{
- if (all_divs[i].className == "shortbugstatusextra") \{
- if (all_divs[i].style.position == 'absolute' ) \{
- all_divs[i].style.position = "static";
- all_divs[i].style.display = "block";
- all_divs[i].style.zIndex = 0;
- all_divs[i].style.border = 0;
- var subspans = all_divs[i].getElementsByTagName("span");
- for (var j = 0; j < subspans.length; j++) \{
- subspans[j].style.display = "inline";
- \}
- \}
- else \{
- all_divs[i].style.position = "absolute";
- all_divs[i].style.display = "none"
- all_divs[i].style.zIndex = 2;
- all_divs[i].style.border = "#000 1px solid";
- var subspans = all_divs[i].getElementsByTagName("span");
- for (var j = 0; j < subspans.length; j++) \{
- subspans[j].style.display = "block";
- \}
- \}
- \}
- \}
-\}
-
-function extra_status_visible(id) \{
- var m = document.getElementById("status_mask");
- if (visible_extra_status) \{
- var t = document.getElementById("extra_status_"+visible_extra_status);
- t.style.display = "none";
- if (m) \{
- m.style.display = "none";
- \}
- if (visible_extra_status == id) \{
- visible_extra_status = 0;
- return;
- \}
- visible_extra_status = 0;
- \}
- var e = document.getElementById("extra_status_"+id);
- if (e) \{
- e.style.display = "block";
- visible_extra_status = id;
- if (m) \{
- m.onclick = function() \{ extra_status_visible(id); \};
- m.style.display = "block";
- \}
- \}
-\}
-
-function setCookie(name, value, expires, path, domain, secure) \{
- var curCookie = name + "=" + escape(value) +
- ((expires) ? "; expires=" + expires.toGMTString() : "") +
- ((path) ? "; path=" + path : "") +
- ((domain) ? "; domain=" + domain : "") +
- ((secure) ? "; secure" : "");
- document.cookie = curCookie;
-\}
-
-function save_cat_cookies() \{
- var cat = document.categories.categorisation.value;
- var exp = new Date();
- exp.setTime(exp.getTime() + 10 * 365 * 24 * 60 * 60 * 1000);
- var oldexp = new Date();
- oldexp.setTime(oldexp.getTime() - 1 * 365 * 24 * 60 * 60 * 1000);
- var lev;
- var done = 0;
-
- var u = document.getElementById("users");
- if (u != null) \{ u = u.value; \}
- if (u == "") \{ u = null; \}
- if (u != null) \{
- setCookie("cat" + cat + "_users", u, exp, "/");
- \} else \{
- setCookie("cat" + cat + "_users", "", oldexp, "/");
- \}
-
- var bits = new Array("nam", "pri", "ttl", "ord");
- for (var i = 0; i < 4; i++) \{
- for (var j = 0; j < bits.length; j++) \{
- var e = document.getElementById(bits[j] + i);
- if (e) e = e.value;
- if (e == null) \{ e = ""; \}
- if (j == 0 && e == "") \{ done = 1; \}
- if (done || e == "") \{
- setCookie("cat" + cat + "_" + bits[j] + i, "", oldexp, "/");
- \} else \{
- setCookie("cat" + cat + "_" + bits[j] + i, e, exp, "/");
- \}
- \}
- \}
-\}
-
-function toggle(i) \{
- var a = document.getElementById("a_" + i);
- if (a) \{
- if (a.style.display == "none") \{
- a.style.display = "";
- \} else \{
- a.style.display = "none";
- \}
- \}
-\}
-
-function enable(x) \{
- for (var i = 1; ; i++) \{
- var a = document.getElementById("b_" + x + "_" + i);
- if (a == null) break;
- var ischecked = a.checked;
- for (var j = 1; ; j++) \{
- var b = document.getElementById("b_" + x + "_"+ i + "_" + j);
- if (b == null) break;
- if (ischecked) \{
- b.disabled = false;
- \} else \{
- b.disabled = true;
- \}
- \}
- \}
-\}
--->
-</script>
--- /dev/null
+<script type="text/javascript">
+<!--
+toggle_extra_status_visible();
+function pagemain() {
+ toggle(1);
+// toggle(2);
+ enable(1);
+}
+
+var visible_extra_status = 0;
+
+function toggle_extra_status_visible() {
+ all_divs = document.getElementsByTagName("div");
+ for (var i = 0; i < all_divs.length; i++) {
+ if (all_divs[i].className == "shortbugstatusextra") {
+ if (all_divs[i].style.position == 'absolute' ) {
+ all_divs[i].style.position = "static";
+ all_divs[i].style.display = "block";
+ all_divs[i].style.zIndex = 0;
+ all_divs[i].style.border = 0;
+ var subspans = all_divs[i].getElementsByTagName("span");
+ for (var j = 0; j < subspans.length; j++) {
+ subspans[j].style.display = "inline";
+ }
+ }
+ else {
+ all_divs[i].style.position = "absolute";
+ all_divs[i].style.display = "none"
+ all_divs[i].style.zIndex = 2;
+ all_divs[i].style.border = "#000 1px solid";
+ var subspans = all_divs[i].getElementsByTagName("span");
+ for (var j = 0; j < subspans.length; j++) {
+ subspans[j].style.display = "block";
+ }
+ }
+ }
+ }
+}
+
+function extra_status_visible(id) {
+ var m = document.getElementById("status_mask");
+ if (visible_extra_status) {
+ var t = document.getElementById("extra_status_"+visible_extra_status);
+ t.style.display = "none";
+ if (m) {
+ m.style.display = "none";
+ }
+ if (visible_extra_status == id) {
+ visible_extra_status = 0;
+ return;
+ }
+ visible_extra_status = 0;
+ }
+ var e = document.getElementById("extra_status_"+id);
+ if (e) {
+ e.style.display = "block";
+ visible_extra_status = id;
+ if (m) {
+ m.onclick = function() { extra_status_visible(id); };
+ m.style.display = "block";
+ }
+ }
+}
+
+function setCookie(name, value, expires, path, domain, secure) {
+ var curCookie = name + "=" + escape(value) +
+ ((expires) ? "; expires=" + expires.toGMTString() : "") +
+ ((path) ? "; path=" + path : "") +
+ ((domain) ? "; domain=" + domain : "") +
+ ((secure) ? "; secure" : "");
+ document.cookie = curCookie;
+}
+
+function save_cat_cookies() {
+ var cat = document.categories.categorisation.value;
+ var exp = new Date();
+ exp.setTime(exp.getTime() + 10 * 365 * 24 * 60 * 60 * 1000);
+ var oldexp = new Date();
+ oldexp.setTime(oldexp.getTime() - 1 * 365 * 24 * 60 * 60 * 1000);
+ var lev;
+ var done = 0;
+
+ var u = document.getElementById("users");
+ if (u != null) { u = u.value; }
+ if (u == "") { u = null; }
+ if (u != null) {
+ setCookie("cat" + cat + "_users", u, exp, "/");
+ } else {
+ setCookie("cat" + cat + "_users", "", oldexp, "/");
+ }
+
+ var bits = new Array("nam", "pri", "ttl", "ord");
+ for (var i = 0; i < 4; i++) {
+ for (var j = 0; j < bits.length; j++) {
+ var e = document.getElementById(bits[j] + i);
+ if (e) e = e.value;
+ if (e == null) { e = ""; }
+ if (j == 0 && e == "") { done = 1; }
+ if (done || e == "") {
+ setCookie("cat" + cat + "_" + bits[j] + i, "", oldexp, "/");
+ } else {
+ setCookie("cat" + cat + "_" + bits[j] + i, e, exp, "/");
+ }
+ }
+ }
+}
+
+function toggle(i) {
+ var a = document.getElementById("a_" + i);
+ if (a) {
+ if (a.style.display == "none") {
+ a.style.display = "";
+ } else {
+ a.style.display = "none";
+ }
+ }
+}
+
+function enable(x) {
+ for (var i = 1; ; i++) {
+ var a = document.getElementById("b_" + x + "_" + i);
+ if (a == null) break;
+ var ischecked = a.checked;
+ for (var j = 1; ; j++) {
+ var b = document.getElementById("b_" + x + "_"+ i + "_" + j);
+ if (b == null) break;
+ if (ischecked) {
+ b.disabled = false;
+ } else {
+ b.disabled = true;
+ }
+ }
+ }
+}
+-->
+</script>
+++ /dev/null
-<form method="GET">
-<input type="hidden" name="_fo_combine_key_fo_searchkey_value_fo_searchvalue" value="1">
-<input type="hidden" name="form_options" value="1">
-<table class="forms">
-<tr><td><h2>Select bugs</h2>
-</td>
-<td>
-{ my $output = '';
-our $value_index = 0;
-our $search = '';
-our $search_value = '';
-for my $key (@search_key_order){
- if (exists $param{$key}){
- for my $value (make_list($param{$key})){
- $search = $key;
- $search_value = $value;
- $output .= include('cgi/pkgreport_options_search_key');
- $output .= '<br>';
- $value_index++;
- }
- }
- }
- $search = '';
- $search_value = '';
- $output;
-}
-{include('cgi/pkgreport_options_search_key')}
-</td>
-<td>
-<p>The same search fields are ORed, different fields are ANDed.</p>
-<p>Valid severities are {$config{show_severities}}</p>
-<p>Valid tags are {join(', ',@{$config{tags}})}</p>
-</td>
-</tr>
-<tr><td><h2>Include Bugs</h2></td>
-<td>{our $incexc = 'include';
-include('cgi/pkgreport_options_include_exclude');
-}</td>
-<td></td>
-</tr>
-<tr><td><h2>Exclude Bugs</h2></td>
-<td>
-{our $incexc = 'exclude';
-include('cgi/pkgreport_options_include_exclude');
-}
-</td>
-<td></td>
-</tr>
-<tr><td><h2>Categorize/<wbr>Order using</h2></td>
-<td><select name="ordering">{ my $output = '';
- for my $order (@{$param{orderings}}) {
- $output .= '<option value="'.$order.'"'.(($order eq $param{ordering})?' selected':'').
- ">$order</option>\n";
- }
-$output;
-}</td>
-<td></td>
-</tr>
-<tr><td><h2>Misc options</h2></td>
-<td>
-<input type="checkbox" name="repeatmerged" {exists $param{repeatmerged} and $param{repeatmerged}?' checked':''}> Repeat Merged<br>
-<input type="checkbox" name="bug-rev" {exists $param{"bug-rev"} and $param{"bug-rev"}?' checked':''}> Reverse Bugs<br>
-<input type="checkbox" name="pend-rev" {exists $param{"pend-rev"} and $param{"pend-rev"}?' checked':''}> Reverse Pending<br>
-<input type="checkbox" name="sev-rev" {exists $param{"sev-rev"} and $param{"sev-rev"}?' checked':''}> Reverse Severity<br>
-<input type="checkbox" name="noaffects" {exists $param{"noaffects"} and $param{"noaffects"}?' checked':''}> No Bugs which affect packages<br>
-<select name="dist">
-{output_select_options(['' => 'None',
- map {($_,$_)} @{$config{distributions}},
- ],$param{dist}||'')
-}</select><br>
-<select name="archive">
-{output_select_options([0 => 'Unarchived',
- 1 => 'Archived',
- both => 'Archived and Unarchived',
- ],$param{archive}||0)
-}</select><br>
-<a href="javascript:toggle_extra_status_visible()">Toggle all extra information</a>
-</td>
-</tr>
-<tr><td><h2>Submit</h2></td><td colspan=2>
-<input type="submit" name="submit" value="Submit">
-</td></tr>
-</table>
-
-
--- /dev/null
+<form method="GET">
+ <input type="hidden" name="_fo_combine_key_fo_searchkey_value_fo_searchvalue" value="1">
+ <input type="hidden" name="form_options" value="1">
+ <table class="forms">
+ <tr><td><h2>Select bugs</h2>
+ </td>
+ <td>
+ : for $search_key_order -> $key {
+ : if defined $param[$key] {
+ : for $param[$key] -> $value {
+ : include "cgi/pkgreport_options_search_key.tx" { search => $key, search_value => $value };
+ : }
+ : }
+ : }
+ : include "cgi/pkgreport_options_search_key.tx";
+ </td>
+ <td>
+ <p>The same search fields are ORed, different fields are ANDed.</p>
+ <p>Valid severities are <: $config.show_severities :></p>
+ <p>Valid tags are <: $config.tags.join(', ') :></p>
+ </td>
+ </tr>
+ <tr><td><h2>Include Bugs</h2></td>
+ <td>
+ : include "cgi/pkgreport_options_include_exclude.tx" { incexc => "include" };
+ </td>
+ <td></td>
+ </tr>
+ <tr><td><h2>Exclude Bugs</h2></td>
+ <td>
+ : include "cgi/pkgreport_options_include_exclude.tx" { incexc => "exclude" };
+ </td>
+ <td></td>
+ </tr>
+ <tr><td><h2>Categorize/<wbr>Order using</h2></td>
+ <td><select name="ordering">
+ : for $param.orderings -> $order {
+ <option value="<: $order :>"
+ : if $order == $param.ordering {
+ selected
+ : }
+ ><:- $order -:></option>
+ : }
+ </select>
+ </td>
+ <td></td>
+ </tr>
+ <tr><td><h2>Misc options</h2></td>
+ <td>
+ : macro input_checkbox ->($what,$text) {
+ <input type="checkbox" name="<: $what :>"
+ : if defined($param[$what]) and $param[$what] {
+ checked
+ : }
+ ><:- $text -:><br>
+ : }
+ <:- input_checkbox("repeatmerged","Repeat Merged") :>
+ <:- input_checkbox("bug-rev","Reverse Bugs") :>
+ <:- input_checkbox("pend-rev","Reverse Pending") :>
+ <:- input_checkbox("sev-rev","Reverse Severity") :>
+ <:- input_checkbox("noaffects","No Bugs which affect packages") :>
+ <select name="dist">
+ <: output_select_options(['' => 'None',
+ $config.distributions],
+ ,$param.dist // '') -:>
+ </select><br>
+ <select name="archive">
+ <: output_select_options([0 => 'Unarchived',
+ 1 => 'Archived',
+ both => 'Archived and Unarchived',
+ ],$param.archive//0) -:></select><br>
+ <a href="javascript:toggle_extra_status_visible()">
+ Toggle all extra information</a>
+ </td>
+ </tr>
+ <tr><td><h2>Submit</h2></td><td colspan=2>
+ <input type="submit" name="submit" value="Submit">
+ </td></tr>
+ </table>
+</form>
+++ /dev/null
-<input type="hidden" name="_fo_concatenate_into_{$incexc}_fo_{$incexc}key_fo_{$incexc}value" value="1">
-{ my $output = '';
- our $value_index = 0;
- our $key1 = '';
- our $key2 = '';
- for my $field (make_list($param{$incexc})) {
- ($key1,$key2) = $field =~ m/^([^:]+)\:(.+)/;
- next unless defined $key2;
- $output .= include('cgi/pkgreport_options_include_exclude_key');
- }
- $key1 = '';
- $key2 = '';
- $output .= include('cgi/pkgreport_options_include_exclude_key');
- $output;
-}
-
--- /dev/null
+<input type="hidden" name="_fo_concatenate_into_<: $incexc :>_fo_<: $incexc :>key_fo_<: $incexc :>value" value="1">
+: for $param[$incexc] -> $field {
+ : include "cgi/pkgreport_options_include_exclude_key.tx" {key1 => split($field,':',2).0, key2 => split($field,':',2).1 };
+: }
+: include "cgi/pkgreport_options_include_exclude_key.tx";
+++ /dev/null
-<nobr><select name="_fo_{$incexc}key">
-{output_select_options([subject => 'with subject containing',
- tags => 'tagged',
- severity => 'with severity',
- pending => 'with pending state',
- originator => 'with submitter containing',
- forwarded => 'with forwarded containing',
- owner => 'with owner containing',
- package => 'with package',
- ],$key1||'')}
-</select>
-<input type="text" name="_fo_{$incexc}value" value ="{html_escape($key2)||''}">
-<!-- {$value_index} -->
-</nobr>
--- /dev/null
+<nobr><select name="_fo_<: $incexc :>key">
+<:- output_select_options([subject => 'with subject containing',
+ tags => 'tagged',
+ severity => 'with severity',
+ pending => 'with pending state',
+ originator => 'with submitter containing',
+ forwarded => 'with forwarded containing',
+ owner => 'with owner containing',
+ package => 'with package',
+ ],$key1 // '') :>
+</select>
+<input type="text" name="_fo_<: $incexc :>value" value ="<: $key2 // '':>">
+</nobr>
+++ /dev/null
-<nobr><select name="_fo_searchkey">
-{output_select_options(\@search_key_order,$search||'')}
-</select>
-<input type="text" name="_fo_searchvalue" value ="{html_escape($search_value||'')}">
-<!-- {$value_index} -->
-</nobr>
--- /dev/null
+<nobr><select name="_fo_searchkey">
+<:- raw(output_select_options($search_key_order,$search // '')) -:>
+</select>
+<input type="text" name="_fo_searchvalue" value ="<:- $search_value // '' -:>">
+</nobr>
+++ /dev/null
-<HTML>
-<HEAD><TITLE>Error</TITLE></HEAD>
-<BODY>
-An error occurred.
-Error was: {$msg}
-</BODY></HTML>
--- /dev/null
+<HTML>
+<HEAD><TITLE>Error</TITLE></HEAD>
+<BODY>
+An error occurred.
+Error was: .$msg
+</BODY></HTML>
+++ /dev/null
-<div class="shortbugstatus">
- <a href="{html_escape(bug_links(bug=>$status{bug_num},links_only=>1))}"{length($status{done})?' style="text-decoration:line-through"':''}>#{html_escape($status{bug_num})}</a>
- [<font face="fixed"><span class="link" onclick="javascript:extra_status_visible({html_escape($status{bug_num})})">{
- my $output = qq(<abbr title="$status{severity}">);
- my $temp = $status{severity};
- $temp = substr $temp,0,1;
- if (isstrongseverity($status{severity})){
- $temp = q(<em class="severity">).uc($temp).q(</em>);
- }
- $output .= $temp.qq(</abbr>);
- length($output)?$output:' ';
- }|{
- my $output = '';
- for my $tag (@{$status{tags_array}}) {
- next unless exists $config{tags_single_letter}{$tag};
- $output .= q(<abbr title=").$tag.q(">).$config{tags_single_letter}{$tag}.q(</abbr>);
- }
- length($output)?$output:' ';
- }|{
- my $output = '';
- if (@{$status{mergedwith_array}}) {
- $output .= qq(<abbr title="merged">=</abbr>);
- }
- if (@{$status{fixed_versions}}) {
- $output .= qq(<abbr title="fixed versions">☺</abbr>);
- }
- if (@{$status{blockedby_array}}) {
- $output .= qq(<abbr title="blocked by">♙</abbr>);
- }
- if (@{$status{blocks_array}}) {
- $output .= qq(<abbr title="blocks">♔</abbr>);
- }
- if (length($status{forwarded})) {
- $output .= qq(<abbr title="forwarded">↝</abbr>);
- }
- if ($status{archived}) {
- $output .= qq(<abbr title="archived">♲</abbr>);
- }
- if (length $status{affects}){
- $output .= qq(<abbr title="affects">☣</abbr>);
- }
- length($output)?$output:' ';
- }</span></font>]
- [{package_links(package=>[split /,/,$status{package}],options=>\%options,class=>"submitter")}]
- <a href="{html_escape(bug_links(bug=>$status{bug_num},links_only=>1))}">{html_escape($status{subject})}</a>
- <div id="extra_status_{html_escape($status{bug_num})}" class="shortbugstatusextra">
- <span>Reported by: {package_links(submitter=>$status{originator})};</span>
- <span>Date: {$status{date_text}};</span>
-{ my $output = '';
- if (defined $status{owner} and length $status{owner}) {
- $output = q(<span>Owned by: ).package_links(owner=>$status{owner}).qq(;</span>\n);
- }
- $output;
-}<span>Severity: {my $output = $status{severity};
- if (isstrongseverity($status{severity})) {
- $output = q(<em class="severity">).$status{severity}.q(</em>);
- }
- $output;
- };</span>
-<span>{@{$status{tags_array}}?q(Tags: ).html_escape(join(q(, ),@{$status{tags_array}})).';':''}</span>
-{my $output = '';
- if (@{$status{mergedwith_array}}) {
- $output .= q(<span>Merged with ).join(qq(,\n),bug_links(bug=>$status{mergedwith_array})).qq(;</span>\n);
- }
- $output;
-}{my $output = '';
- if (@{$status{found_versions}} or @{$status{fixed_versions}}) {
- $output .= '<a href="'.
- version_url(package => $status{package},
- found => $status{found_versions},
- fixed => $status{fixed_versions},
- ).'"> ';
- }
- if (@{$status{found_versions}}) {
- $output .= q(<span>Found in );
- $output .= (@{$status{found_versions}} == 1) ? 'version ' : 'versions ';
- $output .= join(qq(, ),map {html_escape($_);} @{$status{found_versions}}).qq(;</span>\n);
- }
- if (@{$status{fixed_versions}}) {
- $output .= q(<span>Fixed in );
- $output .= (@{$status{fixed_versions}} == 1) ? 'version ' : 'versions ';
- $output .= join(qq(, ),map {html_escape($_);} @{$status{fixed_versions}}).qq(;</span>\n);
- }
- if (@{$status{found_versions}} or @{$status{fixed_versions}}) {
- $output .= qq(</a>);
- }
- $output;
-}{ my $output = '';
- if (length($status{forwarded})) {
- $output = "<span><strong>Forwarded</strong> to " .
- join(', ',
- map {maybelink($_)}
- split /\,\s+/,$status{forwarded}
- ).";</span>\n";
- }
- $output;
-}{ my $output = '';
- if (length($status{done})) {
- $output .= q(<span><strong>Done:</strong> ).html_escape($status{done}).q(;</span> )
- }
- $output;
-}{ my $output = '';
- my $days = $status{archive_days};
- if ($days >= 0 and defined $status{location} and $status{location} ne 'archive') {
- $output .= "<span><strong>Can be archived" .
- ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" ) .
- ";</strong></span>\n";
- }
- elsif (defined $status{location} and $status{location} eq 'archived') {
- $output .= "<span><strong>Archived</strong></span>;\n";
- }
- $output;
-}{ my $output = '';
- if (@{$status{blockedby_array}}) {
- $output .= q(<span>Fix blocked by ).
- join(q(, ),
- map {bug_links(bug=>$_->{bug_num}).q(: ).html_escape($_->{subject})}
- @{$status{blockedby_array}}).q(;</span> )
- }
- if (@{$status{blocks_array}}) {
- $output .= q(<span>Blocking fix for ).
- join(q(, ),
- map {bug_links(bug=>$_->{bug_num}).q(: ).html_escape($_->{subject})}
- @{$status{blocks_array}}).q(;</span> )
- }
- $output;
-}{ my $output = '';
- my ($days_last,$eng_last) = secs_to_english(time - $status{log_modified});
- my ($days,$eng) = secs_to_english(time - $status{date});
-
- if ($days >= 7) {
- my $font = "";
- my $efont = "";
- $font = "em" if ($days > 30);
- $font = "strong" if ($days > 60);
- $efont = "</$font>" if ($font);
- $font = "<$font>" if ($font);
-
- $output .= "<span>${font}Filed $eng ago$efont;</span>\n";
- }
- if ($days_last > 7) {
- my $font = "";
- my $efont = "";
- $font = "em" if ($days_last > 30);
- $font = "strong" if ($days_last > 60);
- $efont = "</$font>" if ($font);
- $font = "<$font>" if ($font);
-
- $output .= "<span>${font}Modified $eng_last ago$efont;</span>\n";
- }
- $output;
- }{ my $output = '';
- if (exists $status{archived} and $status{archived}) {
- $output .= q(<span>Bug is archived. No further changes may be made.<span> )
- }
- $output}</div>
-</div>
--- /dev/null
+<div class="shortbugstatus">
+ <a href="<: bug_links(bug=>$status.bug_num,links_only=>1):>"<:length($status.done)?' style="text-decoration:line-through"':'':>>#<: $status.bug_num :></a>
+ [<font face="fixed"><span class="link" onclick="javascript:extra_status_visible(<: $status.bug_num :>)"><abbr title="<: $status.severity :>">
+ <:- my $short_sev = substr($status.severity,0,1) -:>
+ <:- if isstrongseverity($status.severity) { -:><em class="severity"><: uc($short_sev) :></em>
+ <:- } else { -:>
+ <:- $short_sev } -:></abbr>|
+ <:- for $status.tags_array -> $tag { -:>
+ <:- if defined($config.tags_single_letter[$tag]) { -:>
+ <abbr title="<: $tag :>"><: $config.tags_single_letter[$tag] :></abbr><:- } -:>
+ : }
+ <:- if $status.tags_array.size() == 0 { -:> <: } :>|
+ <:- if $status.mergedwith_array.count > 0 { -:>
+ <abbr title="merged">=</abbr>
+ <:- } -:>
+ <:- if $status.fixed_versions.count > 0 { -:>
+ <abbr title="fixed versions">☺</abbr>
+ <:- } -:>
+ <:- if $status.fixed_versions.count > 0 { -:>
+ <abbr title="fixed versions">☺</abbr>
+ <:- } -:>
+ <:- if $status.blockedby_array.count > 0 { -:>
+ <abbr title="blocked by">♙</abbr>
+ <:- } -:>
+ <:- if $status.blocks_array.count > 0 { -:>
+ <abbr title="blocks">♔</abbr>
+ <:- } -:>
+ <:- if length($status.forwarded) { -:>
+ <abbr title="forwarded">↝</abbr>
+ <:- } -:>
+ <:- if $status.archived { -:>
+ <abbr title="archived">♲</abbr>
+ <:- } -:>
+ <:- if length($status.affects) { -:>
+ <abbr title="affects">☣</abbr>
+ <:- } -:></span></font>]
+ [<: raw(package_links(package=>$status.package.split(','),class=>"submitter")) :>]
+ <a href="<: bug_links(bug=>$status.bug_num,links_only=>1) :>"><: $status.subject :></a>
+ <div id="extra_status_<: $status.bug_num :>" class="shortbugstatusextra">
+ <span>Reported by: <: raw(package_links(submitter=>$status.originator)) :>;</span>
+ <span>Date: <: $status.date_text :>;</span>
+ <:- if (defined $status.owner and length($status.owner)) { -:>
+ <span>Owned by: <: raw(package_links(owner=>$status.owner)) :>;</span>
+ <:- } :>
+ <span>Severity:
+ <:- if (isstrongseverity($status.severity)) { -:>
+ <em class="severity">)<: $status.severity :></em>
+ <:- } else { -:>
+ <: $status.severity :>
+ <:- } -:></span>
+ <span>
+ <:- if $status.tags_array.size > 0 { -:>
+ Tags: <: $status.tags_array.join(', ') :>;
+ <:- } -:>
+ </span>
+ : if $status.mergedwith_array.size > 0 {
+ <span>Merged with <: bug_links(bug=>$status.mergedwith_array).join(",\n") :>;</span>
+ : }
+ : if $status.found_versions.size > 0 or $status.fixed_versions.size > 0 {
+ <a href="<:
+ version_url(package => $status.package,
+ found => $status.found_versions,
+ fixed => $status.fixed_versions,
+ ):>">
+ <:- } -:>
+ <:- if $status.found_versions.size > 0 { -:>
+ <span>Found in version<: if $status.found_versions.size > 1 { :>s<: } :>
+ <:- $status.found_versions.join(', ') -:>;
+ </span>
+ <:- } -:>
+ <:- if $status.fixed_versions.size > 0 { :>
+ <span>Fixed in version<: if $status.fixed_versions.size > 1 { :>s<: } :>
+ <:- $status.fixed_versions.join(', ') -:>;
+ </span>
+ <:- } -:>
+ <:- if $status.found_versions.size > 0 or $status.fixed_versions.size > 0 { -:>
+ </a>
+ <:- } -:>
+ <:- if (length($status.forwarded)) { :>
+ <span><strong>Forwarded</strong> to
+ <: $status.forwarded.split('\,\s+').map(maybelink).join(', ') :>
+ </span>
+ <:- } -:>
+ <:- if (length($status.done)) { -:>
+ <span><strong>Done:</strong>
+ <: $status.done :>
+ </span>
+ <:- } -:>
+ <:- if $status.archive_days >= 0 and
+ defined($status.location) && $status.location != "archive" { -:>
+ <span><strong>Can be archived
+ <: if $status.archive_days == 0 { :>
+ today
+ <: } else if $status.archive_days == 1 { :>
+ in 1 day
+ <: } else { :>
+ in <: $status.archive_days :> days
+ <:- } :>;</strong></span>
+ <:- } else if defined($status.location) && $status.location == "archived" { -:>
+ <span><strong>Archived</strong></span>
+ <:- } -:>
+ <:- if $status.blockedby_array.count > 0 { :>
+ <span>Fix blocked by
+ <: for $status.blockedby_array -> $bug { :>
+ <: bug_links("bug",bug.bug_num) :>:
+ <: $bug.subject -:>
+ <:- if ! $~bug.is_last { -:>, <: } else { -:>.<:- } -:>
+ <:- } -:>
+ </span>
+ <:- } -:>
+ <:- if $status.blocks_array.count > 0 { :>
+ <span>Blocking fix for
+ <: for $status.blocks_array -> $bug { :>
+ <: bug_links("bug",bug.bug_num) :>:
+ <: $bug.subject -:>
+ <:- if ! $~bug.is_last {-:>, <: } else { -:>.<:- } -:>
+ <:- } -:>
+ </span>
+ <:- } -:>
+ <:- macro days_ago->($what,$ago) {-:>
+ <span>
+ <:- if ($time - $ago) / 86400 > 60 { -:>
+ <strong><: $what :> <: secs_to_english($time-$ago) :> ago.</strong>
+ <:- } else if ($time - $ago) / 86400 > 30 { :>
+ <strong><: $what :> <: secs_to_english($time-$ago) :> ago.</strong>
+ <:- } -:>;
+ </span>
+ <:- } -:>
+ <: days_ago("Filed",$status.date) :>
+ <: days_ago("Modified",$status.log_modified) :>
+ <:- if defined $status.archived and $status.archived {:>
+ <span>Bug is archived. No further changes may be made.</span>
+ <:- } -:>
+ </div>
+</div>
+++ /dev/null
-<ADDRESS>{$config{maintainer}} <<A HREF="mailto:{$config{maintainer_email}}">{$config{maintainer_email}}</A>>.
-Last modified:
-<!--timestamp-->{$last_modified||strftime('%c',gmtime)}<!--end timestamp-->;
-Machine Name:
-<!--machinename-->{$config{machine_name}||'Unknown'}<!--machinename-->
-<P>
-<A HREF="{$config{web_domain}}/">{$config{project}} {$config{bug}} tracking system</A>
-</p>
-<p>
- Debbugs is free software and licensed under the terms of the GNU
- Public License version 2. The current version can be obtained
- from <a href="https://bugs.debian.org/debbugs-source/">https://bugs.debian.org/debbugs-source/</a>.
-</p>
-<p>
-Copyright © 1999 Darren O. Benham,
-1997,2003 nCipher Corporation Ltd,
-1994-97 Ian Jackson,
-2005-2017 Don Armstrong, and many other contributors.
-</p>
-</ADDRESS>
--- /dev/null
+<address><: $config.maintainer :>
+ <<a href="mailto:<: $config.maintainer_email :>"><: $config.maintainer_email :></a>>.
+ Last modified:
+ <!--timestamp--><: defined $last_modified ? $last_modified : gm_strftime('%c') :><!--end timestamp-->;
+ Machine Name:
+ <!--machinename--><: $config.machine_name ||'Unknown' :><!--machinename-->
+ <p>
+ <a href="<: $config.web_domain :>/"><: $config.project :> <: $config.bug :> tracking system</a>
+ </p>
+ <p>
+ Debbugs is free software and licensed under the terms of the
+ GNU Public License version 2. The current version can be
+ obtained from <a href="https://bugs.debian.org/debbugs-source/">https://bugs.debian.org/debbugs-source/</a>.
+ </p>
+ <p>
+ Copyright © 1999 Darren O. Benham,
+ 1997,2003 nCipher Corporation Ltd,
+ 1994-97 Ian Jackson,
+ 2005-2017 Don Armstrong, and many other contributors.
+ </p>
+</address>
+++ /dev/null
-</title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<link rel="stylesheet" href="{$config{web_host_bug_dir}}/css/bugs.css" type="text/css">
--- /dev/null
+</title>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" href="<: $config.web_host_bug_dir :>/css/bugs.css" type="text/css">
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<title>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html><head>
+<title>
+++ /dev/null
-You have been specifically excluded from using the control interface.
-
-Have a nice day
--- /dev/null
+You have been specifically excluded from using the control interface.
+
+Have a nice day
+++ /dev/null
-Received: (at fakecontrol) by fakecontrolmessage;
-To: {$request_addr}
-From: {$requester}
-Subject: Internal Control
-Message-Id: {$action}
-Date: {$date}
-User-Agent: Fakemail v42.6.9
-
-# A New Hope
-# A long time ago, in a galaxy far, far away
-# something happened.
-#
-# Magically this resulted in the following
-# action being taken, but this fake control
-# message doesn't tell you why it happened
-#
-# The action:
-# {$action}
-thanks
-# This fakemail brought to you by your local debbugs
-# administrator
--- /dev/null
+Received: (at fakecontrol) by fakecontrolmessage;
+To: <: $request_addr :>
+From: <: $requester :>
+Subject: Internal Control
+Message-Id: <: $action :>
+Date: <: $date :>
+User-Agent: Fakemail v42.6.9
+
+# A New Hope
+# A long time ago, in a galaxy far, far away
+# something happened.
+#
+# Magically this resulted in the following
+# action being taken, but this fake control
+# message doesn't tell you why it happened
+#
+# The action:
+# <: $action :>
+thanks
+# This fakemail brought to you by your local debbugs
+# administrator
+++ /dev/null
---
-{
-my %ref_handled;
-for my $bug (sort ($ref,@refs)) {
- next unless defined $bug;
- next if exists $ref_handled{$bug};
- $ref_handled{$bug} = 1;
- $OUT .= bugurl($bug).qq(\n);
-}
-}{$config{project}} {ucfirst($config{bug})} Tracking System
-Contact {$config{maintainer_email}} with problems
--- /dev/null
+--
+: for $refs -> $bug {
+<: bugurl($bug) :>
+: }
+<:$config.project:> <: $config.ubug :> Tracking System
+Contact <: $config.maintainer_email :> with problems
+++ /dev/null
-
-Your message has been forwarded to the package maintainers (but not
-other interested parties, as you requested) for their attention; they
-will reply in due course.
--- /dev/null
+
+Your message has been forwarded to the package maintainers (but not
+other interested parties, as you requested) for their attention; they
+will reply in due course.
+++ /dev/null
-
-Your message is being forwarded to the package maintainers and other
-interested parties for their attention; they will reply in due course.
--- /dev/null
+
+Your message is being forwarded to the package maintainers and other
+interested parties for their attention; they will reply in due course.
+++ /dev/null
-
-Your message has not been forwarded to the package maintainers or
-other interested parties; you should ensure that the developers are
-aware of the problem you have entered into the system - preferably
-quoting the { $config{bug} } reference number, #{ $ref }.
--- /dev/null
+
+Your message has not been forwarded to the package maintainers or
+other interested parties; you should ensure that the developers are
+aware of the problem you have entered into the system - preferably
+quoting the <: $config.bug :> reference number, #<: $ref :>.
+++ /dev/null
-
-You requested that the message be sent to the package maintainer(s)
-but either the { $config{bug} } report is not associated with any package (probably
-because of a missing Package pseudo-header field in the original { $config{bug} }
-report), or the package(s) specified do not have any maintainer(s).
-
-Your message has *not* been sent to any package maintainers; it has
-merely been filed in the { $config{bug} } tracking system. If you require assistance
-please contact { $config{maintainer_email} } quoting the { $config{bug} } number { $ref }.
--- /dev/null
+
+You requested that the message be sent to the package maintainer(s)
+but either the <: $config.bug :> report is not associated with any package (probably
+because of a missing Package pseudo-header field in the original <: $config.bug :>
+report), or the package(s) specified do not have any maintainer(s).
+
+Your message has *not* been sent to any package maintainers; it has
+merely been filed in the <: $config.bug :> tracking system. If you require assistance
+please contact <: $config.maintainer_email :> quoting the <: $config.bug :> number <: $ref :>.
+++ /dev/null
-
-Your message specified a Severity: in the pseudo-header, but
-the severity value {$severity} was not recognised.
-The default severity {$config{default_severity}} is being used instead.
-The recognised values are: {$config{show_severities}}.
--- /dev/null
+
+Your message specified a Severity: in the pseudo-header, but
+the severity value <: $severity :> was not recognised.
+The default severity <: $config.default_severity :> is being used instead.
+The recognised values are: <: $config.show_severities :>.
+++ /dev/null
-
-Your message tried to set a usertag, but didn't have a valid
-user set ('{$user}' isn't valid)
--- /dev/null
+
+Your message tried to set a usertag, but didn't have a valid
+user set ('<: $user :>' isn't valid)
+++ /dev/null
-
-Your message had a Version: pseudo-header with an invalid package
-version:
-
-{$version}
-
-please either use found or fixed to the control server with a correct
-version, or reply to this report indicating the correct version so the
-maintainer (or someone else) can correct it for you.
--- /dev/null
+
+Your message had a Version: pseudo-header with an invalid package
+version:
+
+<: $version :>
+
+please either use found or fixed to the control server with a correct
+version, or reply to this report indicating the correct version so the
+maintainer (or someone else) can correct it for you.
+++ /dev/null
-
-Your message has been sent to the package maintainer(s):
-{join('',map {" $_\n"} @maintaddrs)}
\ No newline at end of file
--- /dev/null
+
+Your message has been sent to the package maintainer(s):
+<: $maintaddrs.join("\n") :>
+++ /dev/null
-{include('mail/header')}{$body}
-{include('mail/footer')}
\ No newline at end of file
--- /dev/null
+: include "mail/header.tx"
+<: $body :>
+: include "mail/footer.tx"
\ No newline at end of file
+++ /dev/null
-{$thanks}
-This is an automatically generated reply to let you know your message
-has been received.
-{ $forwardexplain }{ $resentccexplain }
-If you wish to submit further information on this problem, please
-send it to { $refreplyto }.
-
-Please do not send mail to {$config{maintainer_email}} unless you wish
-to report a problem with the {ucfirst($config{bug})}-tracking system.
-{$brokenness}
\ No newline at end of file
--- /dev/null
+<: $thanks :>
+This is an automatically generated reply to let you know your message
+has been received.
+<: $forwardexplain :><: $resentccexplain :>
+If you wish to submit further information on this problem, please
+send it to <: $refreplyto :>.
+
+Please do not send mail to <:$config.maintainer_email:> unless you wish
+to report a problem with the <: $config.bug :>-tracking system.
+<: $brokenness :>
\ No newline at end of file
+++ /dev/null
-Thank you for the additional information you have supplied regarding
-this {$config{bug}} report.
--- /dev/null
+Thank you for the additional information you have supplied regarding
+this <: $config.bug :> report.
+++ /dev/null
-Thank you for filing a new {$config{bug}} report with {$config{project}}.
-
-You can follow progress on this {$config{bug}} here: {bugurl($ref)}.
--- /dev/null
+Thank you for filing a new <: $config.bug :> report with <:$config.project:>.
+
+You can follow progress on this <: $config.bug :> here: <: bugurl($ref) :>
+++ /dev/null
-Your message did not contain a Subject field. They are recommended and
-useful because the title of a {$config{bug}} is determined using this field.
-Please remember to include a Subject field in your messages in future.
--- /dev/null
+Your message did not contain a Subject field. They are recommended and
+useful because the title of a <: $config.bug :> is determined using this field.
+Please remember to include a Subject field in your messages in future.
+++ /dev/null
-The ${gBug} you submitted against package '{$old_package}' has no
-known maintainer. This usually means that you either did not include a
-Package: pseudoheader, or you filed a bug against a non-existant
-package. Your bug report has been reassigned to package
-'{$new_package}' which is the default package for this bug reporting
-system.
--- /dev/null
+The <: $config.bug :> you submitted against package '<: $old_package :>' has no
+known maintainer. This usually means that you either did not include a
+Package: pseudoheader, or you filed a bug against a non-existant
+package. Your bug report has been reassigned to package
+'<: $new_package :>' which is the default package for this bug reporting
+system.
+++ /dev/null
-Your message dated {$date}
-with message-id {$messageid}
-and subject line {$subject}
-has caused the {$config{project}} {$config{bug}} report #{$ref},
-regarding {$data{subject}}
-to be marked as done.
-
-This means that you claim that the problem has been dealt with.
-If this is not the case it is now your responsibility to reopen the
-{$config{bug}} report if necessary, and/or fix the problem forthwith.
-
-{include('mail/serious_mail_misconfiguration')}
-
--- /dev/null
+Your message dated <: $date :>
+with message-id <: $messageid :>
+and subject line <: $subject :>
+has caused the <: $config.project :> <: $config.bug :> report #<: $ref:>
+regarding <:$data.subject:>
+to be marked as done.
+
+This means that you claim that the problem has been dealt with.
+If this is not the case it is now your responsibility to reopen the
+<: $config.bug :> report if necessary, and/or fix the problem forthwith.
+
+: include "mail/serious_mail_misconfiguration"
+
+++ /dev/null
-Your message dated {$date}
-with message-id {$messageid}
-has caused the {$gProject} {$gBug} report #{$ref},
-regarding {$data{subject}}
-to be marked as having been forwarded to the upstream software
-author(s) {$data{forwarded}}
-
-{include('mail/serious_mail_misconfiguration')}
-
--- /dev/null
+Your message dated <: $date :>
+with message-id <: $messageid :>
+has caused the <: $config.project :> <: $config.bug :> report #<: $ref :>
+regarding <: $data.subject :>
+to be marked as having been forwarded to the upstream software
+author(s) <: $data.forwarded :>
+
+: include "mail/serious_mail_misconfiguration"
+++ /dev/null
-You sent a message to the {$config{project}} {$config{bug}} tracking system old-style
-{$markaswhat} address ({$receivedat}),
-without a recognisable $gBug number in the Subject.
-Your message has been filed under junk but otherwise ignored.
-
-If you don't know what I'm talking about then probably either:
-
-You unwittingly sent a message to {$receivedat}
-because you replied to all recipients of the message a developer used
-to mark a {$config{bug}} as {$markaswhat} and you modified the Subject. In this case,
-please do not be alarmed. To avoid confusion do not do it again, but
-there is no need to apologise or mail anyone asking for an explanation.
-
--or-
-
-{include('mail/serious_mail_misconfiguration')}
-
-Your message was dated {$date} and had
-message-id {$messageid}
-and subject {$subject}.
-
-If you need any assistance or explanation please contact {$config{maintainer_email}}.
--- /dev/null
+You sent a message to the <:$config.project:> <: $config.bug :> tracking system old-style
+<: $markaswhat :> address (<: $receivedat :>),
+without a recognisable <: $config.bug :> number in the Subject.
+Your message has been filed under junk but otherwise ignored.
+
+If you don't know what I'm talking about then probably either:
+
+You unwittingly sent a message to <: $receivedat :>
+because you replied to all recipients of the message a developer used
+to mark a <: $config.bug :> as <: $markaswhat :> and you modified the Subject. In this case,
+please do not be alarmed. To avoid confusion do not do it again, but
+there is no need to apologise or mail anyone asking for an explanation.
+
+-or-
+
+: include('mail/serious_mail_misconfiguration')
+
+Your message was dated <: $date :> and had
+message-id <: $messageid :>
+and subject <: $subject :>.
+
+If you need any assistance or explanation please contact <:$config.maintainer_email:>.
+++ /dev/null
-Your message didn't have a Package: line at the very first line of the
-mail body (part of the pseudo-header), or didn't have a Package: line
-at all. Unfortunatly, this means that your message has been ignored
-completely.
-
-Without this information we are unable to categorise or otherwise deal
-with your problem report. Please _resubmit_ your report to
-{$baddress}@{$config{email_domain}} and tell us which package the
-report is for. For help, check out
-{$config{web_domain}}/Reporting{$config{html_suffix}}.
-
-Your message was dated {$date} and had
-message-id {$messageid}
-and subject {$subject}.
-The complete text of it is attached to this message.
-
-If you need any assistance or explanation please contact
-{$config{maintainer_email}} and include the the attached
-message.
-
-If you didn't send the attached message (spam was sent forging your
-from address), we apologize; please disregard this message.
--- /dev/null
+Your message didn't have a Package: line at the very first line of the
+mail body (part of the pseudo-header), or didn't have a Package: line
+at all. Unfortunatly, this means that your message has been ignored
+completely.
+
+Without this information we are unable to categorise or otherwise deal
+with your problem report. Please _resubmit_ your report to
+<: $baddress :>@<: $config.email_domain:> and tell us which package the
+report is for. For help, check out:
+<: $config.web_domain :>/Reporting<: $config.html_suffix :>
+
+Your message was dated <: $date :> and had
+message-id <: $messageid :>
+and subject <: $subject :>.
+The complete text of it is attached to this message.
+
+If you need any assistance or explanation please contact
+<: $config.maintainer_email :> and include the the attached
+message.
+
+If you didn't send the attached message (spam was sent forging your
+from address), we apologize; please disregard this message.
+++ /dev/null
-You sent a message to the {$config{bug}} tracking system which gave (in the
-Subject line or encoded into the recipient at {$config{email_domain}),
-the number of a nonexistent {$config{bug}} report (#{$tryref}).
-{if ($config{remove_age}){
- $OUT .= "\n".
-"This may be because that $config{bug} report has been resolved for more than $config{remove_age}\n".
-"days, and the record of it has been archived and made read-only, or\n".
-"because you mistyped the $config{bug} report number.\n"
- }
-}
-Your message was dated {$date} and was sent to
-{$baddress}@{$config{email_domain}}. It had
-Message-ID {$messageid}
-and Subject {$subject}
-
-It has been filed (under junk) but otherwise ignored.
-
-Please consult your records to find the correct {$config{bug}} report
-number, or contact {$config{maintainer_email}} for assistance.
-
-{include('mail/serious_mail_misconfiguration')}
\ No newline at end of file
--- /dev/null
+You sent a message to the <: $config.bug :> tracking system which gave (in the
+Subject line or encoded into the recipient at <: $config.email_domain :>),
+the number of a nonexistent <: $config.bug :> report (#<: $tryref :>).
+:if ($config.remove_age) {
+This may be because that <: $config.bug :> report has been resolved for more than <: $config.remove_age :>
+days, and the record of it has been archived and made read-only, or
+because you mistyped the <: $config.bug :> report number.
+: }
+
+Your message was dated <: $date :> and was sent to
+< :$baddress :>@<:$config.email_domain:>. It had
+Message-ID <: $messageid :>
+and Subject <: $subject :>
+
+It has been filed (under junk) but otherwise ignored.
+
+Please consult your records to find the correct <: $config.bug :> report
+number, or contact <: $config.maintainer_email :> for assistance.
+
+.include('mail/serious_mail_misconfiguration')
\ No newline at end of file
+++ /dev/null
-This is an automatic notification regarding your {$config{bug}} report
-which was filed against the {$data{package}} package:
-
-#{$data{bug_num}}: {$data{subject}}
-
-It has been closed by {$markedby}.
-
-Their explanation is attached below along with your original report.
-If this explanation is unsatisfactory and you have not received a
-better one in a separate message then please contact {$markedby} by
-replying to this email.
-
--- /dev/null
+This is an automatic notification regarding your <: $config.bug :> report
+which was filed against the <: $data.package :> package:
+
+#<: $data.bug_num :>: <: $data.subject :>
+
+It has been closed by <: $markedby :>
+
+Their explanation is attached below along with your original report.
+If this explanation is unsatisfactory and you have not received a
+better one in a separate message then please contact <: $markedby :> by
+replying to this email.
+
+++ /dev/null
-(NB: If you are a system administrator and have no idea what this
-message is talking about, this may indicate a serious mail system
-misconfiguration somewhere. Please contact {$config{maintainer_email}}
-immediately.)
\ No newline at end of file
--- /dev/null
+(NB: If you are a system administrator and have no idea what this
+message is talking about, this may indicate a serious mail system
+misconfiguration somewhere. Please contact <: $config.maintainer_email :>
+immediately.)
\ No newline at end of file
+++ /dev/null
-The submitter address recorded for your {$config{bug}} report
-#{$data{bug_num}}: {$data{subject}}
-has been changed.
-
-The old submitter address for this report was
-{$old_data{originator}}.
-
-The new submitter address is
-{$data{originator}}.
-
-This change was made by
-{$replyto}.
-If it was incorrect, please contact them directly.
--- /dev/null
+The submitter address recorded for your <: $config.bug :> report
+#<: $data.bug_num :>: <:$data.subject:>
+has been changed.
+
+The old submitter address for this report was
+<: $old_data.originator :>.
+
+The new submitter address is
+<: $data.originator :>.
+
+This change was made by
+<: $replyto :>
+If it was incorrect, please contact them directly.
+++ /dev/null
-
-As you requested using X-Debbugs-CC, your message was also forwarded to
- { $xcchdr }
-(after having been given a { $config{bug} } report number, if it did not have one).
--- /dev/null
+
+As you requested using X-Debbugs-CC, your message was also forwarded to
+ <: $xcchdr :>
+(after having been given a <: $config.bug :> report number, if it did not have one).