From 4727e6c09f88e63f02e6c8f359862d0c0942ed36 Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Wed, 16 Sep 1998 04:49:23 +0000 Subject: Everything has been ported to now run under Perl. --- long_list.cgi | 78 ++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 33 deletions(-) (limited to 'long_list.cgi') diff --git a/long_list.cgi b/long_list.cgi index 9555a2808..1fb019496 100755 --- a/long_list.cgi +++ b/long_list.cgi @@ -1,5 +1,5 @@ -#! /usr/bonsaitools/bin/mysqltcl -# -*- Mode: tcl; indent-tabs-mode: nil -*- +#!/usr/bonsaitools/bin/perl -w +# -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public License # Version 1.0 (the "License"); you may not use this file except in @@ -20,11 +20,18 @@ # Contributor(s): Terry Weissman -source "CGI.tcl" -puts "Content-type: text/html\n" -puts "Full Text Bug Listing" +use diagnostics; +use strict; -set generic_query { +require "CGI.pl"; + +# Shut up misguided -w warnings about "used only once": +use vars %::FORM; + +print "Content-type: text/html\n\n"; +print "Full Text Bug Listing\n"; + +my $generic_query = " select bugs.bug_id, bugs.product, @@ -42,34 +49,39 @@ select bugs.short_desc from bugs,profiles assign,profiles report where assign.userid = bugs.assigned_to and report.userid = bugs.reporter and -} +"; -ConnectToDatabase +ConnectToDatabase(); -foreach bug [split $FORM(buglist) :] { - SendSQL "$generic_query bugs.bug_id = $bug\n" +foreach my $bug (split(/:/, $::FORM{'buglist'})) { + SendSQL("$generic_query bugs.bug_id = $bug"); - if { [ MoreSQLData ] } { - set result [ FetchSQLData ] - puts "" - puts "" - puts "
[html_quote [lindex $result 15]]
" - puts "" - puts "
Bug#: [lindex $result 0]" - puts "Product: [lindex $result 1]" - puts "Version: [lindex $result 2]" - puts "Platform: [lindex $result 3]" - puts "
OS/Version: [lindex $result 4]" - puts "Status: [lindex $result 5]" - puts "Severity: [lindex $result 6]" - puts "Priority: [lindex $result 7]" - puts "
Resolution: [lindex $result 8]Assigned To: [lindex $result 9]" - puts "Reported By: [lindex $result 10]" - puts "
Component: [lindex $result 11]" - puts "
URL: [html_quote [lindex $result 12]]" - puts "
Summary            : [html_quote [lindex $result 13]]" - puts "
Description        :\n
" - puts "
[html_quote [GetLongDescription $bug]]
" - puts "
" - } + my @row; + if (@row = FetchSQLData()) { + my ($id, $product, $version, $platform, $opsys, $status, $severity, + $priority, $resolution, $assigned, $reporter, $component, $url, + $shortdesc) = (@row); + print "\n"; + print "\n"; + print "
" . + html_quote($shortdesc) . + "
\n"; + print "\n"; + print "
Bug#: $id\n"; + print "Product: $product\n"; + print "Version: $version\n"; + print "Platform: $platform\n"; + print "
OS/Version: $opsys\n"; + print "Status: $status\n"; + print "Severity: $severity\n"; + print "Priority: $priority\n"; + print "
Resolution: $resolutionAssigned To: $assigned\n"; + print "Reported By: $reporter\n"; + print "
Component: $component\n"; + print "
URL: " . html_quote($url) . "\n"; + print "
Summary            : " . html_quote($shortdesc) . "\n"; + print "
Description        :\n
\n"; + print "
" . html_quote(GetLongDescription($bug)) . "
\n"; + print "
\n"; + } } -- cgit v1.2.3-24-g4f1b