aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-01 23:45:53 +0000
committermkanat%bugzilla.org <>2006-07-01 23:45:53 +0000
commitf301c9241af577f8f3df94338f1329d91c82d252 (patch)
treeaff46880248e76011b2a3d6afa793be7117e9154 /editkeywords.cgi
parentBug 343166: $template->process leaks 512K of RAM per call under mod_perl (diff)
downloadbugzilla-f301c9241af577f8f3df94338f1329d91c82d252.tar.gz
bugzilla-f301c9241af577f8f3df94338f1329d91c82d252.tar.bz2
bugzilla-f301c9241af577f8f3df94338f1329d91c82d252.zip
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-xeditkeywords.cgi13
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)