summaryrefslogtreecommitdiffstats
path: root/Bug.pm
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2002-09-23 02:14:48 +0200
committerbugreport%peshkin.net <>2002-09-23 02:14:48 +0200
commit65d3dc0ec33fd76229dc02536a74ccac5408876b (patch)
treebcacbb27e99c73f9548e92408fadb2e369f0543b /Bug.pm
parentcf9b4ba2e757925eeb18bb63411ae30c8600c643 (diff)
downloadbugzilla-65d3dc0ec33fd76229dc02536a74ccac5408876b.tar.gz
bugzilla-65d3dc0ec33fd76229dc02536a74ccac5408876b.tar.xz
bug 157756 - Groups_20020716_Branch Tracking : > 55 groups now supported
r=bbaetz, gerv
Diffstat (limited to 'Bug.pm')
-rwxr-xr-xBug.pm41
1 files changed, 9 insertions, 32 deletions
diff --git a/Bug.pm b/Bug.pm
index 7e703d14f..3dadd3cd5 100755
--- a/Bug.pm
+++ b/Bug.pm
@@ -37,8 +37,8 @@ use Bugzilla::Util;
for my $key (qw (bug_id alias product version rep_platform op_sys bug_status
resolution priority bug_severity component assigned_to
reporter bug_file_loc short_desc target_milestone
- qa_contact status_whiteboard creation_ts groupset
- delta_ts votes whoid usergroupset comment query error) ){
+ qa_contact status_whiteboard creation_ts
+ delta_ts votes whoid comment query error) ){
$ok_field{$key}++;
}
@@ -105,10 +105,6 @@ sub initBug {
$self->{'whoid'} = $user_id;
- &::SendSQL("SELECT groupset FROM profiles WHERE userid=$self->{'whoid'}");
- my $usergroupset = &::FetchOneColumn();
- if (!$usergroupset) { $usergroupset = '0' }
- $self->{'usergroupset'} = $usergroupset;
my $query = "
select
@@ -116,7 +112,7 @@ sub initBug {
resolution, priority, bug_severity, components.name, assigned_to, reporter,
bug_file_loc, short_desc, 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),
products, components
where bugs.bug_id = $bug_id
@@ -124,10 +120,10 @@ sub initBug {
AND components.id = bugs.component_id
group by bugs.bug_id";
- &::SendSQL(&::SelectVisible($query, $user_id, $usergroupset));
- my @row;
+ &::SendSQL($query);
+ my @row = ();
- if (@row = &::FetchSQLData()) {
+ if ((@row = &::FetchSQLData()) && &::CanSeeBug($bug_id, $self->{'whoid'})) {
my $count = 0;
my %fields;
foreach my $field ("bug_id", "alias", "product", "version", "rep_platform",
@@ -135,24 +131,21 @@ sub initBug {
"bug_severity", "component", "assigned_to", "reporter",
"bug_file_loc", "short_desc", "target_milestone",
"qa_contact", "status_whiteboard", "creation_ts",
- "groupset", "delta_ts", "votes") {
+ "delta_ts", "votes") {
$fields{$field} = shift @row;
if ($fields{$field}) {
$self->{$field} = $fields{$field};
}
$count++;
}
- } else {
- &::SendSQL("select groupset from bugs where bug_id = $bug_id");
- if (@row = &::FetchSQLData()) {
+ } elsif (@row) {
$self->{'bug_id'} = $bug_id;
$self->{'error'} = "NotPermitted";
return $self;
- } else {
+ } else {
$self->{'bug_id'} = $bug_id;
$self->{'error'} = "NotFound";
return $self;
- }
}
$self->{'assigned_to'} = &::DBID_to_name($self->{'assigned_to'});
@@ -356,22 +349,6 @@ sub XML_Footer {
return ("</bugzilla>\n");
}
-sub UserInGroup {
- my $self = shift();
- my ($groupname) = (@_);
- if ($self->{'usergroupset'} eq "0") {
- return 0;
- }
- &::ConnectToDatabase();
- &::SendSQL("select (bit & $self->{'usergroupset'}) != 0 from groups where name = "
- . &::SqlQuote($groupname));
- my $bit = &::FetchOneColumn();
- if ($bit) {
- return 1;
- }
- return 0;
-}
-
sub CanChangeField {
my $self = shift();
my ($f, $oldvalue, $newvalue) = (@_);