From f4915acec3dc0f746d068ba5c8019ed58df8bdfe Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 26 Oct 2005 23:15:48 +0000 Subject: Bug 303693: Eliminate deprecated Bugzilla::DB routines from describe*.cgi, duplicates.cgi, quips.cgi, report.cgi, request.cgi and showdependency*.cgi - Patch by Teemu Mannermaa r=LpSolit a=myk --- describecomponents.cgi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'describecomponents.cgi') diff --git a/describecomponents.cgi b/describecomponents.cgi index 4ce103905..1b1ccbfe0 100755 --- a/describecomponents.cgi +++ b/describecomponents.cgi @@ -35,6 +35,7 @@ my $user = Bugzilla->login(); GetVersionTable(); my $cgi = Bugzilla->cgi; +my $dbh = Bugzilla->dbh; my $template = Bugzilla->template; my $vars = {}; my $product = trim($cgi->param('product') || ''); @@ -87,12 +88,13 @@ if (!$product_id || !$user->can_enter_product($product)) { ###################################################################### my @components; -SendSQL("SELECT name, initialowner, initialqacontact, description FROM " . - "components WHERE product_id = $product_id ORDER BY name"); -while (MoreSQLData()) { - my ($name, $initialowner, $initialqacontact, $description) = - FetchSQLData(); - +my $comps = $dbh->selectall_arrayref( + q{SELECT name, initialowner, initialqacontact, description + FROM components + WHERE product_id = ? + ORDER BY name}, undef, $product_id); +foreach my $comp (@$comps) { + my ($name, $initialowner, $initialqacontact, $description) = @$comp; my %component; $component{'name'} = $name; -- cgit v1.2.3-24-g4f1b