From fc6aa3c91fdcb1d9f11d05d9f13d1da8fce15b45 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Sun, 24 Mar 2002 01:58:36 +0000 Subject: Bug 110012 - show_bug templatisation. r=bbaetz, afranke. --- bug_form.pl | 825 +++++++++++++++++++----------------------------------------- 1 file changed, 257 insertions(+), 568 deletions(-) (limited to 'bug_form.pl') diff --git a/bug_form.pl b/bug_form.pl index 6d52011c7..e51107bfb 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -28,604 +28,293 @@ use RelationSet; # Use the Attachment module to display attachments for the bug. use Attachment; -# Shut up misguided -w warnings about "used only once". For some reason, -# "use vars" chokes on me when I try it here. - -sub bug_form_pl_sillyness { - my $zz; - $zz = %::FORM; - $zz = %::components; - $zz = %::proddesc; - $zz = %::prodmaxvotes; - $zz = %::versions; - $zz = @::enterable_products; - $zz = @::legal_keywords; - $zz = @::legal_opsys; - $zz = @::legal_platform; - $zz = @::legal_priority; - $zz = @::settable_resolution; - $zz = @::legal_severity; - $zz = %::target_milestone; -} - -my $loginok = quietly_check_login(); - -my $id = $::FORM{'id'}; - -my $query = " -select - bugs.bug_id, - product, - version, - rep_platform, - op_sys, - bug_status, - resolution, - priority, - bug_severity, - component, - assigned_to, - reporter, - bug_file_loc, - short_desc, - target_milestone, - qa_contact, - status_whiteboard, - date_format(creation_ts,'%Y-%m-%d %H:%i'), - groupset, - delta_ts, - sum(votes.count) -from bugs left join votes using(bug_id) -where bugs.bug_id = $id -group by bugs.bug_id"; - -SendSQL($query); -my %bug; -my @row; -@row = FetchSQLData(); -my $count = 0; -foreach my $field ("bug_id", "product", "version", "rep_platform", - "op_sys", "bug_status", "resolution", "priority", - "bug_severity", "component", "assigned_to", "reporter", - "bug_file_loc", "short_desc", "target_milestone", - "qa_contact", "status_whiteboard", "creation_ts", - "groupset", "delta_ts", "votes") { - $bug{$field} = shift @row; - if (!defined $bug{$field}) { - $bug{$field} = ""; +sub show_bug { + # Shut up misguided -w warnings about "used only once". For some reason, + # "use vars" chokes on me when I try it here. + sub bug_form_pl_sillyness { + my $zz; + $zz = %::FORM; + $zz = %::proddesc; + $zz = %::prodmaxvotes; + $zz = @::enterable_products; + $zz = @::settable_resolution; + $zz = $::unconfirmedstate; + $zz = $::milestoneurl; + $zz = $::template; + $zz = $::vars; + $zz = @::legal_priority; + $zz = @::legal_platform; + $zz = @::legal_severity; + $zz = @::legal_bug_status; + $zz = @::target_milestone; + $zz = @::components; + $zz = @::legal_keywords; + $zz = @::versions; + $zz = @::legal_opsys; } - $count++; -} - -my $assignedtoid = $bug{'assigned_to'}; -my $reporterid = $bug{'reporter'}; -my $qacontactid = $bug{'qa_contact'}; - -$bug{'assigned_to_email'} = DBID_to_name($assignedtoid); -$bug{'assigned_to'} = DBID_to_real_or_loginname($bug{'assigned_to'}); -$bug{'reporter'} = DBID_to_real_or_loginname($bug{'reporter'}); - -print qq{
"; - -print qq| -Description: | -Opened: $bug{'creation_ts'} |