aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-02-05 17:58:04 +0000
committerlpsolit%gmail.com <>2008-02-05 17:58:04 +0000
commit65a21d774ad764503cdba04c6789727885010214 (patch)
treeb8aa2ee8ca6bb5a04446ae88d03e1416de11a228
parent68a18acf705ba7b62d704e5796d3f5c1a8ea9c72 (diff)
downloadbugs-65a21d774ad764503cdba04c6789727885010214.tar
bugs-65a21d774ad764503cdba04c6789727885010214.tar.gz
bugs-65a21d774ad764503cdba04c6789727885010214.tar.bz2
bugs-65a21d774ad764503cdba04c6789727885010214.tar.xz
bugs-65a21d774ad764503cdba04c6789727885010214.zip
Bug 414604: After inserting/editing/deleting an attachment, the Keywords field is unavailable - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks r=mkanat a=mkanat
-rwxr-xr-xattachment.cgi7
1 files changed, 7 insertions, 0 deletions
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());