From c1ca86053ed276aa05eac8468cea61785629ac5e Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 30 Jun 2008 02:57:54 +0000 Subject: =?UTF-8?q?Bug=20440612=20=C3=A2=C2=80=C2=93=20Use=20Bugzilla::Bug?= =?UTF-8?q?->check=20everywhere=20instead=20of=20ValidateBugID=20Patch=20B?= =?UTF-8?q?y=20Max=20Kanat-Alexander=20=20r=3DLpSolit?= =?UTF-8?q?,=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- showdependencytree.cgi | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'showdependencytree.cgi') diff --git a/showdependencytree.cgi b/showdependencytree.cgi index 80e67716a..8683c190c 100755 --- a/showdependencytree.cgi +++ b/showdependencytree.cgi @@ -49,9 +49,8 @@ my $dbh = Bugzilla->switch_to_shadow_db(); # Make sure the bug ID is a positive integer representing an existing # bug that the user is authorized to access. -my $id = $cgi->param('id') || ThrowUserError('improper_bug_id_field_value'); -ValidateBugID($id); -my $current_bug = new Bugzilla::Bug($id); +my $bug = Bugzilla::Bug->check(scalar $cgi->param('id')); +my $id = $bug->id; local our $hide_resolved = $cgi->param('hide_resolved') ? 1 : 0; @@ -67,7 +66,7 @@ local our $realdepth = 0; # Generate the tree of bugs that this bug depends on and a list of IDs # appearing in the tree. -my $dependson_tree = { $id => $current_bug }; +my $dependson_tree = { $id => $bug }; my $dependson_ids = {}; GenerateTree($id, "dependson", 1, $dependson_tree, $dependson_ids); $vars->{'dependson_tree'} = $dependson_tree; @@ -75,7 +74,7 @@ $vars->{'dependson_ids'} = [keys(%$dependson_ids)]; # Generate the tree of bugs that this bug blocks and a list of IDs # appearing in the tree. -my $blocked_tree = { $id => $current_bug }; +my $blocked_tree = { $id => $bug }; my $blocked_ids = {}; GenerateTree($id, "blocked", 1, $blocked_tree, $blocked_ids); $vars->{'blocked_tree'} = $blocked_tree; -- cgit v1.2.1