aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-08-12 06:45:07 +0000
committermkanat%bugzilla.org <>2006-08-12 06:45:07 +0000
commitcc69d134483d1e10423475735b1084535dd075b7 (patch)
tree4e440861d3302bdacea97fd64ae477acf12bd6d8 /showdependencytree.cgi
parentBug 310753: editflagtypes.cgi page fails w3 validation - Patch by victory(_RS... (diff)
downloadbugzilla-cc69d134483d1e10423475735b1084535dd075b7.tar.gz
bugzilla-cc69d134483d1e10423475735b1084535dd075b7.tar.bz2
bugzilla-cc69d134483d1e10423475735b1084535dd075b7.zip
Bug 348057: Move the checks for bug visibility out of Bugzilla::Bug->new
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'showdependencytree.cgi')
-rwxr-xr-xshowdependencytree.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/showdependencytree.cgi b/showdependencytree.cgi
index 1886126b5..5efa0bc9c 100755
--- a/showdependencytree.cgi
+++ b/showdependencytree.cgi
@@ -51,7 +51,7 @@ my $dbh = Bugzilla->switch_to_shadow_db();
# bug that the user is authorized to access.
my $id = $cgi->param('id');
ValidateBugID($id);
-my $current_bug = new Bugzilla::Bug($id, $user->id);
+my $current_bug = new Bugzilla::Bug($id);
my $hide_resolved = $cgi->param('hide_resolved') ? 1 : 0;
@@ -120,7 +120,7 @@ sub GenerateTree {
# its sub-tree if we haven't already done so (which happens
# when bugs appear in dependency trees multiple times).
if (!$bugs->{$dep_id}) {
- $bugs->{$dep_id} = new Bugzilla::Bug($dep_id, $user->id);
+ $bugs->{$dep_id} = new Bugzilla::Bug($dep_id);
GenerateTree($dep_id, $relationship, $depth+1, $bugs, $ids);
}
@@ -129,6 +129,7 @@ sub GenerateTree {
# wants the tree to go, and if the dependency isn't resolved
# (if we're ignoring resolved dependencies).
if (!$bugs->{$dep_id}->{'error'}
+ && Bugzilla->user->can_see_bug($dep_id)
&& (!$maxdepth || $depth <= $maxdepth)
&& ($bugs->{$dep_id}->{'isopened'} || !$hide_resolved))
{