From 65a21d774ad764503cdba04c6789727885010214 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 5 Feb 2008 17:58:04 +0000 Subject: =?UTF-8?q?Bug=20414604:=20After=20inserting/editing/deleting=20an?= =?UTF-8?q?=20attachment,=20the=20Keywords=20field=20is=20unavailable=20-?= =?UTF-8?q?=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r=3Dghendricks=20r=3Dmkanat=20a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- attachment.cgi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'attachment.cgi') diff --git a/attachment.cgi b/attachment.cgi index bc5b2ac75..5f29649f3 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -49,6 +49,7 @@ use Bugzilla::Field; use Bugzilla::Attachment; use Bugzilla::Attachment::PatchReader; use Bugzilla::Token; +use Bugzilla::Keyword; Bugzilla->login(); @@ -391,6 +392,8 @@ sub insert { $vars->{'bugs'} = [new Bugzilla::Bug($bugid)]; $vars->{'header_done'} = 1; $vars->{'contenttypemethod'} = $cgi->param('contenttypemethod'); + $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)]; + $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count(); print $cgi->header(); # Generate and return the UI (HTML page) from the appropriate template. @@ -595,6 +598,8 @@ sub update { # since the object was created. $vars->{'bugs'} = [new Bugzilla::Bug($bug->id)]; $vars->{'header_done'} = 1; + $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)]; + $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count(); print $cgi->header(); @@ -666,6 +671,8 @@ sub delete_attachment { # Required to display the bug the deleted attachment belongs to. $vars->{'bugs'} = [$bug]; $vars->{'header_done'} = 1; + $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)]; + $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count(); $template->process("attachment/updated.html.tmpl", $vars) || ThrowTemplateError($template->error()); -- cgit v1.2.1