summaryrefslogtreecommitdiffstats
path: root/describekeywords.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'describekeywords.cgi')
-rwxr-xr-xdescribekeywords.cgi14
1 files changed, 2 insertions, 12 deletions
diff --git a/describekeywords.cgi b/describekeywords.cgi
index e06350d2e..12c57ea7f 100755
--- a/describekeywords.cgi
+++ b/describekeywords.cgi
@@ -27,25 +27,15 @@ use lib ".";
use Bugzilla;
use Bugzilla::Error;
use Bugzilla::User;
+use Bugzilla::Keyword;
Bugzilla->login();
my $cgi = Bugzilla->cgi;
-my $dbh = Bugzilla->dbh;
my $template = Bugzilla->template;
my $vars = {};
-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", {'Slice' => {}});
-
-$vars->{'keywords'} = $keywords;
+$vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
$vars->{'caneditkeywords'} = UserInGroup("editkeywords");
print Bugzilla->cgi->header();