summaryrefslogtreecommitdiffstats
path: root/describekeywords.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-10-27 01:15:48 +0200
committerlpsolit%gmail.com <>2005-10-27 01:15:48 +0200
commitf4915acec3dc0f746d068ba5c8019ed58df8bdfe (patch)
tree8914f41d7e2040beb5c962d2b9cfcff6bf7fdb55 /describekeywords.cgi
parentba7c33a6c05815453f8ca694f8aec3a6907720c9 (diff)
downloadbugzilla-f4915acec3dc0f746d068ba5c8019ed58df8bdfe.tar.gz
bugzilla-f4915acec3dc0f746d068ba5c8019ed58df8bdfe.tar.xz
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 'describekeywords.cgi')
-rwxr-xr-xdescribekeywords.cgi28
1 files changed, 10 insertions, 18 deletions
diff --git a/describekeywords.cgi b/describekeywords.cgi
index 19140199f..2b21e712c 100755
--- a/describekeywords.cgi
+++ b/describekeywords.cgi
@@ -36,25 +36,17 @@ my $dbh = Bugzilla->dbh;
my $template = Bugzilla->template;
my $vars = {};
-SendSQL("SELECT keyworddefs.name, keyworddefs.description,
- COUNT(keywords.bug_id)
- FROM keyworddefs LEFT JOIN keywords
- ON keyworddefs.id = keywords.keywordid " .
+my $keywords = $dbh->selectall_arrayref(
+ q{SELECT keyworddefs.name, keyworddefs.description,
+ COUNT(keywords.bug_id) AS bugcount
+ FROM keyworddefs
+ LEFT JOIN keywords
+ ON keyworddefs.id = keywords.keywordid } .
$dbh->sql_group_by('keyworddefs.id',
- 'keyworddefs.name, keyworddefs.description') . "
- ORDER BY keyworddefs.name");
-
-my @keywords;
-
-while (MoreSQLData()) {
- my ($name, $description, $bugs) = FetchSQLData();
-
- push (@keywords, { name => $name,
- description => $description,
- bugcount => $bugs });
-}
-
-$vars->{'keywords'} = \@keywords;
+ 'keyworddefs.name, keyworddefs.description') .
+ " ORDER BY keyworddefs.name", {'Slice' => {}});
+
+$vars->{'keywords'} = $keywords;
$vars->{'caneditkeywords'} = UserInGroup("editkeywords");
print Bugzilla->cgi->header();