summaryrefslogtreecommitdiffstats
path: root/describekeywords.cgi
diff options
context:
space:
mode:
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();