diff options
author | mkanat%bugzilla.org <> | 2006-09-10 11:24:21 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-09-10 11:24:21 +0200 |
commit | e0c777f375e063fbe16dbb18a995bf865475ca43 (patch) | |
tree | 0ca0abb2966effa8ca7e91ff8aa834c879f535ec /post_bug.cgi | |
parent | bb61c992c9c2ff6c9d51ac9fcde5165bf6be7e21 (diff) | |
download | bugzilla-e0c777f375e063fbe16dbb18a995bf865475ca43.tar.gz bugzilla-e0c777f375e063fbe16dbb18a995bf865475ca43.tar.xz |
Bug 351345: Move keyword insertion out of post_bug.cgi and into Bugzilla::Bug
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index 52bd763d7..ce029b389 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -130,8 +130,6 @@ $comment = Bugzilla::Bug->_check_comment($cgi->param('comment')); # OK except for the fact that it causes e-mail to be suppressed. $comment = $comment ? $comment : " "; -my @keyword_ids = @{Bugzilla::Bug->_check_keywords($cgi->param('keywords'))}; - my ($depends_on_ids, $blocks_ids) = Bugzilla::Bug->_check_dependencies( scalar $cgi->param('dependson'), scalar $cgi->param('blocked')); @@ -166,6 +164,7 @@ push(@bug_fields, qw( bug_file_loc bug_severity bug_status + keywords short_desc op_sys priority @@ -215,25 +214,7 @@ $dbh->do(q{INSERT INTO longdescs (bug_id, who, bug_when, thetext,isprivate) $comment, $privacy)); my @all_deps; -my $sth_addkeyword = $dbh->prepare(q{ - INSERT INTO keywords (bug_id, keywordid) VALUES (?, ?)}); if (Bugzilla->user->in_group("editbugs")) { - foreach my $keyword (@keyword_ids) { - $sth_addkeyword->execute($id, $keyword); - } - if (@keyword_ids) { - # Make sure that we have the correct case for the kw - my $kw_ids = join(', ', @keyword_ids); - my $list = $dbh->selectcol_arrayref(qq{ - SELECT name - FROM keyworddefs - WHERE id IN ($kw_ids) - ORDER BY name}); - my $kw_list = join(', ', @$list); - $dbh->do(q{UPDATE bugs - SET delta_ts = ?, keywords = ? - WHERE bug_id = ?}, undef, ($timestamp, $kw_list, $id)); - } if ($cgi->param('dependson') || $cgi->param('blocked')) { my %deps = (dependson => $depends_on_ids, blocked => $blocks_ids); foreach my $pair (["blocked", "dependson"], ["dependson", "blocked"]) { |