diff options
author | mkanat%bugzilla.org <> | 2006-07-02 01:45:53 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-07-02 01:45:53 +0200 |
commit | f301c9241af577f8f3df94338f1329d91c82d252 (patch) | |
tree | aff46880248e76011b2a3d6afa793be7117e9154 /editkeywords.cgi | |
parent | 0fd94fa00dc3429814a97c106f2ff0a0550e6ac0 (diff) | |
download | bugzilla-f301c9241af577f8f3df94338f1329d91c82d252.tar.gz bugzilla-f301c9241af577f8f3df94338f1329d91c82d252.tar.xz |
Bug 343248: SQL query to get all keywords with bug count is duplicated in editkeywords.cgi and describekeywords.cgi
Patch By Remi Zara <remi_zara@mac.com> r=mkanat, a=justdave
Diffstat (limited to 'editkeywords.cgi')
-rwxr-xr-x | editkeywords.cgi | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/editkeywords.cgi b/editkeywords.cgi index 9696480bd..7b906c30b 100755 --- a/editkeywords.cgi +++ b/editkeywords.cgi @@ -27,6 +27,7 @@ use Bugzilla; use Bugzilla::Constants; use Bugzilla::Util; use Bugzilla::Error; +use Bugzilla::Keyword; my $cgi = Bugzilla->cgi; my $dbh = Bugzilla->dbh; @@ -79,17 +80,7 @@ $vars->{'action'} = $action; if ($action eq "") { - my @keywords; - - $vars->{'keywords'} = - $dbh->selectall_arrayref('SELECT keyworddefs.id, keyworddefs.name, - keyworddefs.description, - COUNT(keywords.bug_id) AS bug_count - FROM keyworddefs - LEFT JOIN keywords - ON keyworddefs.id = keywords.keywordid ' . - $dbh->sql_group_by('id', 'name, description') . ' - ORDER BY keyworddefs.name', {'Slice' => {}}); + $vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count(); print $cgi->header(); $template->process("admin/keywords/list.html.tmpl", $vars) |