aboutsummaryrefslogtreecommitdiffstats
path: root/showdependencygraph.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-10-26 23:15:48 +0000
committerlpsolit%gmail.com <>2005-10-26 23:15:48 +0000
commitf4915acec3dc0f746d068ba5c8019ed58df8bdfe (patch)
tree8914f41d7e2040beb5c962d2b9cfcff6bf7fdb55 /showdependencygraph.cgi
parentba7c33a6c05815453f8ca694f8aec3a6907720c9 (diff)
downloadbugs-f4915acec3dc0f746d068ba5c8019ed58df8bdfe.tar
bugs-f4915acec3dc0f746d068ba5c8019ed58df8bdfe.tar.gz
bugs-f4915acec3dc0f746d068ba5c8019ed58df8bdfe.tar.bz2
bugs-f4915acec3dc0f746d068ba5c8019ed58df8bdfe.tar.xz
bugs-f4915acec3dc0f746d068ba5c8019ed58df8bdfe.zip
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 <wicked@etlicon.fi> r=LpSolit a=myk
Diffstat (limited to 'showdependencygraph.cgi')
-rwxr-xr-xshowdependencygraph.cgi33
1 files changed, 17 insertions, 16 deletions
diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi
index fee477f3a..4fe63df2a 100755
--- a/showdependencygraph.cgi
+++ b/showdependencygraph.cgi
@@ -36,6 +36,7 @@ require "globals.pl";
Bugzilla->login();
my $cgi = Bugzilla->cgi;
+my $dbh = Bugzilla->dbh;
my $template = Bugzilla->template;
my $vars = {};
@@ -122,10 +123,11 @@ node [URL="${urlbase}show_bug.cgi?id=\\N", style=filled, color=lightgrey]
my %baselist;
if ($cgi->param('doall')) {
- SendSQL("SELECT blocked, dependson FROM dependencies");
+ my $dependencies = $dbh->selectall_arrayref(
+ "SELECT blocked, dependson FROM dependencies");
- while (MoreSQLData()) {
- my ($blocked, $dependson) = FetchSQLData();
+ foreach my $dependency (@$dependencies) {
+ my ($blocked, $dependson) = @$dependency;
AddLink($blocked, $dependson, $fh);
}
} else {
@@ -136,12 +138,14 @@ if ($cgi->param('doall')) {
}
my @stack = keys(%baselist);
+ my $sth = $dbh->prepare(
+ q{SELECT blocked, dependson
+ FROM dependencies
+ WHERE blocked = ? or dependson = ?});
foreach my $id (@stack) {
- SendSQL("SELECT blocked, dependson
- FROM dependencies
- WHERE blocked = $id or dependson = $id");
- while (MoreSQLData()) {
- my ($blocked, $dependson) = FetchSQLData();
+ my $dependencies = $dbh->selectall_arrayref($sth, undef, ($id, $id));
+ foreach my $dependency (@$dependencies) {
+ my ($blocked, $dependson) = @$dependency;
if ($blocked != $id && !exists $seen{$blocked}) {
push @stack, $blocked;
}
@@ -159,16 +163,13 @@ if ($cgi->param('doall')) {
}
}
+my $sth = $dbh->prepare(
+ q{SELECT bug_status, resolution, short_desc
+ FROM bugs
+ WHERE bugs.bug_id = ?});
foreach my $k (keys(%seen)) {
- my $summary = "";
- my $stat;
- my $resolution;
-
# Retrieve bug information from the database
-
- SendSQL("SELECT bug_status, resolution, short_desc FROM bugs " .
- "WHERE bugs.bug_id = $k");
- ($stat, $resolution, $summary) = FetchSQLData();
+ my ($stat, $resolution, $summary) = $dbh->selectrow_array($sth, undef, $k);
$stat ||= 'NEW';
$resolution ||= '';
$summary ||= '';