#!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Terry Weissman. # Portions created by Terry Weissman are # Copyright (C) 2000 Terry Weissman. All # Rights Reserved. # # Contributor(s): Terry Weissman use diagnostics; use strict; require "CGI.pl"; ConnectToDatabase(); print "Content-type: text/html\n\n"; PutHeader("Bugzilla keyword description"); print qq{ }; SendSQL("SELECT keyworddefs.name, keyworddefs.description, COUNT(keywords.bug_id), keywords.bug_id FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id=keywords.keywordid GROUP BY keyworddefs.id ORDER BY keyworddefs.name"); while (MoreSQLData()) { my ($name, $description, $bugs, $onebug) = FetchSQLData(); if ($bugs && $onebug) { # This 'onebug' stuff is silly hackery for old versions of # MySQL that seem to return a count() of 1 even if there are # no matching. So, we ask for an actual bug number. If it # can't find any bugs that match the keyword, then we set the # count to be zero, ignoring what it had responded. my $q = url_quote($name); $bugs = qq{$bugs}; } else { $bugs = "none"; } print qq{ }; } print "
Name Description Bugs
$name $description $bugs

\n"; quietly_check_login(); if (UserInGroup("editkeywords")) { print "

Edit keywords

\n"; } navigation_header();