diff options
-rw-r--r-- | CGI.pl | 140 | ||||
-rw-r--r-- | bug_form.pl | 20 | ||||
-rwxr-xr-x | buglist.cgi | 28 | ||||
-rwxr-xr-x | checksetup.pl | 64 | ||||
-rw-r--r-- | defparams.pl | 78 | ||||
-rwxr-xr-x | editcomponents.cgi | 26 | ||||
-rwxr-xr-x | editgroups.cgi | 30 | ||||
-rwxr-xr-x | editmilestones.cgi | 4 | ||||
-rwxr-xr-x | editparams.cgi | 8 | ||||
-rwxr-xr-x | editproducts.cgi | 8 | ||||
-rwxr-xr-x | editusers.cgi | 198 | ||||
-rwxr-xr-x | editversions.cgi | 4 | ||||
-rwxr-xr-x | enter_bug.cgi | 16 | ||||
-rw-r--r-- | globals.pl | 26 | ||||
-rwxr-xr-x | long_list.cgi | 2 | ||||
-rwxr-xr-x | new_comment.cgi | 10 | ||||
-rwxr-xr-x | process_bug.cgi | 14 | ||||
-rwxr-xr-x | processmail | 24 | ||||
-rwxr-xr-x | query.cgi | 80 | ||||
-rwxr-xr-x | queryhelp.cgi | 110 | ||||
-rwxr-xr-x | reports.cgi | 6 |
21 files changed, 448 insertions, 448 deletions
@@ -99,33 +99,33 @@ sub ParseUrlString { my %isnull; my $remaining = $buffer; while ($remaining ne "") { - my $item; - if ($remaining =~ /^([^&]*)&(.*)$/) { - $item = $1; - $remaining = $2; - } else { - $item = $remaining; - $remaining = ""; - } - - my $name; - my $value; - if ($item =~ /^([^=]*)=(.*)$/) { - $name = $1; - $value = url_decode($2); - } else { - $name = $item; - $value = ""; - } - if ($value ne "") { - if (defined $f->{$name}) { - $f->{$name} .= $value; - my $ref = $m->{$name}; - push @$ref, $value; - } else { - $f->{$name} = $value; - $m->{$name} = [$value]; - } + my $item; + if ($remaining =~ /^([^&]*)&(.*)$/) { + $item = $1; + $remaining = $2; + } else { + $item = $remaining; + $remaining = ""; + } + + my $name; + my $value; + if ($item =~ /^([^=]*)=(.*)$/) { + $name = $1; + $value = url_decode($2); + } else { + $name = $item; + $value = ""; + } + if ($value ne "") { + if (defined $f->{$name}) { + $f->{$name} .= $value; + my $ref = $m->{$name}; + push @$ref, $value; + } else { + $f->{$name} = $value; + $m->{$name} = [$value]; + } } else { $isnull{$name} = 1; } @@ -306,7 +306,7 @@ sub ValidateBugID { # Finish validation and return if the user is in a role that has access to the bug. if ($userid) { return - if ($reporter_accessible && $reporter == $userid) + if ($reporter_accessible && $reporter == $userid) || ($assignee_accessible && $assignee == $userid) || ($qacontact_accessible && $qacontact == $userid); } @@ -391,22 +391,22 @@ sub value_quote { sub navigation_header { if (defined $::COOKIE{"BUGLIST"} && $::COOKIE{"BUGLIST"} ne "" && defined $::FORM{'id'}) { - my @bugs = split(/:/, $::COOKIE{"BUGLIST"}); - my $cur = lsearch(\@bugs, $::FORM{"id"}); - print "<B>Bug List:</B> (@{[$cur + 1]} of @{[$#bugs + 1]})\n"; - print "<A HREF=\"show_bug.cgi?id=$bugs[0]\">First</A>\n"; - print "<A HREF=\"show_bug.cgi?id=$bugs[$#bugs]\">Last</A>\n"; - if ($cur > 0) { - print "<A HREF=\"show_bug.cgi?id=$bugs[$cur - 1]\">Prev</A>\n"; - } else { - print "<I><FONT COLOR=\#777777>Prev</FONT></I>\n"; - } - if ($cur < $#bugs) { - $::next_bug = $bugs[$cur + 1]; - print "<A HREF=\"show_bug.cgi?id=$::next_bug\">Next</A>\n"; - } else { - print "<I><FONT COLOR=\#777777>Next</FONT></I>\n"; - } + my @bugs = split(/:/, $::COOKIE{"BUGLIST"}); + my $cur = lsearch(\@bugs, $::FORM{"id"}); + print "<B>Bug List:</B> (@{[$cur + 1]} of @{[$#bugs + 1]})\n"; + print "<A HREF=\"show_bug.cgi?id=$bugs[0]\">First</A>\n"; + print "<A HREF=\"show_bug.cgi?id=$bugs[$#bugs]\">Last</A>\n"; + if ($cur > 0) { + print "<A HREF=\"show_bug.cgi?id=$bugs[$cur - 1]\">Prev</A>\n"; + } else { + print "<I><FONT COLOR=\#777777>Prev</FONT></I>\n"; + } + if ($cur < $#bugs) { + $::next_bug = $bugs[$cur + 1]; + print "<A HREF=\"show_bug.cgi?id=$::next_bug\">Next</A>\n"; + } else { + print "<I><FONT COLOR=\#777777>Next</FONT></I>\n"; + } print qq{ <A HREF="buglist.cgi?regetlastlist=1">Show list</A>\n}; } print " <A HREF=query.cgi>Query page</A>\n"; @@ -483,7 +483,7 @@ sub make_checkboxes { } } if (!$found && $default ne "") { - $popup .= "<INPUT NAME=$name TYPE=CHECKBOX CHECKED>$default"; + $popup .= "<INPUT NAME=$name TYPE=CHECKBOX CHECKED>$default"; } return $popup; } @@ -635,7 +635,7 @@ sub make_options { exit 0; } else { - $popup .= "<OPTION SELECTED>$default\n"; + $popup .= "<OPTION SELECTED>$default\n"; } } return $popup; @@ -686,7 +686,7 @@ sub BuildPulldown { sub PasswordForLogin { my ($login) = (@_); SendSQL("select cryptpassword from profiles where login_name = " . - SqlQuote($login)); + SqlQuote($login)); my $result = FetchOneColumn(); if (!defined $result) { $result = ""; @@ -701,7 +701,7 @@ sub quietly_check_login() { $::disabledreason = ''; $::userid = 0; if (defined $::COOKIE{"Bugzilla_login"} && - defined $::COOKIE{"Bugzilla_logincookie"}) { + defined $::COOKIE{"Bugzilla_logincookie"}) { ConnectToDatabase(); if (!defined $ENV{'REMOTE_HOST'}) { $ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'}; @@ -709,14 +709,14 @@ sub quietly_check_login() { SendSQL("SELECT profiles.userid, profiles.groupset, " . "profiles.login_name, " . "profiles.login_name = " . - SqlQuote($::COOKIE{"Bugzilla_login"}) . - " AND profiles.cryptpassword = logincookies.cryptpassword " . - "AND logincookies.hostname = " . - SqlQuote($ENV{"REMOTE_HOST"}) . + SqlQuote($::COOKIE{"Bugzilla_login"}) . + " AND profiles.cryptpassword = logincookies.cryptpassword " . + "AND logincookies.hostname = " . + SqlQuote($ENV{"REMOTE_HOST"}) . ", profiles.disabledtext " . - " FROM profiles, logincookies WHERE logincookies.cookie = " . - SqlQuote($::COOKIE{"Bugzilla_logincookie"}) . - " AND profiles.userid = logincookies.userid"); + " FROM profiles, logincookies WHERE logincookies.cookie = " . + SqlQuote($::COOKIE{"Bugzilla_logincookie"}) . + " AND profiles.userid = logincookies.userid"); my @row; if (@row = FetchSQLData()) { my ($userid, $groupset, $loginname, $ok, $disabledtext) = (@row); @@ -1017,10 +1017,10 @@ Content-type: text/html 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 - # including the last slash (or backslash on Windows). - $0 =~ m:[^/\\]*$:; - $nexturl = $&; + # Sets nexturl to be argv0, stripping everything up to and + # including the last slash (or backslash on Windows). + $0 =~ m:[^/\\]*$:; + $nexturl = $&; } my $method = "POST"; # We always want to use POST here, because we're submitting a password and don't @@ -1120,13 +1120,13 @@ sub PutHeader { my ($title, $h1, $h2, $extra, $jscript) = (@_); if (!defined $h1) { - $h1 = $title; + $h1 = $title; } if (!defined $h2) { - $h2 = ""; + $h2 = ""; } if (!defined $extra) { - $extra = ""; + $extra = ""; } $jscript ||= ""; # If we are shutdown, we want a very basic page to give that @@ -1347,7 +1347,7 @@ Actions: } } if ($loggedin) { - #a little mandatory SQL, used later on + #a little mandatory SQL, used later on SendSQL("SELECT mybugslink, userid, blessgroupset FROM profiles " . "WHERE login_name = " . SqlQuote($::COOKIE{'Bugzilla_login'})); my ($mybugslink, $userid, $blessgroupset) = (FetchSQLData()); @@ -1385,7 +1385,7 @@ Edit <a href="userprefs.cgi">prefs</a> </TD></TR> }; - #begin preset queries + #begin preset queries my $mybugstemplate = Param("mybugstemplate"); my %substs; $substs{'userid'} = url_quote($::COOKIE{"Bugzilla_login"}); @@ -1458,12 +1458,12 @@ if (defined $ENV{"REQUEST_METHOD"}) { if (defined $ENV{"HTTP_COOKIE"}) { foreach my $pair (split(/;/, $ENV{"HTTP_COOKIE"})) { - $pair = trim($pair); - if ($pair =~ /^([^=]*)=(.*)$/) { - $::COOKIE{$1} = $2; - } else { - $::COOKIE{$pair} = ""; - } + $pair = trim($pair); + if ($pair =~ /^([^=]*)=(.*)$/) { + $::COOKIE{$1} = $2; + } else { + $::COOKIE{$pair} = ""; + } } } diff --git a/bug_form.pl b/bug_form.pl index af6618db5..5938f3aea 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -65,13 +65,13 @@ select reporter, bug_file_loc, short_desc, - target_milestone, - qa_contact, - status_whiteboard, + target_milestone, + qa_contact, + status_whiteboard, date_format(creation_ts,'%Y-%m-%d %H:%i'), groupset, - delta_ts, - sum(votes.count) + delta_ts, + sum(votes.count) from bugs left join votes using(bug_id) where bugs.bug_id = $id group by bugs.bug_id"; @@ -126,7 +126,7 @@ my $sev_popup = make_options(\@::legal_severity, $bug{'bug_severity'}); my $component_popup = make_options($::components{$bug{'product'}}, - $bug{'component'}); + $bug{'component'}); my $ccSet = new RelationSet; $ccSet->mergeFromDB("select who from cc where bug_id=$id"); @@ -359,13 +359,13 @@ print " if ($::usergroupset ne '0') { SendSQL("select bit, name, description, (bit & $bug{'groupset'} != 0) " . - "from groups where bit & $::usergroupset != 0 " . - "and isbuggroup != 0 " . + "from groups where bit & $::usergroupset != 0 " . + "and isbuggroup != 0 " . # Include active groups as well as inactive groups to which # the bug already belongs. This way the bug can be removed # from an inactive group but can only be added to active ones. "and (isactive = 1 or (bit & $bug{'groupset'} != 0)) " . - "order by description"); + "order by description"); # We only print out a header bit for this section if there are any # results. my $groupFound = 0; @@ -459,7 +459,7 @@ if ($status eq $::unconfirmedstate) { $canconfirm = UserInGroup("canconfirm") || ($::userid == 0); if ($canedit || $canconfirm) { print "<INPUT TYPE=radio NAME=knob VALUE=confirm>"; - print "Confirm bug (change status to <b>NEW</b>)<br>"; + print "Confirm bug (change status to <b>NEW</b>)<br>"; $knum++; } } diff --git a/buglist.cgi b/buglist.cgi index 048d4582a..04a9e8892 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -479,23 +479,23 @@ sub GenerateSQL { } }, - "^dependson," => sub { + "^dependson," => sub { my $table = "dependson_" . $chartid; - push(@supptables, "dependencies $table"); - $ff = "$table.$f"; - $ref = $funcsbykey{",$t"}; - &$ref; + push(@supptables, "dependencies $table"); + $ff = "$table.$f"; + $ref = $funcsbykey{",$t"}; + &$ref; push(@wherepart, "$table.blocked = bugs.bug_id"); - }, + }, - "^blocked," => sub { + "^blocked," => sub { my $table = "blocked_" . $chartid; - push(@supptables, "dependencies $table"); - $ff = "$table.$f"; - $ref = $funcsbykey{",$t"}; - &$ref; + push(@supptables, "dependencies $table"); + $ff = "$table.$f"; + $ref = $funcsbykey{",$t"}; + &$ref; push(@wherepart, "$table.dependson = bugs.bug_id"); - }, + }, ",equals" => sub { @@ -831,7 +831,7 @@ CMD: for ($::FORM{'cmdtype'}) { last CMD; }; /^editnamed$/ && do { - my $url = "query.cgi?" . LookupNamedQuery($::FORM{"namedcmd"}); + my $url = "query.cgi?" . LookupNamedQuery($::FORM{"namedcmd"}); print qq{Content-type: text/html Refresh: 0; URL=$url @@ -971,7 +971,7 @@ DefCol("summary", "substring(bugs.short_desc, 1, 60)", "Summary", "bugs.short_de DefCol("summaryfull", "bugs.short_desc", "Summary", "bugs.short_desc", 1); DefCol("status_whiteboard", "bugs.status_whiteboard", "StatusSummary", "bugs.status_whiteboard", 1); DefCol("component", "substring(bugs.component, 1, 8)", "Comp", - "bugs.component"); + "bugs.component"); DefCol("product", "substring(bugs.product, 1, 8)", "Product", "bugs.product"); DefCol("version", "substring(bugs.version, 1, 5)", "Vers", "bugs.version"); DefCol("os", "substring(bugs.op_sys, 1, 4)", "OS", "bugs.op_sys"); diff --git a/checksetup.pl b/checksetup.pl index a90ff0009..424a23ca0 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -399,7 +399,7 @@ LocalVar('opsys', ' "Windows 95", "Windows 98", "Windows ME", # Millenium Edition (upgrade of 98) - "Windows 2000", + "Windows 2000", "Windows NT", "Mac System 7", "Mac System 7.5", @@ -488,7 +488,7 @@ my @my_opsys = @{*{$main::{'opsys'}}{ARRAY}}; unless (-d 'data') { print "Creating data directory ...\n"; - # permissions for non-webservergroup are fixed later on + # permissions for non-webservergroup are fixed later on mkdir 'data', 0770; mkdir 'data/mimedump-tmp', 01777; open FILE, '>>data/comments'; close FILE; @@ -502,7 +502,7 @@ unless (-d 'data') { # a Bugzilla with the old data format, and so upgrade their data files. unless (-d 'graphs') { print "Creating graphs directory...\n"; - # permissions for non-webservergroup are fixed later on + # permissions for non-webservergroup are fixed later on mkdir 'graphs', 0770; # Upgrade data format foreach my $in_file (glob("data/mining/*")) @@ -712,10 +712,10 @@ sub fixPerms { if (!(-d $file)) { # check if the file is executable. if (isExecutableFile($file)) { - #printf ("Changing $file to %o",$exeperm); + #printf ("Changing $file to %o",$exeperm); chmod $exeperm, $file; } else { - #print ("Changing $file to %o", $normperm); + #print ("Changing $file to %o", $normperm); chmod $normperm, $file; } } @@ -2306,29 +2306,29 @@ if ( CountIndexes('keywords') != 3 ) { $sth = $dbh->prepare("SELECT count(*) from duplicates"); $sth->execute(); if (!($sth->fetchrow_arrayref()->[0])) { - # populate table - print("Populating duplicates table...\n"); - - $sth = $dbh->prepare("SELECT longdescs.bug_id, thetext FROM longdescs left JOIN bugs using(bug_id) WHERE (thetext " . - "regexp '[.*.]{3,3} This bug has been marked as a duplicate of [[:digit:]]{1,5} [.*.]{3,3}') AND (resolution = 'DUPLICATE') ORDER" . - " BY longdescs.bug_when"); - $sth->execute(); - - my %dupes; - my $key; - - # Because of the way hashes work, this loop removes all but the last dupe - # resolution found for a given bug. - while (my ($dupe, $dupe_of) = $sth->fetchrow_array()) { - $dupes{$dupe} = $dupe_of; - } - - foreach $key (keys(%dupes)) - { - $dupes{$key} =~ s/.*\*\*\* This bug has been marked as a duplicate of (\d{1,5}) \*\*\*.*?/$1/sm; - $dbh->do("INSERT INTO duplicates VALUES('$dupes{$key}', '$key')"); - # BugItsADupeOf Dupe - } + # populate table + print("Populating duplicates table...\n"); + + $sth = $dbh->prepare("SELECT longdescs.bug_id, thetext FROM longdescs left JOIN bugs using(bug_id) WHERE (thetext " . + "regexp '[.*.]{3,3} This bug has been marked as a duplicate of [[:digit:]]{1,5} [.*.]{3,3}') AND (resolution = 'DUPLICATE') ORDER" . + " BY longdescs.bug_when"); + $sth->execute(); + + my %dupes; + my $key; + + # Because of the way hashes work, this loop removes all but the last dupe + # resolution found for a given bug. + while (my ($dupe, $dupe_of) = $sth->fetchrow_array()) { + $dupes{$dupe} = $dupe_of; + } + + foreach $key (keys(%dupes)) + { + $dupes{$key} =~ s/.*\*\*\* This bug has been marked as a duplicate of (\d{1,5}) \*\*\*.*?/$1/sm; + $dbh->do("INSERT INTO duplicates VALUES('$dupes{$key}', '$key')"); + # BugItsADupeOf Dupe + } } # 2000-12-18. Added an 'emailflags' field for storing preferences about @@ -2401,19 +2401,19 @@ installation has many users. ENDTEXT # Re-crypt everyone's password. - my $sth = $dbh->prepare("SELECT userid, password FROM profiles"); - $sth->execute(); + my $sth = $dbh->prepare("SELECT userid, password FROM profiles"); + $sth->execute(); my $i = 1; print "Fixing password #1... "; - while (my ($userid, $password) = $sth->fetchrow_array()) { + while (my ($userid, $password) = $sth->fetchrow_array()) { my $cryptpassword = $dbh->quote(Crypt($password)); $dbh->do("UPDATE profiles SET cryptpassword = $cryptpassword WHERE userid = $userid"); ++$i; # Let the user know where we are at every 500 records. print "$i... " if !($i%500); - } + } print "$i... Done.\n"; # Drop the plaintext password field and resize the cryptpassword field. diff --git a/defparams.pl b/defparams.pl index 51ea4550a..23da70dd9 100644 --- a/defparams.pl +++ b/defparams.pl @@ -47,12 +47,12 @@ sub defparams_pl_sillyness { sub WriteParams { foreach my $i (@::param_list) { - if (!defined $::param{$i}) { - $::param{$i} = $::param_default{$i}; + if (!defined $::param{$i}) { + $::param{$i} = $::param_default{$i}; if (!defined $::param{$i}) { die "No default parameter ever specified for $i"; } - } + } } mkdir("data", 0777); chmod 0777, "data"; @@ -77,7 +77,7 @@ sub DefParam { $::param_type{$id} = $type; $::param_default{$id} = $default; if (defined $checker) { - $::param_checker{$id} = $checker; + $::param_checker{$id} = $checker; } } @@ -85,7 +85,7 @@ sub DefParam { sub check_numeric { my ($value) = (@_); if ($value !~ /^[0-9]+$/) { - return "must be a numeric value"; + return "must be a numeric value"; } return ""; } @@ -122,20 +122,20 @@ sub check_shadowdb { # b -- A boolean value (either 1 or 0) DefParam("maintainer", - "The email address of the person who maintains this installation of Bugzilla.", - "t", + "The email address of the person who maintains this installation of Bugzilla.", + "t", 'THE MAINTAINER HAS NOT YET BEEN SET'); DefParam("urlbase", - "The URL that is the common initial leading part of all Bugzilla URLs.", - "t", - "http://cvs-mirror.mozilla.org/webtools/bugzilla/", - \&check_urlbase); + "The URL that is the common initial leading part of all Bugzilla URLs.", + "t", + "http://cvs-mirror.mozilla.org/webtools/bugzilla/", + \&check_urlbase); sub check_urlbase { my ($url) = (@_); if ($url !~ m:^http.*/$:) { - return "must be a legal URL, that starts with http and ends with a slash."; + return "must be a legal URL, that starts with http and ends with a slash."; } return ""; } @@ -146,20 +146,20 @@ DefParam("cookiepath", "/"); DefParam("preferlists", - "If this is on, Bugzilla will display most selection options as selection lists. If this is off, Bugzilla will use radio buttons and checkboxes instead.", - "b", - 1); + "If this is on, Bugzilla will display most selection options as selection lists. If this is off, Bugzilla will use radio buttons and checkboxes instead.", + "b", + 1); DefParam("capitalizelists", - "If this is on, Bugzilla will capitalize list entries, checkboxes, and radio buttons. If this is off, Bugzilla will leave these items untouched.", - "b", - 0); + "If this is on, Bugzilla will capitalize list entries, checkboxes, and radio buttons. If this is off, Bugzilla will leave these items untouched.", + "b", + 0); DefParam("usequip", - "If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips.", - "b", - 1); + "If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips.", + "b", + 1); # Added parameter - JMR, 2/16/00 DefParam("usebuggroups", @@ -200,7 +200,7 @@ DefParam("despotbaseurl", sub check_despotbaseurl { my ($url) = (@_); if ($url !~ /^http.*cgi$/) { - return "must be a legal URL, that starts with http and ends with .cgi"; + return "must be a legal URL, that starts with http and ends with .cgi"; } return ""; } @@ -456,9 +456,9 @@ You will get this message once a day until you've dealt with these bugs! DefParam("defaultquery", - "This is the default query that initially comes up when you submit a bug. It's in URL parameter format, which makes it hard to read. Sorry!", - "t", - "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=%22Importance%22"); + "This is the default query that initially comes up when you submit a bug. It's in URL parameter format, which makes it hard to read. Sorry!", + "t", + "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=%22Importance%22"); DefParam("letsubmitterchoosepriority", @@ -485,9 +485,9 @@ DefParam("defaultpriority", DefParam("usetargetmilestone", - "Do you wish to use the Target Milestone field?", - "b", - 0); + "Do you wish to use the Target Milestone field?", + "b", + 0); DefParam("nummilestones", "If using Target Milestone, how many milestones do you wish to @@ -508,20 +508,20 @@ DefParam("musthavemilestoneonaccept", 0); DefParam("useqacontact", - "Do you wish to use the QA Contact field?", - "b", - 0); + "Do you wish to use the QA Contact field?", + "b", + 0); DefParam("usestatuswhiteboard", - "Do you wish to use the Status Whiteboard field?", - "b", - 0); + "Do you wish to use the Status Whiteboard field?", + "b", + 0); DefParam("usebrowserinfo", - "Do you want bug reports to be assigned an OS & Platform based on the browser - the user makes the report from?", - "b", - 1); + "Do you want bug reports to be assigned an OS & Platform based on the browser + the user makes the report from?", + "b", + 1); DefParam("usedependencies", "Do you wish to use dependencies (allowing you to mark which bugs depend on which other ones)?", @@ -642,7 +642,7 @@ DefParam("supportwatchers", DefParam("move-enabled", "If this is on, Bugzilla will allow certain people to move bugs to the defined database.", "b", - 0); + 0); DefParam("move-button-text", "The text written on the Move button. Explain where the bug is being moved to.", "t", diff --git a/editcomponents.cgi b/editcomponents.cgi index f48612d75..2950e288f 100755 --- a/editcomponents.cgi +++ b/editcomponents.cgi @@ -394,10 +394,10 @@ if ($action eq 'new') { } my $initialowner = trim($::FORM{initialowner} || ''); - # - # Now validating to make sure it's too an existing account - # - DBNameToIdAndCheck($initialowner); + # + # Now validating to make sure it's too an existing account + # + DBNameToIdAndCheck($initialowner); if ($initialowner eq '') { print "You must enter an initial owner for the component '$component'. Please press\n"; @@ -431,10 +431,10 @@ if ($action eq 'new') { PutTrailer($localtrailer); exit; } - # - # Now validating to make sure it's too an existing account - # - DBNameToIdAndCheck($initialqacontact); + # + # Now validating to make sure it's too an existing account + # + DBNameToIdAndCheck($initialqacontact); } # Add the new component @@ -732,7 +732,7 @@ if ($action eq 'update') { unless ($description) { print "Sorry, I can't delete the description."; PutTrailer($localtrailer); - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); exit; } SendSQL("UPDATE components @@ -746,7 +746,7 @@ if ($action eq 'update') { if ($initialowner ne $initialownerold) { unless ($initialowner) { print "Sorry, I can't delete the initial owner."; - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); PutTrailer($localtrailer); exit; } @@ -769,7 +769,7 @@ if ($action eq 'update') { if (Param('useqacontact') && $initialqacontact ne $initialqacontactold) { unless ($initialqacontact) { print "Sorry, I can't delete the initial QA contact."; - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); PutTrailer($localtrailer); exit; } @@ -794,13 +794,13 @@ if ($action eq 'update') { unless ($component) { print "Sorry, I can't delete the product name."; PutTrailer($localtrailer); - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); exit; } if (TestComponent($product,$component)) { print "Sorry, component name '$component' is already in use."; PutTrailer($localtrailer); - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); exit; } diff --git a/editgroups.cgi b/editgroups.cgi index 1626fc3a4..10e4a5a9e 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -50,8 +50,8 @@ sub TestGroup ($) # does the group exist? SendSQL("SELECT name - FROM groups - WHERE name=" . SqlQuote($group)); + FROM groups + WHERE name=" . SqlQuote($group)); return FetchOneColumn(); } @@ -76,17 +76,17 @@ sub PutTrailer (@) my $num = 0; print "<P>\n"; foreach (@links) { - print $_; - if ($num == $count) { - print ".\n"; - } - elsif ($num == $count-1) { - print " or "; - } - else { - print ", "; - } - $num++; + print $_; + if ($num == $count) { + print ".\n"; + } + elsif ($num == $count-1) { + print " or "; + } + else { + print ", "; + } + $num++; } PutFooter(); } @@ -276,7 +276,7 @@ if ($action eq 'new') { ShowError("The group '" . $name . "' already exists.<BR>" . "Please click the <b>Back</b> button and try again."); PutFooter(); - exit; + exit; } if ($isactive != 0 && $isactive != 1) { @@ -284,7 +284,7 @@ if ($action eq 'new') { "a problem with Bugzilla or a bug in your browser.<br>" . "Please click the <b>Back</b> button and try again."); PutFooter(); - exit; + exit; } # Major hack for bit values... perl can't handle 64-bit ints, so I can't diff --git a/editmilestones.cgi b/editmilestones.cgi index 4ceda927a..0bd1dac14 100755 --- a/editmilestones.cgi +++ b/editmilestones.cgi @@ -520,13 +520,13 @@ if ($action eq 'update') { unless ($milestone) { print "Sorry, I can't delete the milestone text."; PutTrailer($localtrailer); - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); exit; } if (TestMilestone($product,$milestone)) { print "Sorry, milestone '$milestone' is already in use."; PutTrailer($localtrailer); - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); exit; } SendSQL("UPDATE bugs diff --git a/editparams.cgi b/editparams.cgi index e416184f6..26f0b8576 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -61,16 +61,16 @@ foreach my $i (@::param_list) { print "<tr><td valign=top><input type=checkbox name=reset-$i>Reset</td><td>\n"; my $value = Param($i); SWITCH: for ($::param_type{$i}) { - /^t$/ && do { + /^t$/ && do { print "<input size=80 name=$i value=\"" . value_quote($value) . "\">\n"; last SWITCH; - }; - /^l$/ && do { + }; + /^l$/ && do { print "<textarea wrap=hard name=$i rows=10 cols=80>" . value_quote($value) . "</textarea>\n"; last SWITCH; - }; + }; /^b$/ && do { my $on; my $off; diff --git a/editproducts.cgi b/editproducts.cgi index f7d479f1d..f602c351e 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -1009,10 +1009,10 @@ if ($action eq 'update') { SendSQL("UPDATE products SET product=$qp WHERE product=$qpold"); SendSQL("UPDATE versions SET program=$qp WHERE program=$qpold"); SendSQL("UPDATE milestones SET product=$qp WHERE product=$qpold"); - # Need to do an update to groups as well. If there is a corresponding - # bug group, whether usebuggroups is currently set or not, we want to - # update it so it will match in the future. If there is no group, this - # update statement will do nothing, so no harm done. -JMR, 3/8/00 + # Need to do an update to groups as well. If there is a corresponding + # bug group, whether usebuggroups is currently set or not, we want to + # update it so it will match in the future. If there is no group, this + # update statement will do nothing, so no harm done. -JMR, 3/8/00 SendSQL("UPDATE groups " . "SET name=$qp, " . "description=".SqlQuote($product." Bugs Access")." ". diff --git a/editusers.cgi b/editusers.cgi index e03402ad3..b72be6e51 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -56,8 +56,8 @@ sub TestUser ($) # does the product exist? SendSQL("SELECT login_name - FROM profiles - WHERE login_name=" . SqlQuote($user)); + FROM profiles + WHERE login_name=" . SqlQuote($user)); return FetchOneColumn(); } @@ -67,15 +67,15 @@ sub CheckUser ($) # do we have a product? unless ($user) { - print "Sorry, you haven't specified a user."; + print "Sorry, you haven't specified a user."; PutTrailer(); - exit; + exit; } unless (TestUser $user) { - print "Sorry, user '$user' does not exist."; + print "Sorry, user '$user' does not exist."; PutTrailer(); - exit; + exit; } } @@ -209,17 +209,17 @@ sub PutTrailer (@) my $num = 0; print "<P>\n"; foreach (@links) { - print $_; - if ($num == $count) { - print ".\n"; - } - elsif ($num == $count-1) { - print " or "; - } - else { - print ", "; - } - $num++; + print $_; + if ($num == $count) { + print ".\n"; + } + elsif ($num == $count-1) { + print " or "; + } + else { + print ", "; + } + $num++; } PutFooter(); } @@ -303,11 +303,11 @@ if ($action eq 'list') { } elsif ($::FORM{'matchtype'} eq 'regexp') { $query .= "regexp"; $matchstr = '.' - unless $matchstr; + unless $matchstr; } elsif ($::FORM{'matchtype'} eq 'notregexp') { $query .= "not regexp"; $matchstr = '.' - unless $matchstr; + unless $matchstr; } else { die "Unknown match type"; } @@ -335,21 +335,21 @@ if ($action eq 'list') { if ($count % 100 == 0) { print "</table>$header"; } - my ($user, $realname, $disabledtext) = FetchSQLData(); + my ($user, $realname, $disabledtext) = FetchSQLData(); my $s = ""; my $e = ""; if ($disabledtext) { $s = "<STRIKE>"; $e = "</STRIKE>"; } - $realname ||= "<FONT COLOR=\"red\">missing</FONT>"; - print "<TR>\n"; - print " <TD VALIGN=\"top\"><A HREF=\"editusers.cgi?action=edit&user=", url_quote($user), "\"><B>$s$user$e</B></A></TD>\n"; - print " <TD VALIGN=\"top\">$s$realname$e</TD>\n"; + $realname ||= "<FONT COLOR=\"red\">missing</FONT>"; + print "<TR>\n"; + print " <TD VALIGN=\"top\"><A HREF=\"editusers.cgi?action=edit&user=", url_quote($user), "\"><B>$s$user$e</B></A></TD>\n"; + print " <TD VALIGN=\"top\">$s$realname$e</TD>\n"; if ($candelete) { print " <TD VALIGN=\"top\"><A HREF=\"editusers.cgi?action=del&user=", url_quote($user), "\">Delete</A></TD>\n"; } - print "</TR>"; + print "</TR>"; } if ($editall && !Param('useLDAP')) { print "<TR>\n"; @@ -452,10 +452,10 @@ if ($action eq 'new') { exit; } if (TestUser($user)) { - print "The user '$user' does already exist. Please press\n"; - print "<b>Back</b> and try again.\n"; + print "The user '$user' does already exist. Please press\n"; + print "<b>Back</b> and try again.\n"; PutTrailer($localtrailer); - exit; + exit; } my $passworderror = ValidatePassword($password); if ( $passworderror ) { @@ -509,7 +509,7 @@ if ($action eq 'new') { print "To change ${user}'s permissions, go back and <a href=\"editusers.cgi?action=edit&user=" . url_quote($user)."\">edit this user</A>"; print "<p>\n"; PutTrailer($localtrailer, - "<a href=\"editusers.cgi?action=add\">add</a> another user."); + "<a href=\"editusers.cgi?action=add\">add</a> another user."); exit; } @@ -537,7 +537,7 @@ if ($action eq 'del') { # display some data about the user SendSQL("SELECT realname, groupset FROM profiles - WHERE login_name=" . SqlQuote($user)); + WHERE login_name=" . SqlQuote($user)); my ($realname, $groupset) = FetchSQLData(); $realname ||= "<FONT COLOR=\"red\">missing</FONT>"; @@ -559,12 +559,12 @@ if ($action eq 'del') { print " <TD VALIGN=\"top\">Group set:</TD>\n"; print " <TD VALIGN=\"top\">"; SendSQL("SELECT name - FROM groups + FROM groups WHERE bit & $groupset = bit - ORDER BY isbuggroup, name"); + ORDER BY isbuggroup, name"); my $found = 0; while ( MoreSQLData() ) { - my ($name) = FetchSQLData(); + my ($name) = FetchSQLData(); print "<br>\n" if $found; print ucfirst $name; $found = 1; @@ -577,23 +577,23 @@ if ($action eq 'del') { my $nodelete = ''; SendSQL("SELECT program, value - FROM components + FROM components WHERE initialowner=" . DBname_to_id($user)); $found = 0; while (MoreSQLData()) { - if ($found) { - print "<BR>\n"; - } else { - print "<TR>\n"; - print " <TD VALIGN=\"top\">Initial owner:</TD>\n"; - print " <TD VALIGN=\"top\">"; - } - my ($product, $component) = FetchSQLData(); - print "<a href=\"editcomponents.cgi?product=", url_quote($product), - "&component=", url_quote($component), - "&action=edit\">$product: $component</a>"; - $found = 1; - $nodelete = 'initial bug owner'; + if ($found) { + print "<BR>\n"; + } else { + print "<TR>\n"; + print " <TD VALIGN=\"top\">Initial owner:</TD>\n"; + print " <TD VALIGN=\"top\">"; + } + my ($product, $component) = FetchSQLData(); + print "<a href=\"editcomponents.cgi?product=", url_quote($product), + "&component=", url_quote($component), + "&action=edit\">$product: $component</a>"; + $found = 1; + $nodelete = 'initial bug owner'; } print "</TD>\n</TR>" if $found; @@ -601,23 +601,23 @@ if ($action eq 'del') { # Check if the user is an initialqacontact SendSQL("SELECT program, value - FROM components + FROM components WHERE initialqacontact=" . DBname_to_id($user)); $found = 0; while (MoreSQLData()) { - if ($found) { - print "<BR>\n"; - } else { - print "<TR>\n"; - print " <TD VALIGN=\"top\">Initial QA contact:</TD>\n"; - print " <TD VALIGN=\"top\">"; - } - my ($product, $component) = FetchSQLData(); - print "<a href=\"editcomponents.cgi?product=", url_quote($product), - "&component=", url_quote($component), - "&action=edit\">$product: $component</a>"; - $found = 1; - $nodelete = 'initial QA contact'; + if ($found) { + print "<BR>\n"; + } else { + print "<TR>\n"; + print " <TD VALIGN=\"top\">Initial QA contact:</TD>\n"; + print " <TD VALIGN=\"top\">"; + } + my ($product, $component) = FetchSQLData(); + print "<a href=\"editcomponents.cgi?product=", url_quote($product), + "&component=", url_quote($component), + "&action=edit\">$product: $component</a>"; + $found = 1; + $nodelete = 'initial QA contact'; } print "</TD>\n</TR>" if $found; @@ -625,10 +625,10 @@ if ($action eq 'del') { if ($nodelete) { - print "<P>You can't delete this user because '$user' is an $nodelete ", - "for at least one product."; - PutTrailer($localtrailer); - exit; + print "<P>You can't delete this user because '$user' is an $nodelete ", + "for at least one product."; + PutTrailer($localtrailer); + exit; } @@ -665,14 +665,14 @@ if ($action eq 'delete') { CheckUser($user); SendSQL("SELECT userid - FROM profiles - WHERE login_name=" . SqlQuote($user)); + FROM profiles + WHERE login_name=" . SqlQuote($user)); my $userid = FetchOneColumn(); SendSQL("DELETE FROM profiles - WHERE login_name=" . SqlQuote($user)); + WHERE login_name=" . SqlQuote($user)); SendSQL("DELETE FROM logincookies - WHERE userid=" . $userid); + WHERE userid=" . $userid); print "User deleted.<BR>\n"; PutTrailer($localtrailer); @@ -693,8 +693,8 @@ if ($action eq 'edit') { # get data of user SendSQL("SELECT realname, groupset, blessgroupset, disabledtext - FROM profiles - WHERE login_name=" . SqlQuote($user)); + FROM profiles + WHERE login_name=" . SqlQuote($user)); my ($realname, $groupset, $blessgroupset, $disabledtext) = FetchSQLData(); @@ -740,15 +740,15 @@ if ($action eq 'update') { my $groupset = "0"; foreach (keys %::FORM) { - next unless /^bit_/; - #print "$_=$::FORM{$_}<br>\n"; - $groupset .= " + $::FORM{$_}"; + next unless /^bit_/; + #print "$_=$::FORM{$_}<br>\n"; + $groupset .= " + $::FORM{$_}"; } my $blessgroupset = "0"; foreach (keys %::FORM) { - next unless /^blbit_/; - #print "$_=$::FORM{$_}<br>\n"; - $blessgroupset .= " + $::FORM{$_}"; + next unless /^blbit_/; + #print "$_=$::FORM{$_}<br>\n"; + $blessgroupset .= " + $::FORM{$_}"; } CheckUser($userold); @@ -785,15 +785,15 @@ if ($action eq 'update') { "($u, $::userid, now(), $fieldid, " . " $groupsetold, $groupset)"); } - print "Updated permissions.\n"; + print "Updated permissions.\n"; } } if ($editall && $blessgroupset ne $blessgroupsetold) { SendSQL("UPDATE profiles - SET blessgroupset=" . $blessgroupset . " - WHERE login_name=" . SqlQuote($userold)); - print "Updated ability to tweak permissions of other users.\n"; + SET blessgroupset=" . $blessgroupset . " + WHERE login_name=" . SqlQuote($userold)); + print "Updated ability to tweak permissions of other users.\n"; } # Update the database with the user's new password if they changed it. @@ -812,39 +812,39 @@ if ($action eq 'update') { } if ($editall && $realname ne $realnameold) { SendSQL("UPDATE profiles - SET realname=" . SqlQuote($realname) . " - WHERE login_name=" . SqlQuote($userold)); - print "Updated real name.<BR>\n"; + SET realname=" . SqlQuote($realname) . " + WHERE login_name=" . SqlQuote($userold)); + print "Updated real name.<BR>\n"; } if ($editall && $disabledtext ne $disabledtextold) { SendSQL("UPDATE profiles - SET disabledtext=" . SqlQuote($disabledtext) . " - WHERE login_name=" . SqlQuote($userold)); + SET disabledtext=" . SqlQuote($disabledtext) . " + WHERE login_name=" . SqlQuote($userold)); SendSQL("SELECT userid - FROM profiles - WHERE login_name=" . SqlQuote($user)); + FROM profiles + WHERE login_name=" . SqlQuote($user)); my $userid = FetchOneColumn(); SendSQL("DELETE FROM logincookies - WHERE userid=" . $userid); - print "Updated disabled text.<BR>\n"; + WHERE userid=" . $userid); + print "Updated disabled text.<BR>\n"; } if ($editall && $user ne $userold) { - unless ($user) { - print "Sorry, I can't delete the user's name."; + unless ($user) { + print "Sorry, I can't delete the user's name."; PutTrailer($localtrailer); - exit; + exit; } - if (TestUser($user)) { - print "Sorry, user name '$user' is already in use."; + if (TestUser($user)) { + print "Sorry, user name '$user' is already in use."; PutTrailer($localtrailer); - exit; + exit; } SendSQL("UPDATE profiles - SET login_name=" . SqlQuote($user) . " - WHERE login_name=" . SqlQuote($userold)); + SET login_name=" . SqlQuote($user) . " + WHERE login_name=" . SqlQuote($userold)); - print "Updated user's name.<BR>\n"; + print "Updated user's name.<BR>\n"; } PutTrailer($localtrailer); diff --git a/editversions.cgi b/editversions.cgi index 0ca0b932c..8c5e71c43 100755 --- a/editversions.cgi +++ b/editversions.cgi @@ -519,13 +519,13 @@ if ($action eq 'update') { unless ($version) { print "Sorry, I can't delete the version text."; PutTrailer($localtrailer); - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); exit; } if (TestVersion($product,$version)) { print "Sorry, version '$version' is already in use."; PutTrailer($localtrailer); - SendSQL("UNLOCK TABLES"); + SendSQL("UNLOCK TABLES"); exit; } SendSQL("UPDATE bugs diff --git a/enter_bug.cgi b/enter_bug.cgi index 63218059b..b5fcafd9a 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -141,7 +141,7 @@ sub pickplatform { /Mozilla.*\(Windows/ && do {return "PC";}; /Mozilla.*\(Macintosh/ && do {return "Macintosh";}; /Mozilla.*\(Win/ && do {return "PC";}; - /Mozilla.*Windows NT/ && do {return "PC";}; + /Mozilla.*Windows NT/ && do {return "PC";}; /Mozilla.*Linux.*86/ && do {return "PC";}; /Mozilla.*BSD.*86/ && do {return "PC";}; /Mozilla.*Linux.*alpha/ && do {return "DEC";}; @@ -240,13 +240,13 @@ my $platform_popup = make_popup('rep_platform', \@::legal_platform, my $opsys_popup = make_popup('op_sys', \@::legal_opsys, pickos(), 0); if (0 == @{$::components{$product}}) { - print "<H1>Permission Denied</H1>\n"; - print "Sorry. You need to have at least one component for this product\n"; - print "in order to create a new bug. Go to the \"Components\" link to create\n"; - print "a new component\n"; - print "<P>\n"; - PutFooter(); - exit; + print "<H1>Permission Denied</H1>\n"; + print "Sorry. You need to have at least one component for this product\n"; + print "in order to create a new bug. Go to the \"Components\" link to create\n"; + print "a new component\n"; + print "<P>\n"; + PutFooter(); + exit; } elsif (1 == @{$::components{$product}}) { # Only one component; just pick it. $::FORM{'component'} = $::components{$product}->[0]; diff --git a/globals.pl b/globals.pl index eedfa12e3..b2ab3167a 100644 --- a/globals.pl +++ b/globals.pl @@ -102,8 +102,8 @@ sub ConnectToDatabase { $name = Param("shadowdb"); $::dbwritesallowed = 0; } - $::db = DBI->connect("DBI:mysql:host=$::db_host;database=$name", $::db_user, $::db_pass) - || die "Bugzilla is currently broken. Please try again later. " . + $::db = DBI->connect("DBI:mysql:host=$::db_host;database=$name", $::db_user, $::db_pass) + || die "Bugzilla is currently broken. Please try again later. " . "If the problem persists, please contact " . Param("maintainer") . ". The error you should quote is: " . $DBI::errstr; } @@ -212,11 +212,11 @@ sub SendSQL { SqlLog($str); $::currentquery = $::db->prepare($str); if (!$::currentquery->execute) { - my $errstr = $::db->errstr; - # Cut down the error string to a reasonable.size - $errstr = substr($errstr, 0, 100) . ' ... ' . substr($errstr, -100) - if length($errstr) > 200; - die "$str: " . $errstr; + my $errstr = $::db->errstr; + # Cut down the error string to a reasonable.size + $errstr = substr($errstr, 0, 100) . ' ... ' . substr($errstr, -100) + if length($errstr) > 200; + die "$str: " . $errstr; } SqlLog("Done"); if (!$dontshadow && $iswrite && Param("shadowdb")) { @@ -240,10 +240,10 @@ sub MoreSQLData { return 0; } if (defined @::fetchahead) { - return 1; + return 1; } if (@::fetchahead = $::currentquery->fetchrow_array) { - return 1; + return 1; } return 0; } @@ -254,9 +254,9 @@ sub FetchSQLData { return; } if (defined @::fetchahead) { - my @result = @::fetchahead; - undef @::fetchahead; - return @result; + my @result = @::fetchahead; + undef @::fetchahead; + return @result; } return $::currentquery->fetchrow_array; } @@ -1091,7 +1091,7 @@ sub SplitEnumType { while ($guts =~ /^\'([^\']*)\',(.*)$/) { push @result, $1; $guts = $2; - } + } } return @result; } diff --git a/long_list.cgi b/long_list.cgi index 36e191c77..494103823 100755 --- a/long_list.cgi +++ b/long_list.cgi @@ -109,7 +109,7 @@ foreach my $bug (split(/:/, $::FORM{'buglist'})) { print "<TD COLSPAN=2><B>Target Milestone:</B> $target_milestone\n"; } print "<TR><TD COLSPAN=6><B>URL:</B> "; - print "<A HREF=\"" . $url . "\">" . html_quote($url) . "</A>\n"; + print "<A HREF=\"" . $url . "\">" . html_quote($url) . "</A>\n"; print "<TR><TD COLSPAN=6><B>Summary:</B> " . html_quote($shortdesc) . "\n"; if (@::legal_keywords) { print "<TR><TD><B>Keywords: </B>$keywords</TD></TR>\n"; diff --git a/new_comment.cgi b/new_comment.cgi index ad014514d..7f428ef80 100755 --- a/new_comment.cgi +++ b/new_comment.cgi @@ -43,14 +43,14 @@ if ( (!defined $c) || ($c eq '') ) { print "Content-type: text/html\n\n"; print "<TITLE>Nothing on your mind?</TITLE>"; print "<H1>Does your mind draw a blank?</H1>"; - print "<H2> Hit back, and try again...</H2>"; + print "<H2> Hit back, and try again...</H2>"; exit 0; } if ($c =~ m/</) { - print "Content-type: text/html\n\n"; - print "<CENTER><H1>For security reasons, support for tags"; - print " has been turned off in quips.\n</H1>\n"; - print "<H2> Hit back, and try again...</H2></CENTER>\n"; + print "Content-type: text/html\n\n"; + print "<CENTER><H1>For security reasons, support for tags"; + print " has been turned off in quips.\n</H1>\n"; + print "<H2> Hit back, and try again...</H2></CENTER>\n"; exit 0; } diff --git a/process_bug.cgi b/process_bug.cgi index 4e7ffd33c..0882db0ae 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -794,12 +794,12 @@ SWITCH: for ($::FORM{'knob'}) { last SWITCH; }; /^reopen$/ && CheckonComment( "reopen" ) && do { - SendSQL("SELECT resolution FROM bugs WHERE bug_id = $::FORM{'id'}"); + SendSQL("SELECT resolution FROM bugs WHERE bug_id = $::FORM{'id'}"); ChangeStatus('REOPENED'); ChangeResolution(''); - if (FetchOneColumn() eq 'DUPLICATE') { - SendSQL("DELETE FROM duplicates WHERE dupe = $::FORM{'id'}"); - } + if (FetchOneColumn() eq 'DUPLICATE') { + SendSQL("DELETE FROM duplicates WHERE dupe = $::FORM{'id'}"); + } last SWITCH; }; /^verify$/ && CheckonComment( "verify" ) && do { @@ -1099,7 +1099,7 @@ The changes made were: } } - if ($me eq 'dependson') { + if ($me eq 'dependson') { my @deps = @{$deps{'dependson'}}; my @blocks = @{$deps{'blocked'}}; my @union = (); @@ -1109,10 +1109,10 @@ The changes made were: foreach my $b (@deps, @blocks) { $union{$b}++ && $isect{$b}++ } @union = keys %union; @isect = keys %isect; - if (@isect > 0) { + if (@isect > 0) { my $both; foreach my $i (@isect) { - $both = $both . "#" . $i . " "; + $both = $both . "#" . $i . " "; } PuntTryAgain("Dependency loop detected!<P>" . "This bug can't be both blocked and dependent " . diff --git a/processmail b/processmail index ebeb95bf7..22dc85cc3 100755 --- a/processmail +++ b/processmail @@ -478,18 +478,18 @@ sub filterEmailGroup ($$$) { # relationship to the bug of the person they are watching (if the person they # are watching is an owner, their mail is filtered as if they were the owner). if (Param("supportwatchers")) { - my @watchers; - foreach my $person(@emailList) { - my $personId = DBname_to_id($person); - SendSQL("SELECT watcher FROM watch WHERE watched = $personId"); - while(MoreSQLData()) { - my ($watcher) = FetchSQLData(); - if ($watcher) { - push (@watchers, DBID_to_name($watcher)); - } - } - } - push(@emailList, @watchers); + my @watchers; + foreach my $person(@emailList) { + my $personId = DBname_to_id($person); + SendSQL("SELECT watcher FROM watch WHERE watched = $personId"); + while(MoreSQLData()) { + my ($watcher) = FetchSQLData(); + if ($watcher) { + push (@watchers, DBID_to_name($watcher)); + } + } + } + push(@emailList, @watchers); } @@ -873,37 +873,37 @@ while (MoreSQLData()) { } my @types = ( - ["noop", "---"], - ["equals", "equal to"], - ["notequals", "not equal to"], - ["casesubstring", "contains (case-sensitive) substring"], - ["substring", "contains (case-insensitive) substring"], - ["notsubstring", "does not contain (case-insensitive) substring"], - ["allwordssubstr", "all words as (case-insensitive) substrings"], - ["anywordssubstr", "any words as (case-insensitive) substrings"], - ["regexp", "contains regexp"], - ["notregexp", "does not contain regexp"], - ["lessthan", "less than"], - ["greaterthan", "greater than"], - ["anywords", "any words"], - ["allwords", "all words"], - ["nowords", "none of the words"], - ["changedbefore", "changed before"], - ["changedafter", "changed after"], - ["changedfrom", "changed from"], - ["changedto", "changed to"], - ["changedby", "changed by"], - ); + ["noop", "---"], + ["equals", "equal to"], + ["notequals", "not equal to"], + ["casesubstring", "contains (case-sensitive) substring"], + ["substring", "contains (case-insensitive) substring"], + ["notsubstring", "does not contain (case-insensitive) substring"], + ["allwordssubstr", "all words as (case-insensitive) substrings"], + ["anywordssubstr", "any words as (case-insensitive) substrings"], + ["regexp", "contains regexp"], + ["notregexp", "does not contain regexp"], + ["lessthan", "less than"], + ["greaterthan", "greater than"], + ["anywords", "any words"], + ["allwords", "all words"], + ["nowords", "none of the words"], + ["changedbefore", "changed before"], + ["changedafter", "changed after"], + ["changedfrom", "changed from"], + ["changedto", "changed to"], + ["changedby", "changed by"], + ); print qq{<A NAME="chart"> </A>\n}; foreach my $cmd (grep(/^cmd-/, keys(%::FORM))) { if ($cmd =~ /^cmd-add(\d+)-(\d+)-(\d+)$/) { - $::FORM{"field$1-$2-$3"} = "xyzzy"; + $::FORM{"field$1-$2-$3"} = "xyzzy"; } } - + # foreach my $i (sort(keys(%::FORM))) { # print "$i : " . value_quote($::FORM{$i}) . "<BR>\n"; # } @@ -920,23 +920,23 @@ for ($chart=0 ; exists $::FORM{"field$chart-0-0"} ; $chart++) { my @rows; my $row; for ($row = 0 ; exists $::FORM{"field$chart-$row-0"} ; $row++) { - my @cols; - my $col; - for ($col = 0 ; exists $::FORM{"field$chart-$row-$col"} ; $col++) { - my $key = "$chart-$row-$col"; - my $deffield = $::FORM{"field$key"} || ""; - my $deftype = $::FORM{"type$key"} || ""; - my $defvalue = value_quote($::FORM{"value$key"} || ""); - my $line = ""; - $line .= "<TD>"; - $line .= BuildPulldown("field$key", \@fields, $deffield); - $line .= BuildPulldown("type$key", \@types, $deftype); - $line .= qq{<INPUT NAME="value$key" VALUE="$defvalue">}; - $line .= "</TD>\n"; - push(@cols, $line); - } - push(@rows, "<TR>" . join(qq{<TD ALIGN="center"> or </TD>\n}, @cols) . - qq{<TD><INPUT TYPE="submit" VALUE="Or" NAME="cmd-add$chart-$row-$col" $jsmagic></TD></TR>}); + my @cols; + my $col; + for ($col = 0 ; exists $::FORM{"field$chart-$row-$col"} ; $col++) { + my $key = "$chart-$row-$col"; + my $deffield = $::FORM{"field$key"} || ""; + my $deftype = $::FORM{"type$key"} || ""; + my $defvalue = value_quote($::FORM{"value$key"} || ""); + my $line = ""; + $line .= "<TD>"; + $line .= BuildPulldown("field$key", \@fields, $deffield); + $line .= BuildPulldown("type$key", \@types, $deftype); + $line .= qq{<INPUT NAME="value$key" VALUE="$defvalue">}; + $line .= "</TD>\n"; + push(@cols, $line); + } + push(@rows, "<TR>" . join(qq{<TD ALIGN="center"> or </TD>\n}, @cols) . + qq{<TD><INPUT TYPE="submit" VALUE="Or" NAME="cmd-add$chart-$row-$col" $jsmagic></TD></TR>}); } print qq{ <HR> diff --git a/queryhelp.cgi b/queryhelp.cgi index b4638ca14..5d312b2db 100755 --- a/queryhelp.cgi +++ b/queryhelp.cgi @@ -19,8 +19,8 @@ # Rights Reserved. # # Contributor(s): Brian Bober <boberb@rpi.edu> -# Terry Weissman <terry@mozilla.org> -# Tara Hernandez <tara@tequilarista.org> +# Terry Weissman <terry@mozilla.org> +# Tara Hernandez <tara@tequilarista.org> use vars %::FORM; @@ -585,40 +585,40 @@ $line_count = 0; $max_table_size = 50; my @products; -$tableheader = qq{ <p><table border=0><tr><td> - <table border="1" width="100%" cellpadding="4" cellspacing="0"> - <tr bgcolor="#6666FF"> - <th align="left">Product</th> - <th align="left">Description</th></tr> }; +$tableheader = qq{ <p><table border=0><tr><td> + <table border="1" width="100%" cellpadding="4" cellspacing="0"> + <tr bgcolor="#6666FF"> + <th align="left">Product</th> + <th align="left">Description</th></tr> }; print qq{ - $tableheader + $tableheader }; SendSQL("SELECT product,description FROM products ORDER BY product"); - while (MoreSQLData()) { + while (MoreSQLData()) { - my ($product, $productdesc) = FetchSQLData(); - push (@products, $product); + my ($product, $productdesc) = FetchSQLData(); + push (@products, $product); - $line_count++; - if ($line_count > $max_table_size) { - print qq{ - </table> - $tableheader - }; - $line_count=1; - } + $line_count++; + if ($line_count > $max_table_size) { + print qq{ + </table> + $tableheader + }; + $line_count=1; + } - print qq{ <tr><th>$product</th><td>$productdesc</td></tr> }; + print qq{ <tr><th>$product</th><td>$productdesc</td></tr> }; } -print qq{ +print qq{ </table></td></tr></table> }; @@ -642,41 +642,41 @@ entered instead (milestones explained below). $line_count = 0; $tableheader = qq{ - <p> - <table border="1" width="100%" cellpadding="4" cellspacing="0"> - <tr bgcolor="#6666FF"> - <th align="left">Component</th> - <th align="left">Product</th> - <th align="left">Description</th></tr> + <p> + <table border="1" width="100%" cellpadding="4" cellspacing="0"> + <tr bgcolor="#6666FF"> + <th align="left">Component</th> + <th align="left">Product</th> + <th align="left">Description</th></tr> }; -print qq{ +print qq{ <p><a name="component"></a> <h4>Component</h4> <p>Each product has components, against which bugs can be filed. Components are parts of the product, and are assigned to a module owner. The following lists components and their associated products: - $tableheader + $tableheader }; foreach $product (@products) { - SendSQL("SELECT value,description FROM components WHERE program=" . SqlQuote($product) . " ORDER BY value"); + SendSQL("SELECT value,description FROM components WHERE program=" . SqlQuote($product) . " ORDER BY value"); - while (MoreSQLData()) { + while (MoreSQLData()) { - my ($component, $compdesc) = FetchSQLData(); + my ($component, $compdesc) = FetchSQLData(); - $line_count++; - if ($line_count > $max_table_size) { - print qq{ - </table> - $tableheader - }; - $line_count=0; - } - print qq{<tr><th>$component</th><td>$product</td><td>$compdesc</td></tr>}; - } + $line_count++; + if ($line_count > $max_table_size) { + print qq{ + </table> + $tableheader + }; + $line_count=0; + } + print qq{<tr><th>$component</th><td>$product</td><td>$compdesc</td></tr>}; + } } @@ -884,9 +884,9 @@ queries, but it's not the easiest thing to learn (or explain). <OPTION VALUE="changedto">changed to <OPTION VALUE="changedby">changed by </SELECT><INPUT NAME="value0-0-0" VALUE=""><INPUT TYPE="button" VALUE="Or" ><INPUT TYPE="button" VALUE="And" - NAME="cmd-add0-1-0"></td></tr> + NAME="cmd-add0-1-0"></td></tr> - <tr><td> </td><td align="center"> + <tr><td> </td><td align="center"> <INPUT TYPE="button" VALUE="Add another boolean chart" NAME="cmd-add1-0-0"> @@ -1012,9 +1012,9 @@ Field 3: What the search term is<br> <OPTION VALUE="changedto">changed to <OPTION VALUE="changedby">changed by </SELECT><INPUT NAME="value0-0-1" VALUE=""><INPUT TYPE="button" VALUE="Or" NAME="cmd-add0-0-2" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"><INPUT TYPE="button" VALUE="And" - NAME="cmd-add0-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr> + NAME="cmd-add0-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr> - <tr><td> </td><td align="center"> + <tr><td> </td><td align="center"> <INPUT TYPE="button" VALUE="Add another boolean chart" NAME="cmd-add1-0-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"> @@ -1142,9 +1142,9 @@ the query will be anything that matches either of the terms. <OPTION VALUE="changedto">changed to <OPTION VALUE="changedby">changed by </SELECT><INPUT NAME="value0-1-0" VALUE=""><INPUT TYPE="button" VALUE="Or" NAME="cmd-add0-1-1" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"><INPUT TYPE="button" VALUE="And" - NAME="cmd-add0-2-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr> + NAME="cmd-add0-2-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr> - <tr><td> </td><td align="center"> + <tr><td> </td><td align="center"> <INPUT TYPE="button" VALUE="Add another boolean chart" NAME="cmd-add1-0-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"> @@ -1225,12 +1225,12 @@ can think of the lines of "Or" as having parenthesis around them. <OPTION VALUE="changedto">changed to <OPTION VALUE="changedby">changed by </SELECT><INPUT NAME="value0-0-0" VALUE=""><INPUT TYPE="button" VALUE="Or" NAME="cmd-add0-0-1" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"><INPUT TYPE="button" VALUE="And" - NAME="cmd-add0-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr> + NAME="cmd-add0-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr> - <tr> - <td colspan="2"><hr></td> - </tr><tr><td> </td><td> - <SELECT NAME="field1-0-0"><OPTION SELECTED VALUE="noop">--- + <tr> + <td colspan="2"><hr></td> + </tr><tr><td> </td><td> + <SELECT NAME="field1-0-0"><OPTION SELECTED VALUE="noop">--- <OPTION VALUE="groupset">groupset <OPTION VALUE="bug_id">Bug # <OPTION VALUE="short_desc">Summary @@ -1279,9 +1279,9 @@ can think of the lines of "Or" as having parenthesis around them. <OPTION VALUE="changedto">changed to <OPTION VALUE="changedby">changed by </SELECT><INPUT NAME="value1-0-0" VALUE=""><INPUT TYPE="button" VALUE="Or" NAME="cmd-add1-0-1" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"><INPUT TYPE="button" VALUE="And" - NAME="cmd-add1-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr> + NAME="cmd-add1-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr> - <tr><td> </td><td align="center"> + <tr><td> </td><td align="center"> <INPUT TYPE="button" VALUE="Add another boolean chart" NAME="cmd-add2-0-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"> diff --git a/reports.cgi b/reports.cgi index c76a411f7..b7d9f3f55 100755 --- a/reports.cgi +++ b/reports.cgi @@ -485,9 +485,9 @@ sub daily_stats_filename { } sub show_chart { - # if we don't have the graphic mouldes don't even try to go - # here. Should probably return some decent error message. - return unless $use_gd; + # if we don't have the graphic mouldes don't even try to go + # here. Should probably return some decent error message. + return unless $use_gd; if (! $FORM{datasets}) { die_politely("You didn't select any datasets to plot"); |