]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 401918: describekeywords.cgi with no keywords simply displays an empty page inste...
authorSunil Joshi <joshi_sunil@in.com>
Tue, 1 Jan 2013 23:22:58 +0000 (00:22 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 1 Jan 2013 23:22:58 +0000 (00:22 +0100)
r/a=LpSolit

describekeywords.cgi
template/en/default/global/user-error.html.tmpl

index ef0634960206d8359f58bc6d391e8eb2762932d1..4976fada1c6f2302011ee9ca8566f2fa7b5b7c1d 100755 (executable)
@@ -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();
index ce80a5eef42ee02c340ec14188c28f4d985e439f..03c26c5aac0437f8decb58cb513a74a506bc1971 100644 (file)
     [% title = "No Initial $terms.Bug Status" %]
     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" %]