From c1ca86053ed276aa05eac8468cea61785629ac5e Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 30 Jun 2008 02:57:54 +0000 Subject: Bug 440612 – Use Bugzilla::Bug->check everywhere instead of ValidateBugID Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit 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.3-24-g4f1b