From 397beebc19dfac0417a64fdbcfb4e6657f6ad9f5 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Fri, 7 Jan 2000 05:16:13 +0000 Subject: Add support for a new "keywords" feature. This lets some central authority maintain a list of keywords, and users can associate any keyword with any bug. The new functionality won't appear until at least one keyword is defined. Note that you *must* run the "checksetup.pl" script after updating this change, in order to create the new required tables "keywords" and "keyworddefs". --- describekeywords.cgi | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 describekeywords.cgi (limited to 'describekeywords.cgi') diff --git a/describekeywords.cgi b/describekeywords.cgi new file mode 100755 index 000000000..4da535c7c --- /dev/null +++ b/describekeywords.cgi @@ -0,0 +1,74 @@ +#!/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) + FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id=keywords.keywordid + GROUP BY keyworddefs.id + ORDER BY keyworddefs.name"); + +while (MoreSQLData()) { + my ($name, $description, $bugs) = FetchSQLData(); + if ($bugs) { + my $q = url_quote($name); + $bugs = qq{$bugs}; + } else { + $bugs = "none"; + } + print qq{ + + + + + +}; +} + +print "
NameDescriptionBugs
$name$description$bugs

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

Edit keywords

\n"; +} + +navigation_header(); -- cgit v1.2.3-65-gdbad