diff --git a/mozilla/webtools/bugzilla/CGI.pl b/mozilla/webtools/bugzilla/CGI.pl
index 473923919be..e3ce91a70e5 100644
--- a/mozilla/webtools/bugzilla/CGI.pl
+++ b/mozilla/webtools/bugzilla/CGI.pl
@@ -271,7 +271,7 @@ sub ValidateBugID {
# Users are authorized to access bugs if they are a member of one of
# groups to which the bug is restricted.
- # A user is also authorized to access a bug if she is the reporter,
+ # A user is also authorized to access a bug if she is the reporter,
# assignee, QA contact, or member of the cc: list of the bug and the bug
# allows users in those roles to see the bug. The boolean fields
# reporter_accessible, assignee_accessible, qacontact_accessible, and
@@ -1276,13 +1276,13 @@ sub DumpBugActivity {
sub GetCommandMenu {
my $loggedin = quietly_check_login();
- my $userid = 0;
- if ( $::COOKIE{'Bugzilla_login'} ) {
- $userid = DBname_to_id($::COOKIE{'Bugzilla_login'});
- } else {
- $userid = 0;
- }
- if (!defined $::anyvotesallowed) {
+ my $userid = 0;
+ if ( $::COOKIE{'Bugzilla_login'} ) {
+ $userid = DBname_to_id($::COOKIE{'Bugzilla_login'});
+ } else {
+ $userid = 0;
+ }
+ if (!defined $::anyvotesallowed) {
GetVersionTable();
}
my $html = qq {
diff --git a/mozilla/webtools/bugzilla/attachment.cgi b/mozilla/webtools/bugzilla/attachment.cgi
index d424363f0f3..36339c577b9 100755
--- a/mozilla/webtools/bugzilla/attachment.cgi
+++ b/mozilla/webtools/bugzilla/attachment.cgi
@@ -509,7 +509,7 @@ sub insert
# special syntax of the "open" and "exec" commands to capture the output of
# "processmail", which "system" doesn't allow, without running the command
# through a shell, which backticks (``) do.
- #system ("./processmail", $bugid , $::userid);
+ #system ("./processmail", $bugid , $userid);
#my $mailresults = `./processmail $bugid $::userid`;
my $mailresults = '';
open(PMAIL, "-|") or exec('./processmail', $::FORM{'bugid'}, $::COOKIE{'Bugzilla_login'});
@@ -690,7 +690,7 @@ sub update
my $quotedoldcontenttype = SqlQuote($oldcontenttype);
my $fieldid = GetFieldID('attachments.mimetype');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when, fieldid, removed, added)
- VALUES ($bugid, $::FORM{'id'}, $userid, NOW(), $fieldid, $quotedoldmimetype, $quotedmimetype)");
+ VALUES ($bugid, $::FORM{'id'}, $userid, NOW(), $fieldid, $quotedoldcontenttype, $quotedcontenttype)");
}
if ($oldispatch ne $::FORM{'ispatch'}) {
my $fieldid = GetFieldID('attachments.ispatch');
diff --git a/mozilla/webtools/bugzilla/bug_form.pl b/mozilla/webtools/bugzilla/bug_form.pl
index c899f0d1e86..49b80751a02 100644
--- a/mozilla/webtools/bugzilla/bug_form.pl
+++ b/mozilla/webtools/bugzilla/bug_form.pl
@@ -359,42 +359,42 @@ print "
if ( $userid ne 0 ) {
# Find out which groups we are a member of and form radio buttons
- SendSQL("SELECT groups.group_id, groups.name, groups.description " .
+ SendSQL("SELECT groups.group_id, groups.name, groups.description " .
"FROM user_group_map, groups " .
"WHERE user_group_map.group_id = groups.group_id " .
"AND user_group_map.user_id = $userid " .
- "AND groups.isbuggroup != 0 " .
- "ORDER BY groups.group_id");
+ "AND groups.isbuggroup != 0 " .
+ "ORDER BY groups.group_id");
my %usergroups;
- my %groupnames;
- my $groupFound = 0;
- while ( MoreSQLData() ) {
- my ($group_id, $name, $description) = FetchSQLData();
- $groupnames{$group_id} = $name;
- $usergroups{$group_id} = $description;
- $groupFound = 1;
- }
+ my %groupnames;
+ my $groupFound = 0;
+ while ( MoreSQLData() ) {
+ my ($group_id, $name, $description) = FetchSQLData();
+ $groupnames{$group_id} = $name;
+ $usergroups{$group_id} = $description;
+ $groupFound = 1;
+ }
if ( $groupFound ) {
print "
Only users in the selected groups can view this bug:
\n";
print "(Leave all boxes unchecked to make this a public bug.)
\n";
- # Find out if this bug is private to any of the groups the user belongs to
- my %buggroups;
+ # Find out if this bug is private to any of the groups the user belongs to
+ my %buggroups;
SendSQL("SELECT group_id FROM bug_group_map WHERE bug_id = $id");
while (@row = FetchSQLData()) {
- $buggroups{$row[0]} = 1;
+ $buggroups{$row[0]} = 1;
}
foreach my $group_id ( keys %usergroups ) {
my $checked = $buggroups{$group_id} ? "CHECKED" : "";
- print " ";
+ print " ";
print "\n";
print "$usergroups{$group_id}
\n";
}
}
-
- # If the bug is restricted to a group, display checkboxes that allow
+
+ # If the bug is restricted to a group, display checkboxes that allow
# the user to set whether or not the reporter, assignee, QA contact,
# and cc list can see the bug even if they are not members of all
# groups to which the bug is restricted.
diff --git a/mozilla/webtools/bugzilla/buglist.cgi b/mozilla/webtools/bugzilla/buglist.cgi
index 50b9b0aeb6b..dbb475669f6 100755
--- a/mozilla/webtools/bugzilla/buglist.cgi
+++ b/mozilla/webtools/bugzilla/buglist.cgi
@@ -1028,7 +1028,7 @@ at once.
}
} else {
quietly_check_login();
- $userid = DBname_to_id($::COOKIE{'Bugzilla_login'});
+ $userid = DBname_to_id($::COOKIE{'Bugzilla_login'});
}
diff --git a/mozilla/webtools/bugzilla/checksetup.pl b/mozilla/webtools/bugzilla/checksetup.pl
index 4889e1b7a58..7917db0f37f 100755
--- a/mozilla/webtools/bugzilla/checksetup.pl
+++ b/mozilla/webtools/bugzilla/checksetup.pl
@@ -1015,14 +1015,14 @@ $table{dependencies} =
# http://bugzilla.mozilla.org/show_bug.cgi?id=75482
$table{groups} =
- 'group_id mediumint not null auto_increment primary key,
+ 'group_id mediumint not null auto_increment primary key,
name varchar(255) not null,
description text not null,
isbuggroup tinyint not null,
userregexp tinytext not null,
isactive tinyint not null default 1,
- unique(group_id),
+ unique(group_id),
unique(name)';
@@ -1056,7 +1056,7 @@ $table{profiles} =
disabledtext mediumtext not null,
mybugslink tinyint not null default 1,
emailflags mediumtext,
- admin tinyint not null default 0,
+ admin tinyint not null default 0,
unique(login_name)';
@@ -1168,8 +1168,8 @@ $table{tokens} =
# This table determines the groups that a user belongs to
$table{user_group_map} =
- 'user_id mediumint not null,
- group_id mediumint not null';
+ 'user_id mediumint not null,
+ group_id mediumint not null';
# This table determines which groups have permission to see a bug
$table{bug_group_map} =
@@ -1183,8 +1183,8 @@ $table{product_group_map} =
# This table determines which groups a user can put another user into
$table{bless_group_map} =
- 'user_id mediumint not null,
- group_id mediumint not null';
+ 'user_id mediumint not null,
+ group_id mediumint not null';
###########################################################################
# Create tables
@@ -1255,9 +1255,9 @@ sub AddGroup {
VALUES (?, ?, ?, ?)');
$sth->execute($name, $desc, $userregexp, 0);
- $sth = $dbh->prepare("select last_insert_id()");
- $sth->execute();
- my ($last) = $sth->fetchrow_array();
+ $sth = $dbh->prepare("select last_insert_id()");
+ $sth->execute();
+ my ($last) = $sth->fetchrow_array();
return $last;
}
@@ -1275,16 +1275,16 @@ AddGroup 'editkeywords', 'Can create, destroy, and edit keywords.';
if (!GroupExists("editbugs")) {
my $id = AddGroup('editbugs', 'Can edit all aspects of any bug.', ".*");
- my $sth = $dbh->prepare("SELECT userid FROM profiles ORDER BY userid");
- $sth->execute();
- while ( my ($userid) = $sth->fetchrow_array() ) {
- $dbh->do("INSERT INTO user_group_map VALUES ($userid, $id)");
- }
+ my $sth = $dbh->prepare("SELECT userid FROM profiles ORDER BY userid");
+ $sth->execute();
+ while ( my ($userid) = $sth->fetchrow_array() ) {
+ $dbh->do("INSERT INTO user_group_map VALUES ($userid, $id)");
+ }
}
if (!GroupExists("canconfirm")) {
my $id = AddGroup('canconfirm', 'Can confirm a bug.', ".*");
- my $sth = $dbh->prepare("SELECT userid FROM profiles ORDER BY userid");
+ my $sth = $dbh->prepare("SELECT userid FROM profiles ORDER BY userid");
$sth->execute();
while ( my ($userid) = $sth->fetchrow_array() ) {
$dbh->do("INSERT INTO user_group_map VALUES ($userid, $id)");
@@ -1628,27 +1628,27 @@ _End_Of_SQL_
VALUES ($login, $realname, $cryptedpassword, 1)
_End_Of_SQL_
- # Put the admin in each group if not already
- my $query = "select userid from profiles where login_name = $login";
- $sth = $dbh->prepare($query);
- $sth->execute();
- my ($userid) = $sth->fetchrow_array();
+ # Put the admin in each group if not already
+ my $query = "select userid from profiles where login_name = $login";
+ $sth = $dbh->prepare($query);
+ $sth->execute();
+ my ($userid) = $sth->fetchrow_array();
- foreach my $group ( @groups ) {
- my $query = "select
+ foreach my $group ( @groups ) {
+ my $query = "select
user_id
from
user_group_map
where
group_id = $group
and user_id = $userid";
- $sth = $dbh->prepare($query);
- $sth->execute();
+ $sth = $dbh->prepare($query);
+ $sth->execute();
- if ( !$sth->fetchrow_array() ) {
- $sth = $dbh->do("insert into user_group_map values ($userid, $group)");
- }
- }
+ if ( !$sth->fetchrow_array() ) {
+ $sth = $dbh->do("insert into user_group_map values ($userid, $group)");
+ }
+ }
} else {
$dbh->do(<<_End_Of_SQL_);
@@ -1657,14 +1657,14 @@ _End_Of_SQL_
WHERE login_name=$login
_End_Of_SQL_
- # Put the admin in each group if not already
- my $query = "select userid from profiles where login_name = $login";
- $sth = $dbh->prepare($query);
+ # Put the admin in each group if not already
+ my $query = "select userid from profiles where login_name = $login";
+ $sth = $dbh->prepare($query);
$sth->execute();
my ($userid) = $sth->fetchrow_array();
- foreach my $group ( @groups ) {
- my $query = "select
+ foreach my $group ( @groups ) {
+ my $query = "select
user_id
from
user_group_map
@@ -1678,7 +1678,6 @@ _End_Of_SQL_
$dbh->do("insert into user_group_map values ( $userid, $group)");
}
}
-
}
print "\n$login is now set up as the administrator account.\n";
}
diff --git a/mozilla/webtools/bugzilla/editgroups.cgi b/mozilla/webtools/bugzilla/editgroups.cgi
index e90d268439f..79fdea07dec 100755
--- a/mozilla/webtools/bugzilla/editgroups.cgi
+++ b/mozilla/webtools/bugzilla/editgroups.cgi
@@ -298,8 +298,8 @@ if ($action eq 'new') {
$isactive . ")" );
print "OK, done.
\n"; - SendSQL("SELECT group_id FROM groups where name = " . SqlQuote($name)); - my $id = FetchOneColumn(); + SendSQL("SELECT group_id FROM groups where name = " . SqlQuote($name)); + my $id = FetchOneColumn(); print "Your new group was assigned id # $id.
";
# Add each user designated as an Admin to the new group
@@ -332,7 +332,7 @@ if ($action eq 'del') {
exit;
}
SendSQL("SELECT group_id FROM groups WHERE group_id = " . SqlQuote($id));
- if (!FetchOneColumn()) {
+ if (!FetchOneColumn()) {
ShowError("That group doesn't exist.
" .
"Click the Back button and try again.");
PutFooter();
@@ -359,8 +359,8 @@ if ($action eq 'del') {
print "