Commit 65a21d77 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 414604: After inserting/editing/deleting an attachment, the Keywords field…

Bug 414604: After inserting/editing/deleting an attachment, the Keywords field is unavailable - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=ghendricks r=mkanat a=mkanat
parent 68a18acf
...@@ -49,6 +49,7 @@ use Bugzilla::Field; ...@@ -49,6 +49,7 @@ use Bugzilla::Field;
use Bugzilla::Attachment; use Bugzilla::Attachment;
use Bugzilla::Attachment::PatchReader; use Bugzilla::Attachment::PatchReader;
use Bugzilla::Token; use Bugzilla::Token;
use Bugzilla::Keyword;
Bugzilla->login(); Bugzilla->login();
...@@ -391,6 +392,8 @@ sub insert { ...@@ -391,6 +392,8 @@ sub insert {
$vars->{'bugs'} = [new Bugzilla::Bug($bugid)]; $vars->{'bugs'} = [new Bugzilla::Bug($bugid)];
$vars->{'header_done'} = 1; $vars->{'header_done'} = 1;
$vars->{'contenttypemethod'} = $cgi->param('contenttypemethod'); $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(); print $cgi->header();
# Generate and return the UI (HTML page) from the appropriate template. # Generate and return the UI (HTML page) from the appropriate template.
...@@ -595,6 +598,8 @@ sub update { ...@@ -595,6 +598,8 @@ sub update {
# since the object was created. # since the object was created.
$vars->{'bugs'} = [new Bugzilla::Bug($bug->id)]; $vars->{'bugs'} = [new Bugzilla::Bug($bug->id)];
$vars->{'header_done'} = 1; $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(); print $cgi->header();
...@@ -666,6 +671,8 @@ sub delete_attachment { ...@@ -666,6 +671,8 @@ sub delete_attachment {
# Required to display the bug the deleted attachment belongs to. # Required to display the bug the deleted attachment belongs to.
$vars->{'bugs'} = [$bug]; $vars->{'bugs'} = [$bug];
$vars->{'header_done'} = 1; $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) $template->process("attachment/updated.html.tmpl", $vars)
|| ThrowTemplateError($template->error()); || ThrowTemplateError($template->error());
......
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