Commit 5559015a authored by Per Cederqvist's avatar Per Cederqvist

Imported Bugzilla 2.8.

parent 3045a698
data
localconfig
shadow
# -*- 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
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are Copyright (C) 1998
# Netscape Communications Corporation. All Rights Reserved.
#
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Contains some global routines used throughout the CGI scripts of Bugzilla.
......@@ -23,17 +24,23 @@
use diagnostics;
use strict;
# Shut up misguided -w warnings about "used only once". For some reason,
# "use vars" chokes on me when I try it here.
sub CGI_pl_sillyness {
my $zz;
$zz = %::FILENAME;
}
use CGI::Carp qw(fatalsToBrowser);
require 'globals.pl';
sub GeneratePersonInput {
my ($field, $required, $def_value, $extraJavaScript) = (@_);
if (!defined $extraJavaScript) {
$extraJavaScript = "";
}
$extraJavaScript ||= "";
if ($extraJavaScript ne "") {
$extraJavaScript = "onChange=\" $extraJavaScript \"";
$extraJavaScript = "onChange=\"$extraJavaScript\"";
}
return "<INPUT NAME=\"$field\" SIZE=32 $extraJavaScript VALUE=\"$def_value\">";
}
......@@ -320,7 +327,7 @@ sub CheckEmailSyntax {
if ($addr !~ /$match/) {
print "Content-type: text/html\n\n";
print "<H1>Invalid e-mail address entered.</H1>\n";
PutHeader("Check e-mail syntax");
print "The e-mail address you entered\n";
print "(<b>$addr</b>) didn't match our minimal\n";
print "syntax checking for a legal email address.\n";
......@@ -357,8 +364,6 @@ To use the wonders of bugzilla, you can use the following:
print SENDMAIL $msg;
close SENDMAIL;
print "Content-type: text/html\n\n";
print "<H1>Password has been emailed.</H1>\n";
print "The password for the e-mail address\n";
print "$login has been e-mailed to that address.\n";
print "<p>When the e-mail arrives, you can click <b>Back</b>\n";
......@@ -391,6 +396,8 @@ sub confirm_login {
SqlQuote($enteredlogin));
$realpwd = FetchOneColumn();
}
print "Content-type: text/html\n\n";
PutHeader("<H1>Password has been emailed");
MailPassword($enteredlogin, $realpwd);
exit;
}
......@@ -398,7 +405,7 @@ sub confirm_login {
my $enteredcryptpwd = crypt($enteredpwd, substr($realcryptpwd, 0, 2));
if ($realcryptpwd eq "" || $enteredcryptpwd ne $realcryptpwd) {
print "Content-type: text/html\n\n";
print "<H1>Login failed.</H1>\n";
PutHeader("Login failed");
print "The username or password you entered is not valid.\n";
print "Please click <b>Back</b> and try again.\n";
exit;
......@@ -427,7 +434,7 @@ sub confirm_login {
if ($loginok != 1) {
print "Content-type: text/html\n\n";
print "<H1>Please log in.</H1>\n";
PutHeader("Login");
print "I need a legitimate e-mail address and password to continue.\n";
if (!defined $nexturl || $nexturl eq "") {
# Sets nexturl to be argv0, stripping everything up to and
......@@ -523,16 +530,16 @@ sub DumpBugActivity {
my ($id, $starttime) = (@_);
my $datepart = "";
if (defined $starttime) {
$datepart = "and bugs_activity.when >= $starttime";
$datepart = "and bugs_activity.bug_when >= $starttime";
}
my $query = "
select bugs_activity.field, bugs_activity.when,
select bugs_activity.field, bugs_activity.bug_when,
bugs_activity.oldvalue, bugs_activity.newvalue,
profiles.login_name
from bugs_activity,profiles
where bugs_activity.bug_id = $id $datepart
and profiles.userid = bugs_activity.who
order by bugs_activity.when";
order by bugs_activity.bug_when";
SendSQL($query);
......
......@@ -10,6 +10,55 @@ query the CVS tree. For example,
will tell you what has been changed in the last week.
10/12/99 The CHANGES file is now obsolete! There is a new file called
checksetup.pl. You should get in the habit of running that file every time
you update your installation of Bugzilla. That file will be constantly
updated to automatically update your installation to match any code changes.
If you're curious as to what is going on, changes are commented in that file,
at the end.
Many thanks to Holger Schurig <holgerschurig@nikocity.de> for writing this
script!
10/11/99 Restructured voting database to add a cached value in each
bug recording how many total votes that bug has. While I'm at it, I
removed the unused "area" field from the bugs database. It is
distressing to realize that the bugs table has reached the maximum
number of indices allowed by MySQL (16), which may make future
enhancements awkward.
You must feed the following to MySQL:
alter table bugs drop column area;
alter table bugs add column votes mediumint not null, add index (votes);
You then *must* delete the data/versioncache file when you make this
change, as it contains references to the "area" field. Deleting it is safe,
bugzilla will correctly regenerate it.
If you have been using the voting feature at all, then you will then
need to update the voting cache. You can do this by visiting the
sanitycheck.cgi page, and taking it up on its offer to rebuild the
votes stuff.
10/7/99 Added voting ability. You must run the new script
"makevotestable.sh". You must also feed the following to mysql:
alter table products add column votesperuser smallint not null;
9/15/99 Apparently, newer alphas of MySQL won't allow you to have
"when" as a column name. So, I have had to rename a column in the
bugs_activity table. You must feed the below to mysql or you won't
work at all.
alter table bugs_activity change column when bug_when datetime not null;
8/16/99 Added "OpenVMS" to the list of OS's. Feed this to mysql:
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "Mac System 8.6", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "Neutrino", "OS/2", "BeOS", "OpenVMS", "other") not null;
......
/.cvsignore/1.2/Wed Oct 20 16:26:04 1999//
/1x1.gif/1.1/Wed Aug 26 06:14:15 1998/-kb/
/CGI.pl/1.21/Fri Aug 27 17:17:29 1999//
/CHANGES/1.33/Mon Aug 16 23:54:50 1999//
/README/1.26/Tue Jun 29 00:24:40 1999//
/addcomponent.cgi/1.1/Wed Apr 28 22:23:04 1999//
/CGI.pl/1.29/Mon Nov 1 23:33:03 1999//
/CHANGES/1.38/Tue Oct 12 16:57:57 1999//
/README/1.29/Tue Oct 12 20:28:39 1999//
/addcomponent.cgi/1.2/Mon Nov 1 23:33:04 1999//
/ant.jpg/1.2/Wed Aug 26 22:36:05 1998/-kb/
/backdoor.cgi/1.10/Wed May 12 05:22:34 1999//
/bug_form.pl/1.22/Mon Aug 30 14:26:09 1999//
/bug_status.html/1.6/Wed May 12 04:40:02 1999//
/buglist.cgi/1.41/Fri Aug 6 17:00:33 1999//
/changepassword.cgi/1.11/Fri Aug 27 17:17:43 1999//
/colchange.cgi/1.7/Wed Jan 27 21:17:07 1999//
/collectstats.pl/1.6/Tue May 4 00:01:57 1999//
/createaccount.cgi/1.3/Thu Aug 19 00:06:00 1999//
/createattachment.cgi/1.7/Wed Aug 4 17:36:43 1999//
/defparams.pl/1.16/Thu Aug 5 20:02:20 1999//
/describecomponents.cgi/1.2/Fri Jun 11 17:39:38 1999//
/doaddcomponent.cgi/1.2/Fri Jun 11 17:37:43 1999//
/doeditcomponents.cgi/1.1/Thu Mar 11 22:48:41 1999//
/doeditowners.cgi/1.4/Thu Mar 11 16:30:52 1999//
/doeditparams.cgi/1.6/Thu Mar 11 16:30:52 1999//
/editcomponents.cgi/1.2/Wed Apr 28 22:23:04 1999//
/editowners.cgi/1.4/Thu Mar 11 16:30:52 1999//
/editparams.cgi/1.8/Thu Mar 11 16:30:53 1999//
/enter_bug.cgi/1.23/Thu Jul 8 23:55:32 1999//
/help.html/1.2/Tue Jun 15 04:29:05 1999//
/backdoor.cgi/1.11/Mon Nov 1 23:33:04 1999//
/bug_form.pl/1.25/Mon Nov 1 23:33:04 1999//
/bug_status.html/1.7/Mon Nov 1 23:33:06 1999//
/buglist.cgi/1.57/Mon Nov 1 23:33:06 1999//
/changepassword.cgi/1.13/Mon Nov 1 23:33:07 1999//
/checksetup.pl/1.6/Mon Nov 1 23:33:07 1999//
/colchange.cgi/1.10/Mon Nov 1 23:33:08 1999//
/collectstats.pl/1.7/Mon Nov 1 23:33:09 1999//
/createaccount.cgi/1.5/Mon Nov 1 23:33:09 1999//
/createattachment.cgi/1.8/Mon Nov 1 23:33:09 1999//
/defparams.pl/1.22/Mon Nov 1 23:33:10 1999//
/describecomponents.cgi/1.3/Mon Nov 1 23:33:11 1999//
/doaddcomponent.cgi/1.3/Mon Nov 1 23:33:11 1999//
/doeditcomponents.cgi/1.5/Mon Nov 1 23:33:11 1999//
/doeditowners.cgi/1.5/Mon Nov 1 23:33:12 1999//
/doeditparams.cgi/1.7/Mon Nov 1 23:33:12 1999//
/doeditvotes.cgi/1.5/Mon Nov 1 23:33:12 1999//
/editcomponents.cgi/1.8/Mon Nov 1 23:33:12 1999//
/editowners.cgi/1.5/Mon Nov 1 23:33:13 1999//
/editparams.cgi/1.9/Mon Nov 1 23:33:13 1999//
/editproducts.cgi/1.4/Mon Nov 1 23:33:14 1999//
/editusers.cgi/1.2/Mon Nov 1 23:33:14 1999//
/editversions.cgi/1.3/Mon Nov 1 23:33:14 1999//
/enter_bug.cgi/1.24/Mon Nov 1 23:33:15 1999//
/help.html/1.3/Mon Nov 1 23:33:16 1999//
/helpemailquery.html/1.1/Tue Jan 19 00:07:45 1999//
/how_to_mail.html/1.1/Wed Aug 26 06:14:18 1998//
/index.html/1.6/Sun Jun 27 02:09:45 1999//
/long_list.cgi/1.7/Wed May 12 04:31:35 1999//
/makeactivitytable.sh/1.2/Tue Mar 23 22:32:21 1999//
/makeattachmenttable.sh/1.2/Tue Jun 22 23:44:22 1999//
/makebugtable.sh/1.15/Mon Aug 16 23:54:50 1999//
/makecctable.sh/1.2/Tue Jan 19 00:07:46 1999//
/makecomponenttable.sh/1.59/Fri Apr 30 19:40:51 1999//
/makedependenciestable.sh/1.1/Thu May 27 14:13:40 1999//
/makegroupstable.sh/1.1/Thu Mar 11 16:30:53 1999//
/makelogincookiestable.sh/1.1/Wed Sep 2 18:52:48 1998//
/makeproducttable.sh/1.12/Fri Apr 30 19:40:52 1999//
/makeprofilestable.sh/1.5/Tue May 25 17:59:39 1999//
/makeversiontable.sh/1.13/Fri Apr 30 19:40:53 1999//
/new_comment.cgi/1.2/Tue Sep 15 21:49:25 1998//
/newquip.html/1.2/Tue Sep 15 21:49:26 1998//
/how_to_mail.html/1.2/Mon Nov 1 23:33:16 1999//
/index.html/1.9/Mon Nov 1 23:33:16 1999//
/long_list.cgi/1.11/Mon Nov 1 23:33:16 1999//
/new_comment.cgi/1.3/Mon Nov 1 23:33:16 1999//
/newquip.html/1.3/Mon Nov 1 23:33:17 1999//
/notargetmilestone.html/1.1/Wed Feb 3 02:46:51 1999//
/post_bug.cgi/1.9/Thu Jul 8 00:21:33 1999//
/process_bug.cgi/1.21/Thu Jul 8 23:06:47 1999//
/processmail/1.22/Wed Aug 4 15:07:28 1999//
/query.cgi/1.42/Tue Aug 24 15:24:50 1999//
/relogin.cgi/1.6/Tue Jun 15 04:29:05 1999//
/reports.cgi/1.21/Sun Aug 29 15:42:12 1999//
/sanitycheck.cgi/1.9/Tue Jun 1 20:52:15 1999//
/show_activity.cgi/1.3/Tue May 25 19:22:31 1999//
/show_bug.cgi/1.8/Tue Jun 15 04:25:29 1999//
/showattachment.cgi/1.3/Mon May 24 19:08:59 1999//
/showdependencygraph.cgi/1.5/Thu May 27 20:20:57 1999//
/showdependencytree.cgi/1.3/Fri Aug 27 17:31:21 1999//
/showowners.cgi/1.2/Mon Jul 26 20:41:54 1999//
/whineatnews.pl/1.2/Fri Aug 13 17:10:01 1999//
/globals.pl/1.26/Mon Aug 30 23:02:02 1999//
D
/post_bug.cgi/1.12/Fri Nov 19 14:50:57 1999//
/process_bug.cgi/1.25/Mon Nov 1 23:33:17 1999//
/processmail/1.31/Wed Nov 3 00:44:29 1999//
/query.cgi/1.47/Mon Nov 1 23:33:18 1999//
/relogin.cgi/1.8/Mon Nov 1 23:33:18 1999//
/reports.cgi/1.25/Mon Nov 1 23:33:19 1999//
/sanitycheck.cgi/1.14/Mon Nov 1 23:33:19 1999//
/show_activity.cgi/1.4/Mon Nov 1 23:33:19 1999//
/show_bug.cgi/1.10/Mon Nov 1 23:33:19 1999//
/showattachment.cgi/1.4/Mon Nov 1 23:33:20 1999//
/showdependencygraph.cgi/1.7/Mon Nov 1 23:33:20 1999//
/showdependencytree.cgi/1.6/Fri Nov 19 15:51:48 1999//
/showowners.cgi/1.4/Mon Nov 1 23:33:21 1999//
/showvotes.cgi/1.3/Mon Nov 1 23:33:21 1999//
/votehelp.html/1.4/Mon Nov 1 23:33:21 1999//
/whineatnews.pl/1.4/Mon Nov 1 23:33:22 1999//
D/contrib////
/globals.pl/1.33/Fri Nov 19 15:56:18 1999//
......@@ -201,17 +201,8 @@ you can get at the files in that directory through your web server.
Once all the files are in a web accessible directory, make that
directory writable by your webserver's user (which may require just
making it world writable). Inside this main bugzilla directory issue the
following commands:
mkdir data
cd data
touch comments
touch nomail
touch mail
making it world writable).
Make sure the data directory and files are writable by the webserver.
Lastly, you'll need to set up a symbolic link from /usr/bonsaitools/bin
to the correct location of your perl executable (probably /usr/bin/perl). Or,
you'll have to hack all the .cgi files to change where they look for perl.
......@@ -249,53 +240,19 @@ For much more information about MySQL permissions, see the MySQL documentation.
After you've tweaked the permissions, run "mysqladmin reload" to make sure that
the database server knows to look at your new permission list.
Next we'll create the bugs database in MySQL. This is done using the
'mysql' command line client. This client allows one to funnel SQL
statements into the MySQL server directly. It's usage summary is
available by running:
mysql --help
from the command line.
Once you've begun mysql you'll see a 'mysql>' prompt. At the prompt you
should enter:
create database bugs;
quit
To create the tables necessary for bug tracking and to minimally
populate the bug tracking system you'll need to run the eight shell
scripts found in your bugzilla directory that begin with 'make'. These
scripts load data into the database by piping input into the mysql
command. Order does not matter, but this one is fine:
./makeactivitytable.sh
./makeattachmenttable.sh
./makebugtable.sh
./makecctable.sh
./makecomponenttable.sh
./makedependenciestable.sh
./makegroupstable.sh
./makelogincookiestable.sh
./makeproducttable.sh
./makeprofilestable.sh
./makeversiontable.sh
You may want to edit the scripts; once bugs are entered it gets very hard to
make changes. Think carefully about how you want database users to describe bugs. Here's one
suggested alternative:
priority enum("P1", "P2", "P3", "P4", "defer") not null,
bug_severity enum("critical", "normal", "low", "---",
"enhancement", "requirement", "polish") not null,
op_sys enum("Unspecified", "Windows 3.1", "Windows 95", "Windows 98",
"Windows NT", "Mac System 7", "Mac System 8", "Linux",
"Solaris", "FreeBSD", "Other Unix", "other") not null,
rep_platform enum("Unspecified", "Apple", "PC Clone", "Sun", "other"),
After running the scripts you've got a nearly empty copy of the bug tracking setup.
Next, you can just run the magic checksetup.pl script. (Many thanks to Holger
Schurig <holgerschurig@nikocity.de> for writing this script!) It will make
sure things have reasonable permissions, set up the "data" directory, and
create all the MySQL tables. Just run:
./checksetup.pl
The first time you run it, it will create a file called "localconfig" which you
should examine and perhaps tweak a bit. Then re-run checksetup.pl and it will
do the real work.
At ths point, you should have a nearly empty copy of the bug tracking setup.
4. Tweaking the Bugzilla->MySQL Connection Data
......@@ -330,12 +287,16 @@ web browser!). You'll be prompted for logon info, and you should enter your
email address and then select 'mail me my password'. When you get the password
mail, log in with it. Don't finish entering that new bug.
Now, bring up MySQL, and add yourself to every group. This will
effectively make you 'superuser'. The SQL to type is:
Now, add yourself to every group. The magic checksetup.pl script can do
this for you, if you run it again now. That script will notice if there's
exactly one user in the database, and if so, add that person to every group.
If you want to add someone to every group by hand, you can do it by
typing the appropriate MySQL commands. Run mysql, and type:
update profiles set groupset=0x7fffffffffffffff where login_name = 'XXX';
replacing XXX with your BugZilla email address.
replacing XXX with your Bugzilla email address.
Now, if you go to the query page (off of the bugzilla main menu) where you'll
now find a 'edit parameters' option which is filled with editable treats.
......@@ -467,19 +428,13 @@ hour old, so Bugzilla will eventually notice your changes by itself, but
generally you want it to notice right away, so that you can test things.
Appendix C. Upgrading from previous versions of BugZilla
The developers of BugZilla are constantly adding new tables, columns and fields.
You'll get SQL errors if you just update the code. The strategy to update is
to read the CHANGES file backwards, and apply all of the instructions given,
typically things like:
./makeattachmenttable.sh
./makegroupstable.sh
alter table products add column disallownew tinyint not null;
Appendix C. Upgrading from previous versions of Bugzilla
Someday someone should write a script that queries the existing database
for all the required columns, and if any are missing, adds them.
The developers of Bugzilla are constantly adding new tables, columns and
fields. You'll get SQL errors if you just update the code. The strategy to
update is to simply always run the checksetup.pl script whenever you upgrade
your installation of Bugzilla. If you want to see what has changed, you can
read the comments in that file, starting from the end.
Appendix D. History
......
#!/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
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are Copyright (C) 1998
# Netscape Communications Corporation. All Rights Reserved.
#
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Sam Ziegler <sam@ziegler.org>
# Terry Weissman <terry@mozilla.org>
# Mark Hamby <mhamby@logicon.com>
......
#!/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
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are Copyright (C) 1998
# Netscape Communications Corporation. All Rights Reserved.
#
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Provides a silly 'back-door' mechanism to let me automatically insert
......
# -*- 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
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are Copyright (C) 1998
# Netscape Communications Corporation. All Rights Reserved.
#
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
use diagnostics;
use strict;
# 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 = %::prodmaxvotes;
$zz = %::versions;
$zz = @::legal_opsys;
$zz = @::legal_platform;
$zz = @::legal_product;
$zz = @::legal_priority;
$zz = @::legal_resolution_no_dup;
$zz = @::legal_severity;
}
my %knownattachments;
......@@ -111,7 +128,7 @@ my $id = $::FORM{'id'};
my $query = "
select
bug_id,
bugs.bug_id,
product,
version,
rep_platform,
......@@ -130,10 +147,12 @@ select
status_whiteboard,
date_format(creation_ts,'Y-m-d'),
groupset,
delta_ts
from bugs
where bug_id = $id
and bugs.groupset & $::usergroupset = bugs.groupset";
delta_ts,
sum(votes.count)
from bugs left join votes using(bug_id)
where bugs.bug_id = $id
and bugs.groupset & $::usergroupset = bugs.groupset
group by bugs.bug_id";
SendSQL($query);
my %bug;
......@@ -145,7 +164,7 @@ if (@row = FetchSQLData()) {
"bug_severity", "component", "assigned_to", "reporter",
"bug_file_loc", "short_desc", "target_milestone",
"qa_contact", "status_whiteboard", "creation_ts",
"groupset", "delta_ts") {
"groupset", "delta_ts", "votes") {
$bug{$field} = shift @row;
if (!defined $bug{$field}) {
$bug{$field} = "";
......@@ -368,6 +387,16 @@ if (Param("usedependencies")) {
print "</tr></table>\n";
}
if ($::prodmaxvotes{$bug{'product'}}) {
print qq{
<table><tr>
<th><a href="votehelp.html">Votes</a> for bug $id:</th><td>
<a href="showvotes.cgi?bug_id=$id">$bug{'votes'}</a>
&nbsp;&nbsp;&nbsp;<a href="showvotes.cgi?voteon=$id">Vote for this bug</a>
</td></tr></table>
};
}
print "
<br>
<B>Additional Comments:</B>
......
<HTML>
<!--
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
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.