Commit 59460995 authored by Sunil Joshi's avatar Sunil Joshi Committed by Frédéric Buclin

Bug 401918: describekeywords.cgi with no keywords simply displays an empty page…

Bug 401918: describekeywords.cgi with no keywords simply displays an empty page instead of throwing an error r/a=LpSolit
parent 91ad0813
......@@ -24,6 +24,9 @@ my $vars = {};
Bugzilla->switch_to_shadow_db;
$vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
if (!@{$vars->{keywords}}) {
ThrowUserError("no_keywords");
}
$vars->{'caneditkeywords'} = $user->in_group("editkeywords");
print $cgi->header();
......
......@@ -1283,6 +1283,11 @@
No [% terms.bug %] status is available on [% terms.bug %] creation.
Please report the problem to [% Param("maintainer") %].
[% ELSIF error == "no_keywords" %]
[% title = "No Keywords" %]
[% admindocslinks = {'keywords.html' => 'Setting up a keyword'} %]
No keywords have been defined for this installation.
[% ELSIF error == "no_new_quips" %]
[% title = "No New Quips" %]
[% admindocslinks = {'quips.html' => 'Controlling quip usage'} %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment