From e48b3f3cd6311fdf06b24b57142b274789483a77 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" Date: Tue, 27 Aug 2002 04:50:26 +0000 Subject: [PATCH] Merge with HEAD at Groups_20020716_Sync4 git-svn-id: svn://10.0.0.236/branches/Groups_20020716_Branch@128233 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Attachment.pm | 1 - mozilla/webtools/bugzilla/Bug.pm | 114 +++++++++--------- mozilla/webtools/bugzilla/Bugzilla/Search.pm | 4 +- mozilla/webtools/bugzilla/Bugzilla/Util.pm | 3 +- mozilla/webtools/bugzilla/CGI.pl | 1 - mozilla/webtools/bugzilla/RelationSet.pm | 1 - mozilla/webtools/bugzilla/Token.pm | 1 - mozilla/webtools/bugzilla/attachment.cgi | 1 - mozilla/webtools/bugzilla/bug_form.pl | 1 - mozilla/webtools/bugzilla/buglist.cgi | 1 - mozilla/webtools/bugzilla/checksetup.pl | 13 +- mozilla/webtools/bugzilla/colchange.cgi | 1 - mozilla/webtools/bugzilla/collectstats.pl | 1 - .../bugzilla/contrib/BugzillaEmail.pm | 1 - .../webtools/bugzilla/contrib/bug_email.pl | 3 +- .../bugzilla/contrib/bugzilla_email_append.pl | 1 - .../webtools/bugzilla/contrib/cvs-update.sh | 12 +- .../bugzilla/contrib/mysqld-watcher.pl | 1 - mozilla/webtools/bugzilla/createaccount.cgi | 1 - mozilla/webtools/bugzilla/defparams.pl | 3 +- .../webtools/bugzilla/describecomponents.cgi | 1 - .../webtools/bugzilla/describekeywords.cgi | 1 - mozilla/webtools/bugzilla/doeditparams.cgi | 1 - mozilla/webtools/bugzilla/duplicates.cgi | 1 - .../webtools/bugzilla/editattachstatuses.cgi | 1 - mozilla/webtools/bugzilla/editcomponents.cgi | 1 - mozilla/webtools/bugzilla/editgroups.cgi | 3 +- mozilla/webtools/bugzilla/editkeywords.cgi | 1 - mozilla/webtools/bugzilla/editmilestones.cgi | 1 - mozilla/webtools/bugzilla/editparams.cgi | 1 - mozilla/webtools/bugzilla/editproducts.cgi | 1 - mozilla/webtools/bugzilla/editusers.cgi | 1 - mozilla/webtools/bugzilla/editversions.cgi | 1 - mozilla/webtools/bugzilla/enter_bug.cgi | 1 - mozilla/webtools/bugzilla/globals.pl | 3 +- mozilla/webtools/bugzilla/importxml.pl | 1 - mozilla/webtools/bugzilla/index.cgi | 3 +- mozilla/webtools/bugzilla/long_list.cgi | 1 - mozilla/webtools/bugzilla/move.pl | 1 - mozilla/webtools/bugzilla/page.cgi | 1 - mozilla/webtools/bugzilla/post_bug.cgi | 1 - mozilla/webtools/bugzilla/process_bug.cgi | 52 +++++--- mozilla/webtools/bugzilla/processmail | 1 - mozilla/webtools/bugzilla/query.cgi | 1 - mozilla/webtools/bugzilla/queryhelp.cgi | 1 - mozilla/webtools/bugzilla/quips.cgi | 1 - mozilla/webtools/bugzilla/relogin.cgi | 1 - mozilla/webtools/bugzilla/reports.cgi | 1 - mozilla/webtools/bugzilla/sanitycheck.cgi | 1 - mozilla/webtools/bugzilla/show_activity.cgi | 1 - mozilla/webtools/bugzilla/show_bug.cgi | 1 - mozilla/webtools/bugzilla/showattachment.cgi | 3 +- .../webtools/bugzilla/showdependencygraph.cgi | 1 - .../webtools/bugzilla/showdependencytree.cgi | 1 - mozilla/webtools/bugzilla/sidebar.cgi | 3 +- mozilla/webtools/bugzilla/syncshadowdb | 1 - mozilla/webtools/bugzilla/t/002goodperl.t | 2 +- mozilla/webtools/bugzilla/t/004template.t | 2 +- mozilla/webtools/bugzilla/t/005no_tabs.t | 2 +- .../webtools/bugzilla/t/Support/Templates.pm | 3 +- .../template/en/default/index.html.tmpl | 2 +- .../template/en/default/sidebar.xul.tmpl | 2 +- mozilla/webtools/bugzilla/token.cgi | 1 - mozilla/webtools/bugzilla/userprefs.cgi | 1 - mozilla/webtools/bugzilla/votes.cgi | 1 - mozilla/webtools/bugzilla/whineatnews.pl | 1 - mozilla/webtools/bugzilla/xml.cgi | 1 - 67 files changed, 128 insertions(+), 152 deletions(-) diff --git a/mozilla/webtools/bugzilla/Attachment.pm b/mozilla/webtools/bugzilla/Attachment.pm index b4216d4c651..3a6248cf452 100644 --- a/mozilla/webtools/bugzilla/Attachment.pm +++ b/mozilla/webtools/bugzilla/Attachment.pm @@ -24,7 +24,6 @@ # Module Initialization ############################################################################ -use diagnostics; use strict; package Attachment; diff --git a/mozilla/webtools/bugzilla/Bug.pm b/mozilla/webtools/bugzilla/Bug.pm index 5e0559d680c..09c34803848 100755 --- a/mozilla/webtools/bugzilla/Bug.pm +++ b/mozilla/webtools/bugzilla/Bug.pm @@ -21,7 +21,6 @@ # Terry Weissman # Chris Yeh -use diagnostics; use strict; use DBI; @@ -183,40 +182,39 @@ sub initBug { } } - &::SendSQL("select attach_id, creation_ts, description - from attachments - where bug_id = $bug_id"); - my @attachments; - while (&::MoreSQLData()) { - my ($attachid, $date, $desc) = (&::FetchSQLData()); - if ($date =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { - $date = "$3/$4/$2 $5:$6"; - my %attach; - $attach{'attachid'} = $attachid; - $attach{'date'} = $date; - $attach{'desc'} = $desc; - push @attachments, \%attach; + &::SendSQL("select attach_id, creation_ts, isprivate, description + from attachments + where bug_id = $bug_id"); + my @attachments; + while (&::MoreSQLData()) { + my ($attachid, $date, $isprivate, $desc) = (&::FetchSQLData()); + my %attach; + $attach{'attachid'} = $attachid; + $attach{'isprivate'} = $isprivate; + $attach{'date'} = $date; + $attach{'desc'} = $desc; + push @attachments, \%attach; + } + if (@attachments) { + $self->{'attachments'} = \@attachments; } - } - if (@attachments) { - $self->{'attachments'} = \@attachments; - } - &::SendSQL("select bug_id, who, bug_when, thetext + &::SendSQL("select bug_id, who, bug_when, isprivate, thetext from longdescs where bug_id = $bug_id"); - my @longdescs; - while (&::MoreSQLData()) { - my ($bug_id, $who, $bug_when, $thetext) = (&::FetchSQLData()); - my %longdesc; - $longdesc{'who'} = $who; - $longdesc{'bug_when'} = $bug_when; - $longdesc{'thetext'} = $thetext; - push @longdescs, \%longdesc; - } - if (@longdescs) { - $self->{'longdescs'} = \@longdescs; - } + my @longdescs; + while (&::MoreSQLData()) { + my ($bug_id, $who, $bug_when, $isprivate, $thetext) = (&::FetchSQLData()); + my %longdesc; + $longdesc{'who'} = $who; + $longdesc{'bug_when'} = $bug_when; + $longdesc{'isprivate'} = $isprivate; + $longdesc{'thetext'} = $thetext; + push @longdescs, \%longdesc; + } + if (@longdescs) { + $self->{'longdescs'} = \@longdescs; + } my @depends = EmitDependList("blocked", "dependson", $bug_id); if (@depends) { @@ -267,34 +265,40 @@ sub emitXML { } } - if (defined $self->{'longdescs'}) { - for (my $i=0 ; $i < @{$self->{'longdescs'}} ; $i++) { - $xml .= " \n"; - $xml .= " " . &::DBID_to_name($self->{'longdescs'}[$i]->{'who'}) - . "\n"; - $xml .= " " . $self->{'longdescs'}[$i]->{'bug_when'} - . "\n"; - $xml .= " " . QuoteXMLChars($self->{'longdescs'}[$i]->{'thetext'}) - . "\n"; - $xml .= " \n"; + if (defined $self->{'longdescs'}) { + for (my $i=0 ; $i < @{$self->{'longdescs'}} ; $i++) { + next if ($self->{'longdescs'}[$i]->{'isprivate'} + && &::Param("insidergroup") + && !&::UserInGroup(&::Param("insidergroup"))); + $xml .= " \n"; + $xml .= " " . &::DBID_to_name($self->{'longdescs'}[$i]->{'who'}) + . "\n"; + $xml .= " " . $self->{'longdescs'}[$i]->{'bug_when'} + . "\n"; + $xml .= " " . QuoteXMLChars($self->{'longdescs'}[$i]->{'thetext'}) + . "\n"; + $xml .= " \n"; + } } - } - if (defined $self->{'attachments'}) { - for (my $i=0 ; $i < @{$self->{'attachments'}} ; $i++) { - $xml .= " \n"; - $xml .= " " . $self->{'attachments'}[$i]->{'attachid'} - . "\n"; - $xml .= " " . $self->{'attachments'}[$i]->{'date'} . "\n"; - $xml .= " " . QuoteXMLChars($self->{'attachments'}[$i]->{'desc'}) . "\n"; - # $xml .= " " . $self->{'attachments'}[$i]->{'type'} . "\n"; - # $xml .= " " . $self->{'attachments'}[$i]->{'data'} . "\n"; - $xml .= " \n"; + if (defined $self->{'attachments'}) { + for (my $i=0 ; $i < @{$self->{'attachments'}} ; $i++) { + next if ($self->{'attachments'}[$i]->{'isprivate'} + && &::Param("insidergroup") + && !&::UserInGroup(&::Param("insidergroup"))); + $xml .= " \n"; + $xml .= " " . $self->{'attachments'}[$i]->{'attachid'} + . "\n"; + $xml .= " " . $self->{'attachments'}[$i]->{'date'} . "\n"; + $xml .= " " . QuoteXMLChars($self->{'attachments'}[$i]->{'desc'}) . "\n"; + # $xml .= " " . $self->{'attachments'}[$i]->{'type'} . "\n"; + # $xml .= " " . $self->{'attachments'}[$i]->{'data'} . "\n"; + $xml .= " \n"; + } } - } - $xml .= "\n"; - return $xml; + $xml .= "\n"; + return $xml; } sub EmitDependList { diff --git a/mozilla/webtools/bugzilla/Bugzilla/Search.pm b/mozilla/webtools/bugzilla/Bugzilla/Search.pm index e877829a625..19f61642ae0 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Search.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Search.pm @@ -25,7 +25,6 @@ # Myk Melez # Michael Schindler -use diagnostics; use strict; require "globals.pl"; @@ -38,6 +37,7 @@ package Bugzilla::Search; use Bugzilla::Util; use Date::Format; +use Date::Parse; # Create a new Search sub new { @@ -314,7 +314,7 @@ sub init { "^long_?desc," => sub { my $table = "longdescs_$chartid"; push(@supptables, "longdescs $table"); - if (Param("insidergroup") && !UserInGroup(Param("insidergroup"))) { + if (&::Param("insidergroup") && !&::UserInGroup(&::Param("insidergroup"))) { push(@wherepart, "$table.isprivate < 1") ; } push(@wherepart, "$table.bug_id = bugs.bug_id"); diff --git a/mozilla/webtools/bugzilla/Bugzilla/Util.pm b/mozilla/webtools/bugzilla/Bugzilla/Util.pm index 74e7c1fe673..5e2e3feb781 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Util.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Util.pm @@ -19,7 +19,7 @@ # # Contributor(s): Terry Weissman # Dan Mosedale -# Jake +# Jacob Steenhagen # Bradley Baetz # Christopher Aillon @@ -69,7 +69,6 @@ use base qw(Exporter); trim); use strict; -use diagnostics; =head1 FUNCTIONS diff --git a/mozilla/webtools/bugzilla/CGI.pl b/mozilla/webtools/bugzilla/CGI.pl index aa6cdb862d8..a21ef3a2f3d 100644 --- a/mozilla/webtools/bugzilla/CGI.pl +++ b/mozilla/webtools/bugzilla/CGI.pl @@ -27,7 +27,6 @@ # Contains some global routines used throughout the CGI scripts of Bugzilla. -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/RelationSet.pm b/mozilla/webtools/bugzilla/RelationSet.pm index 8668519b9de..a3af4b60a94 100644 --- a/mozilla/webtools/bugzilla/RelationSet.pm +++ b/mozilla/webtools/bugzilla/RelationSet.pm @@ -29,7 +29,6 @@ # might involve turning this into a virtual base class, and having # UserSet and KeywordSet types that inherit from it. -use diagnostics; use strict; # Everything that uses RelationSet should already have globals.pl loaded diff --git a/mozilla/webtools/bugzilla/Token.pm b/mozilla/webtools/bugzilla/Token.pm index 78eef9335fd..6d0741133ea 100644 --- a/mozilla/webtools/bugzilla/Token.pm +++ b/mozilla/webtools/bugzilla/Token.pm @@ -24,7 +24,6 @@ ################################################################################ # Make it harder for us to do dangerous things in Perl. -use diagnostics; use strict; # Bundle the functions in this file together into the "Token" package. diff --git a/mozilla/webtools/bugzilla/attachment.cgi b/mozilla/webtools/bugzilla/attachment.cgi index ce10843a04b..fb3b1d69433 100755 --- a/mozilla/webtools/bugzilla/attachment.cgi +++ b/mozilla/webtools/bugzilla/attachment.cgi @@ -26,7 +26,6 @@ ################################################################################ # Make it harder for us to do dangerous things in Perl. -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/bug_form.pl b/mozilla/webtools/bugzilla/bug_form.pl index 436d6d6de87..f18eae5e8a0 100644 --- a/mozilla/webtools/bugzilla/bug_form.pl +++ b/mozilla/webtools/bugzilla/bug_form.pl @@ -21,7 +21,6 @@ # Dave Miller # Vaskin Kissoyan -use diagnostics; use strict; use RelationSet; diff --git a/mozilla/webtools/bugzilla/buglist.cgi b/mozilla/webtools/bugzilla/buglist.cgi index c8801466bac..ca19f10197a 100755 --- a/mozilla/webtools/bugzilla/buglist.cgi +++ b/mozilla/webtools/bugzilla/buglist.cgi @@ -29,7 +29,6 @@ ################################################################################ # Make it harder for us to do dangerous things in Perl. -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/checksetup.pl b/mozilla/webtools/bugzilla/checksetup.pl index 3fc801b4c70..bf8a39ff0e1 100755 --- a/mozilla/webtools/bugzilla/checksetup.pl +++ b/mozilla/webtools/bugzilla/checksetup.pl @@ -23,7 +23,7 @@ # Dan Mosedale # Dave Miller # Zach Lipton -# Jacob Steenhagen +# Jacob Steenhagen # Bradley Baetz # # @@ -94,7 +94,6 @@ # Global definitions ########################################################################### -use diagnostics; use strict; # 12/17/00 justdave@syndicomm.com - removed declarations of the localconfig @@ -2628,7 +2627,7 @@ AddField('attachments', 'isprivate', 'tinyint not null default 0'); # record when email notifications were last sent about this bug. Also, # added a user pref whether a user wants to use the brand new experimental # stuff. -# 2001-04-29 jake@acutex.net - The newemailtech field is no longer needed +# 2001-04-29 jake@bugzilla.org - The newemailtech field is no longer needed # http://bugzilla.mozilla.org/show_bugs.cgi?id=71552 if (!GetFieldDef('bugs', 'lastdiffed')) { @@ -2951,7 +2950,7 @@ AddField('groups', 'isactive', 'tinyint not null default 1'); # AddField('attachments', 'isobsolete', 'tinyint not null default 0'); -# 2001-04-29 jake@acutex.net - Remove oldemailtech +# 2001-04-29 jake@bugzilla.org - Remove oldemailtech # http://bugzilla.mozilla.org/show_bugs.cgi?id=71552 if (-d 'shadow') { print "Removing shadow directory...\n"; @@ -3012,7 +3011,7 @@ if (!defined GetIndexDef('longdescs','who')) { # truncates re http://bugzilla.mozilla.org/show_bug.cgi?id=9352 ChangeFieldType('bugs', 'version','varchar(64) not null'); -# 2001-07-20 jake@acutex.net - Change bugs_activity to only record changes +# 2001-07-20 jake@bugzilla.org - Change bugs_activity to only record changes # http://bugzilla.mozilla.org/show_bug.cgi?id=55161 if (GetFieldDef('bugs_activity', 'oldvalue')) { AddField("bugs_activity", "removed", "tinytext"); @@ -3086,7 +3085,7 @@ if (GetFieldDef('bugs_activity', 'oldvalue')) { DropField("bugs_activity", "newvalue"); } -# 2001-07-24 jake@acutex.net - disabledtext was being handled inconsitantly +# 2001-07-24 jake@bugzilla.org - disabledtext was being handled inconsitantly # http://bugzilla.mozilla.org/show_bug.cgi?id=90933 ChangeFieldType("profiles", "disabledtext", "mediumtext not null"); @@ -3335,7 +3334,7 @@ if (GetFieldDef("namedqueries", "watchfordiffs")) { DropField("namedqueries", "watchfordiffs"); } -# 2002-08-12 jake@acutex.net/bbaetz@student.usyd.edu.au - bug 43600 +# 2002-08-12 jake@bugzilla.org/bbaetz@student.usyd.edu.au - bug 43600 # Use integer IDs for products and components. if (GetFieldDef("products", "product")) { print "Updating database to use product IDs.\n"; diff --git a/mozilla/webtools/bugzilla/colchange.cgi b/mozilla/webtools/bugzilla/colchange.cgi index 4b1cfc8198f..2ef7c7d102a 100755 --- a/mozilla/webtools/bugzilla/colchange.cgi +++ b/mozilla/webtools/bugzilla/colchange.cgi @@ -21,7 +21,6 @@ # Contributor(s): Terry Weissman # Gervase Markham -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/collectstats.pl b/mozilla/webtools/bugzilla/collectstats.pl index a47e2174deb..8caf92d7788 100755 --- a/mozilla/webtools/bugzilla/collectstats.pl +++ b/mozilla/webtools/bugzilla/collectstats.pl @@ -26,7 +26,6 @@ use AnyDBM_File; -use diagnostics; use strict; use vars @::legal_product; diff --git a/mozilla/webtools/bugzilla/contrib/BugzillaEmail.pm b/mozilla/webtools/bugzilla/contrib/BugzillaEmail.pm index aaba0f4e0a5..48602cdb71b 100644 --- a/mozilla/webtools/bugzilla/contrib/BugzillaEmail.pm +++ b/mozilla/webtools/bugzilla/contrib/BugzillaEmail.pm @@ -29,7 +29,6 @@ push @INC, "../."; # this script now lives in contrib require "globals.pl"; -use diagnostics; use strict; my $EMAIL_TRANSFORM_NONE = "email_transform_none"; diff --git a/mozilla/webtools/bugzilla/contrib/bug_email.pl b/mozilla/webtools/bugzilla/contrib/bug_email.pl index f6b1fadd018..c6a0162dbab 100755 --- a/mozilla/webtools/bugzilla/contrib/bug_email.pl +++ b/mozilla/webtools/bugzilla/contrib/bug_email.pl @@ -37,7 +37,7 @@ # # You need to work with bug_email.pl the MIME::Parser installed. # -# $Id: bug_email.pl,v 1.9.16.3 2002-08-26 01:17:22 bugreport%peshkin.net Exp $ +# $Id: bug_email.pl,v 1.9.16.4 2002-08-27 04:50:18 bugreport%peshkin.net Exp $ ############################################################### # 02/12/2000 (SML) @@ -66,7 +66,6 @@ # - integrate some setup in the checksetup.pl script # - gpg signatures for security -use diagnostics; use strict; use MIME::Parser; diff --git a/mozilla/webtools/bugzilla/contrib/bugzilla_email_append.pl b/mozilla/webtools/bugzilla/contrib/bugzilla_email_append.pl index 826b49198f2..7e1de847bad 100755 --- a/mozilla/webtools/bugzilla/contrib/bugzilla_email_append.pl +++ b/mozilla/webtools/bugzilla/contrib/bugzilla_email_append.pl @@ -28,7 +28,6 @@ # 1. better way to get the body text (I don't know what dump_entity() is # actually doing -use diagnostics; use strict; use MIME::Parser; diff --git a/mozilla/webtools/bugzilla/contrib/cvs-update.sh b/mozilla/webtools/bugzilla/contrib/cvs-update.sh index f74220073da..d189d16e0fe 100644 --- a/mozilla/webtools/bugzilla/contrib/cvs-update.sh +++ b/mozilla/webtools/bugzilla/contrib/cvs-update.sh @@ -18,6 +18,7 @@ # Rights Reserved. # # Contributor(s): Dawn Endico +# Jacob Steenhagen # Keep a record of all cvs updates made from a given directory. @@ -26,11 +27,16 @@ # and run the cvs command with the date that you want to back # out to. (Probably the second to last entry). +# Because this script lives in contrib, you may want to +# ln -s contrib/cvs-update.sh cvs-update +# from your bugzilla install directory so you can run +# the script easily from there (./cvs-update) + #DATE=`date +%e/%m/%Y\ %k:%M:%S\ %Z` DATE=`date` -COMMAND="cvs update -d -P -D" -echo $COMMAND \"$DATE\" >> cvs-update.log -$COMMAND "$DATE" +COMMAND="cvs -q update -dP" +echo $COMMAND -D \"$DATE\" >> cvs-update.log +$COMMAND -A # sample log file diff --git a/mozilla/webtools/bugzilla/contrib/mysqld-watcher.pl b/mozilla/webtools/bugzilla/contrib/mysqld-watcher.pl index ccc1f387832..30945a5ff5f 100755 --- a/mozilla/webtools/bugzilla/contrib/mysqld-watcher.pl +++ b/mozilla/webtools/bugzilla/contrib/mysqld-watcher.pl @@ -23,7 +23,6 @@ # mysqld-watcher.pl - a script that watches the running instance of # mysqld and kills off any long-running SELECTs against the shadow_db # -use diagnostics; use strict; # some configurables: diff --git a/mozilla/webtools/bugzilla/createaccount.cgi b/mozilla/webtools/bugzilla/createaccount.cgi index 8a5b85782be..79be1bb64fa 100755 --- a/mozilla/webtools/bugzilla/createaccount.cgi +++ b/mozilla/webtools/bugzilla/createaccount.cgi @@ -24,7 +24,6 @@ # Christopher Aillon # Gervase Markham -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/defparams.pl b/mozilla/webtools/bugzilla/defparams.pl index 4f30f85a9f7..1c696bdc7a0 100644 --- a/mozilla/webtools/bugzilla/defparams.pl +++ b/mozilla/webtools/bugzilla/defparams.pl @@ -21,7 +21,7 @@ # Dawn Endico # Dan Mosedale # Joe Robins -# Jake +# Jacob Steenhagen # J. Paul Reed # @@ -33,7 +33,6 @@ # Only adding new parameters is done here. Once the parameter exists, you # must use %baseurl%/editparams.cgi from the web to edit the settings. -use diagnostics; use strict; # Shut up misguided -w warnings about "used only once". For some reason, diff --git a/mozilla/webtools/bugzilla/describecomponents.cgi b/mozilla/webtools/bugzilla/describecomponents.cgi index edf9349aba1..9edb5dfa007 100755 --- a/mozilla/webtools/bugzilla/describecomponents.cgi +++ b/mozilla/webtools/bugzilla/describecomponents.cgi @@ -27,7 +27,6 @@ use vars qw( $userid ); -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/describekeywords.cgi b/mozilla/webtools/bugzilla/describekeywords.cgi index 503e0d5a332..07f08d09b88 100755 --- a/mozilla/webtools/bugzilla/describekeywords.cgi +++ b/mozilla/webtools/bugzilla/describekeywords.cgi @@ -21,7 +21,6 @@ # Contributor(s): Terry Weissman # Contributor(s): Gervase Markham -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/doeditparams.cgi b/mozilla/webtools/bugzilla/doeditparams.cgi index c237a199748..b7c8349792c 100755 --- a/mozilla/webtools/bugzilla/doeditparams.cgi +++ b/mozilla/webtools/bugzilla/doeditparams.cgi @@ -21,7 +21,6 @@ # Contributor(s): Terry Weissman # J. Paul Reed -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/duplicates.cgi b/mozilla/webtools/bugzilla/duplicates.cgi index e0026a7663d..59d35c94e4c 100755 --- a/mozilla/webtools/bugzilla/duplicates.cgi +++ b/mozilla/webtools/bugzilla/duplicates.cgi @@ -23,7 +23,6 @@ # Generates mostfreq list from data collected by collectstats.pl. -use diagnostics; use strict; use AnyDBM_File; diff --git a/mozilla/webtools/bugzilla/editattachstatuses.cgi b/mozilla/webtools/bugzilla/editattachstatuses.cgi index ff78221813a..eedf2add4ca 100755 --- a/mozilla/webtools/bugzilla/editattachstatuses.cgi +++ b/mozilla/webtools/bugzilla/editattachstatuses.cgi @@ -26,7 +26,6 @@ ################################################################################ # Make it harder for us to do dangerous things in Perl. -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/editcomponents.cgi b/mozilla/webtools/bugzilla/editcomponents.cgi index 3f161973928..7ad81ddfa51 100755 --- a/mozilla/webtools/bugzilla/editcomponents.cgi +++ b/mozilla/webtools/bugzilla/editcomponents.cgi @@ -25,7 +25,6 @@ # # Holger Schurig -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/editgroups.cgi b/mozilla/webtools/bugzilla/editgroups.cgi index b7f20f36bdd..30b263de5d1 100755 --- a/mozilla/webtools/bugzilla/editgroups.cgi +++ b/mozilla/webtools/bugzilla/editgroups.cgi @@ -19,12 +19,11 @@ # Rights Reserved. # # Contributor(s): Dave Miller -# Jake Steenhagen # Joel Peshkin +# Jacob Steenhagen # Code derived from editowners.cgi and editusers.cgi -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/editkeywords.cgi b/mozilla/webtools/bugzilla/editkeywords.cgi index 1b8d6ef3078..ed298ef9bb7 100755 --- a/mozilla/webtools/bugzilla/editkeywords.cgi +++ b/mozilla/webtools/bugzilla/editkeywords.cgi @@ -20,7 +20,6 @@ # # Contributor(s): Terry Weissman -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/editmilestones.cgi b/mozilla/webtools/bugzilla/editmilestones.cgi index 67d84fcceac..c7d598bea6e 100755 --- a/mozilla/webtools/bugzilla/editmilestones.cgi +++ b/mozilla/webtools/bugzilla/editmilestones.cgi @@ -13,7 +13,6 @@ # -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/editparams.cgi b/mozilla/webtools/bugzilla/editparams.cgi index 0e1b7161f45..ef9e149465f 100755 --- a/mozilla/webtools/bugzilla/editparams.cgi +++ b/mozilla/webtools/bugzilla/editparams.cgi @@ -22,7 +22,6 @@ # J. Paul Reed -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/editproducts.cgi b/mozilla/webtools/bugzilla/editproducts.cgi index cd18650cca4..eacbeab043b 100755 --- a/mozilla/webtools/bugzilla/editproducts.cgi +++ b/mozilla/webtools/bugzilla/editproducts.cgi @@ -27,7 +27,6 @@ # # Holger Schurig -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/editusers.cgi b/mozilla/webtools/bugzilla/editusers.cgi index 64b191b8afb..0cdc184bc24 100755 --- a/mozilla/webtools/bugzilla/editusers.cgi +++ b/mozilla/webtools/bugzilla/editusers.cgi @@ -28,7 +28,6 @@ # # Holger Schurig -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/editversions.cgi b/mozilla/webtools/bugzilla/editversions.cgi index abeed25703a..5f420af4378 100755 --- a/mozilla/webtools/bugzilla/editversions.cgi +++ b/mozilla/webtools/bugzilla/editversions.cgi @@ -26,7 +26,6 @@ # # Holger Schurig -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/enter_bug.cgi b/mozilla/webtools/bugzilla/enter_bug.cgi index 75c2d094b33..0e73a2393ef 100755 --- a/mozilla/webtools/bugzilla/enter_bug.cgi +++ b/mozilla/webtools/bugzilla/enter_bug.cgi @@ -32,7 +32,6 @@ # ############################################################################## -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/globals.pl b/mozilla/webtools/bugzilla/globals.pl index c8b6bcd13c2..ee328f2e8e5 100644 --- a/mozilla/webtools/bugzilla/globals.pl +++ b/mozilla/webtools/bugzilla/globals.pl @@ -19,14 +19,13 @@ # # Contributor(s): Terry Weissman # Dan Mosedale -# Jake +# Jacob Steenhagen # Bradley Baetz # Christopher Aillon # Joel Peshkin # Contains some global variables and routines used throughout bugzilla. -use diagnostics; use strict; use Bugzilla::Util; diff --git a/mozilla/webtools/bugzilla/importxml.pl b/mozilla/webtools/bugzilla/importxml.pl index 092170c03c5..1777bfc4a02 100755 --- a/mozilla/webtools/bugzilla/importxml.pl +++ b/mozilla/webtools/bugzilla/importxml.pl @@ -25,7 +25,6 @@ # a new bug into bugzilla. Everything before the beginning +# Contributor(s): Jacob Steenhagen # # Suppress silly "used only once" warnings @@ -30,7 +30,6 @@ use vars qw{ %COOKIE }; ############################################################################### # Make it harder for us to do dangerous things in Perl. -use diagnostics; use strict; # Include the Bugzilla CGI and general utility library. diff --git a/mozilla/webtools/bugzilla/long_list.cgi b/mozilla/webtools/bugzilla/long_list.cgi index 2b3b0c465ee..dbb89330144 100755 --- a/mozilla/webtools/bugzilla/long_list.cgi +++ b/mozilla/webtools/bugzilla/long_list.cgi @@ -21,7 +21,6 @@ # Contributor(s): Terry Weissman # Gervase Markham -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/move.pl b/mozilla/webtools/bugzilla/move.pl index 66a75f95fbb..65592b02f5c 100755 --- a/mozilla/webtools/bugzilla/move.pl +++ b/mozilla/webtools/bugzilla/move.pl @@ -21,7 +21,6 @@ # Contributor(s): Dawn Endico # Terry Weissman -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/page.cgi b/mozilla/webtools/bugzilla/page.cgi index fb53f8b47ed..cc26f93db8c 100755 --- a/mozilla/webtools/bugzilla/page.cgi +++ b/mozilla/webtools/bugzilla/page.cgi @@ -28,7 +28,6 @@ # either case), numbers 0-9, the underscore "_" and the hyphen "-". ############################################################################### -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/post_bug.cgi b/mozilla/webtools/bugzilla/post_bug.cgi index 39ee12d0528..325e944b0b7 100755 --- a/mozilla/webtools/bugzilla/post_bug.cgi +++ b/mozilla/webtools/bugzilla/post_bug.cgi @@ -23,7 +23,6 @@ # Joe Robins # Gervase Markham -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/process_bug.cgi b/mozilla/webtools/bugzilla/process_bug.cgi index 2486a2c20d7..6dec3914b03 100755 --- a/mozilla/webtools/bugzilla/process_bug.cgi +++ b/mozilla/webtools/bugzilla/process_bug.cgi @@ -24,7 +24,6 @@ # Christopher Aillon # Myk Melez -use diagnostics; use strict; my $UserInEditGroupSet = -1; @@ -429,22 +428,47 @@ sub ChangeStatus { my ($str) = (@_); if ($str ne $::dontchange) { DoComma(); - # Ugly, but functional. We don't want to change Status if we are - # reasigning non-open bugs via the mass change form. - if ( ($::FORM{knob} eq 'reassign' || $::FORM{knob} eq 'reassignbycomponent') && - ! defined $::FORM{id} && $str eq 'NEW' ) { - # If we got to here, we're dealing with a reassign from the mass - # change page. We don't know (and can't easily figure out) if this - # bug is open or closed. If it's closed, we don't want to change - # its status to NEW. We have to put some logic into the SQL itself - # to handle that. + if ($::FORM{knob} eq 'reopen') { + # When reopening, we need to check whether the bug was ever + # confirmed or not + $::query .= "bug_status = IF(everconfirmed = 1, " . + SqlQuote($str) . ", " . + SqlQuote($::unconfirmedstate) . ")"; + } elsif (IsOpenedState($str)) { + # Note that we cannot combine this with the above branch - here we + # need to check if bugs.bug_status is open, (since we don't want to + # reopen closed bugs when reassigning), while above the whole point + # is to reopen a closed bug. + # Currently, the UI doesn't permit a user to reassign a closed bug + # from the single bug page (only during a mass change), but they + # could still hack the submit, so don't restrict this extended + # check to the mass change page for safety/sanity/consistency + # purposes. + + # The logic for this block is: + # If the new state is open: + # If the old state was open + # If the bug was confirmed + # - move it to the new state + # Else + # - Set the state to unconfirmed + # Else + # - leave it as it was + + # This is valid only because 'reopen' is the only thing which moves + # from closed to open, and its handled above + # This also relies on the fact that confirming and accepting have + # already called DoConfirm before this is called + my @open_state = map(SqlQuote($_), OpenStates()); my $open_state = join(", ", @open_state); - $::query .= "bug_status = IF(bug_status IN($open_state), '$str', bug_status)"; - } elsif (IsOpenedState($str)) { - $::query .= "bug_status = IF(everconfirmed = 1, '$str', '$::unconfirmedstate')"; + $::query .= "bug_status = IF(bug_status IN($open_state), " . + "IF(everconfirmed = 1, " . + SqlQuote($str) . ", " . + SqlQuote($::unconfirmedstate) . " ), " . + "bug_status)"; } else { - $::query .= "bug_status = '$str'"; + $::query .= "bug_status = " . SqlQuote($str); } $::FORM{'bug_status'} = $str; # Used later for call to # CheckCanChangeField to make sure this diff --git a/mozilla/webtools/bugzilla/processmail b/mozilla/webtools/bugzilla/processmail index c7a068f8016..12c877a15a7 100755 --- a/mozilla/webtools/bugzilla/processmail +++ b/mozilla/webtools/bugzilla/processmail @@ -25,7 +25,6 @@ # Jacob Steenhagen # Matthew Tuck -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/query.cgi b/mozilla/webtools/bugzilla/query.cgi index b02473108cb..1e2f82bb864 100755 --- a/mozilla/webtools/bugzilla/query.cgi +++ b/mozilla/webtools/bugzilla/query.cgi @@ -23,7 +23,6 @@ # Matthias Radestock # Gervase Markham -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/queryhelp.cgi b/mozilla/webtools/bugzilla/queryhelp.cgi index 16acf73f1f1..bfd7c0f6974 100755 --- a/mozilla/webtools/bugzilla/queryhelp.cgi +++ b/mozilla/webtools/bugzilla/queryhelp.cgi @@ -24,7 +24,6 @@ use vars %::FORM; -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/quips.cgi b/mozilla/webtools/bugzilla/quips.cgi index a50bbc54a84..7db312c61a6 100755 --- a/mozilla/webtools/bugzilla/quips.cgi +++ b/mozilla/webtools/bugzilla/quips.cgi @@ -22,7 +22,6 @@ # Gervase Markham # David Fallon -use diagnostics; use strict; use vars qw( diff --git a/mozilla/webtools/bugzilla/relogin.cgi b/mozilla/webtools/bugzilla/relogin.cgi index 3bab9fdc54c..493f5c200f4 100755 --- a/mozilla/webtools/bugzilla/relogin.cgi +++ b/mozilla/webtools/bugzilla/relogin.cgi @@ -21,7 +21,6 @@ # Contributor(s): Terry Weissman # Gervase Markham -use diagnostics; use strict; use vars %::COOKIE; diff --git a/mozilla/webtools/bugzilla/reports.cgi b/mozilla/webtools/bugzilla/reports.cgi index ac77c89fd90..f557ac7f6b6 100755 --- a/mozilla/webtools/bugzilla/reports.cgi +++ b/mozilla/webtools/bugzilla/reports.cgi @@ -38,7 +38,6 @@ # Myk Melez # Matthew Tuck -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/show_activity.cgi b/mozilla/webtools/bugzilla/show_activity.cgi index 016df6d862a..14b4149ba26 100755 --- a/mozilla/webtools/bugzilla/show_activity.cgi +++ b/mozilla/webtools/bugzilla/show_activity.cgi @@ -22,7 +22,6 @@ # Myk Melez # Gervase Markham -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/show_bug.cgi b/mozilla/webtools/bugzilla/show_bug.cgi index f832a2930eb..6711ff7e619 100755 --- a/mozilla/webtools/bugzilla/show_bug.cgi +++ b/mozilla/webtools/bugzilla/show_bug.cgi @@ -20,7 +20,6 @@ # # Contributor(s): Terry Weissman -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/showattachment.cgi b/mozilla/webtools/bugzilla/showattachment.cgi index 4aaf6f17df4..2471332fce3 100755 --- a/mozilla/webtools/bugzilla/showattachment.cgi +++ b/mozilla/webtools/bugzilla/showattachment.cgi @@ -19,9 +19,8 @@ # Rights Reserved. # # Contributor(s): Terry Weissman -# Jacob Steenhagen +# Jacob Steenhagen -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/showdependencygraph.cgi b/mozilla/webtools/bugzilla/showdependencygraph.cgi index ce5dfa0a1e4..021150bf01f 100755 --- a/mozilla/webtools/bugzilla/showdependencygraph.cgi +++ b/mozilla/webtools/bugzilla/showdependencygraph.cgi @@ -21,7 +21,6 @@ # Contributor(s): Terry Weissman # Gervase Markham -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/showdependencytree.cgi b/mozilla/webtools/bugzilla/showdependencytree.cgi index d2ff5b0ce37..7a27a815bf4 100755 --- a/mozilla/webtools/bugzilla/showdependencytree.cgi +++ b/mozilla/webtools/bugzilla/showdependencytree.cgi @@ -23,7 +23,6 @@ # Christian Reis # Myk Melez -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/sidebar.cgi b/mozilla/webtools/bugzilla/sidebar.cgi index 9bba008dac6..ec021ea1c76 100755 --- a/mozilla/webtools/bugzilla/sidebar.cgi +++ b/mozilla/webtools/bugzilla/sidebar.cgi @@ -13,10 +13,9 @@ # # The Original Code is the Bugzilla Bug Tracking System. # -# Contributor(s): Jacob Steenhagen +# Contributor(s): Jacob Steenhagen use strict; -use diagnostics; use lib "."; require "CGI.pl"; diff --git a/mozilla/webtools/bugzilla/syncshadowdb b/mozilla/webtools/bugzilla/syncshadowdb index 18c4528dc3e..ffe87eea3e6 100755 --- a/mozilla/webtools/bugzilla/syncshadowdb +++ b/mozilla/webtools/bugzilla/syncshadowdb @@ -21,7 +21,6 @@ # Contributor(s): Terry Weissman # David Gardiner -use diagnostics; use strict; require "globals.pl"; diff --git a/mozilla/webtools/bugzilla/t/002goodperl.t b/mozilla/webtools/bugzilla/t/002goodperl.t index d3beec5ef49..1431e7fe895 100644 --- a/mozilla/webtools/bugzilla/t/002goodperl.t +++ b/mozilla/webtools/bugzilla/t/002goodperl.t @@ -18,7 +18,7 @@ # Rights Reserved. # # Contributor(s): Zach Lipton -# Jacob Steenhagen +# Jacob Steenhagen # David D. Kilzer # # Alternatively, the contents of this file may be used under the diff --git a/mozilla/webtools/bugzilla/t/004template.t b/mozilla/webtools/bugzilla/t/004template.t index 730aafc8626..41d515435a7 100644 --- a/mozilla/webtools/bugzilla/t/004template.t +++ b/mozilla/webtools/bugzilla/t/004template.t @@ -17,7 +17,7 @@ # Copyright (C) 2001 Jacob Steenhagen. All # Rights Reserved. # -# Contributor(s): Jacob Steenhagen +# Contributor(s): Jacob Steenhagen # Zach Lipton # David D. Kilzer # diff --git a/mozilla/webtools/bugzilla/t/005no_tabs.t b/mozilla/webtools/bugzilla/t/005no_tabs.t index 31d584ae05c..f1d5f9be504 100644 --- a/mozilla/webtools/bugzilla/t/005no_tabs.t +++ b/mozilla/webtools/bugzilla/t/005no_tabs.t @@ -17,7 +17,7 @@ # Copyright (C) 2001 Jacob Steenhagen. All # Rights Reserved. # -# Contributor(s): Jacob Steenhagen +# Contributor(s): Jacob Steenhagen # David D. Kilzer # diff --git a/mozilla/webtools/bugzilla/t/Support/Templates.pm b/mozilla/webtools/bugzilla/t/Support/Templates.pm index 07f46f7004c..4ef582de48e 100644 --- a/mozilla/webtools/bugzilla/t/Support/Templates.pm +++ b/mozilla/webtools/bugzilla/t/Support/Templates.pm @@ -17,13 +17,12 @@ # Copyright (C) 2001 Jacob Steenhagen. All # Rights Reserved. # -# Contributor(s): Jacob Steenhagen +# Contributor(s): Jacob Steenhagen # David D. Kilzer # package Support::Templates; -use diagnostics; use strict; use lib 't'; diff --git a/mozilla/webtools/bugzilla/template/en/default/index.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/index.html.tmpl index 0b1f28e80c5..d13ccbc4381 100644 --- a/mozilla/webtools/bugzilla/template/en/default/index.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/index.html.tmpl @@ -18,7 +18,7 @@ # Rights Reserved. # # Contributor(s): Terry Weissman - # Jacob Steenhagen + # Jacob Steenhagen #%] [%# INTERFACE: diff --git a/mozilla/webtools/bugzilla/template/en/default/sidebar.xul.tmpl b/mozilla/webtools/bugzilla/template/en/default/sidebar.xul.tmpl index 5e146e2861c..0b5b2698804 100644 --- a/mozilla/webtools/bugzilla/template/en/default/sidebar.xul.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/sidebar.xul.tmpl @@ -17,7 +17,7 @@ # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # - # Contributor(s): Jacob Steenhagen + # Contributor(s): Jacob Steenhagen # Scott Collins # Christopher A. Aillon #%] diff --git a/mozilla/webtools/bugzilla/token.cgi b/mozilla/webtools/bugzilla/token.cgi index 46b99eca526..86e51939d34 100755 --- a/mozilla/webtools/bugzilla/token.cgi +++ b/mozilla/webtools/bugzilla/token.cgi @@ -25,7 +25,6 @@ ############################################################################ # Make it harder for us to do dangerous things in Perl. -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/userprefs.cgi b/mozilla/webtools/bugzilla/userprefs.cgi index 3e4e7dc040d..53dc4803363 100755 --- a/mozilla/webtools/bugzilla/userprefs.cgi +++ b/mozilla/webtools/bugzilla/userprefs.cgi @@ -20,7 +20,6 @@ # Christopher Aillon # Gervase Markham -use diagnostics; use strict; use lib qw(.); diff --git a/mozilla/webtools/bugzilla/votes.cgi b/mozilla/webtools/bugzilla/votes.cgi index dbc0f960729..3bfe1168268 100755 --- a/mozilla/webtools/bugzilla/votes.cgi +++ b/mozilla/webtools/bugzilla/votes.cgi @@ -23,7 +23,6 @@ # Christopher Aillon # Gervase Markham -use diagnostics; use strict; use lib "."; diff --git a/mozilla/webtools/bugzilla/whineatnews.pl b/mozilla/webtools/bugzilla/whineatnews.pl index b364836a595..2a3bdf1b926 100755 --- a/mozilla/webtools/bugzilla/whineatnews.pl +++ b/mozilla/webtools/bugzilla/whineatnews.pl @@ -26,7 +26,6 @@ # assigned to them that has status NEW that has not been touched for # more than 7 days. -use diagnostics; use strict; require "globals.pl"; diff --git a/mozilla/webtools/bugzilla/xml.cgi b/mozilla/webtools/bugzilla/xml.cgi index 8a0bbf1e451..219a39c749e 100755 --- a/mozilla/webtools/bugzilla/xml.cgi +++ b/mozilla/webtools/bugzilla/xml.cgi @@ -22,7 +22,6 @@ # Terry Weissman # Gervase Markham -use diagnostics; use strict; use lib qw(.);