diff options
author | lpsolit%gmail.com <> | 2009-08-05 14:35:50 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2009-08-05 14:35:50 +0200 |
commit | d0002e9626b97df6fad2c597b89c8ec31f7c308a (patch) | |
tree | b14fd7ecb63ad9931b5c72e9c666ef499f0daa1d /post_bug.cgi | |
parent | 8b2db148f30d74283d3a80ebd77691c94a1ca4a7 (diff) | |
download | bugzilla-d0002e9626b97df6fad2c597b89c8ec31f7c308a.tar.gz bugzilla-d0002e9626b97df6fad2c597b89c8ec31f7c308a.tar.xz |
Bug 415541: Implement $bug->set_flags() and $attachment->set_flags() - Patch by Frédéric Buclin <LpSolit@gmail.com> a=LpSolit
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index 9a933fc1a..997b621ad 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -104,7 +104,7 @@ if (defined $cgi->param('maketemplate')) { umask 0; # get current time -my $timestamp = $dbh->selectrow_array(q{SELECT NOW()}); +my $timestamp = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)'); # Group Validation my @selected_groups; @@ -219,7 +219,10 @@ if (defined($cgi->upload('data')) || $cgi->param('attachurl')) { if ($attachment) { # Set attachment flags. - Bugzilla::Flag->set_flags($bug, $attachment, $timestamp, $vars); + my ($flags, $new_flags) = Bugzilla::Flag->extract_flags_from_cgi( + $bug, $attachment, $vars, SKIP_REQUESTEE_ON_ERROR); + $attachment->set_flags($flags, $new_flags); + $attachment->update($timestamp); # Update the comment to include the new attachment ID. # This string is hardcoded here because Template::quoteUrls() @@ -246,7 +249,10 @@ if (defined($cgi->upload('data')) || $cgi->param('attachurl')) { } # Set bug flags. -Bugzilla::Flag->set_flags($bug, undef, $timestamp, $vars); +my ($flags, $new_flags) = Bugzilla::Flag->extract_flags_from_cgi($bug, undef, $vars, + SKIP_REQUESTEE_ON_ERROR); +$bug->set_flags($flags, $new_flags); +$bug->update($timestamp); # Email everyone the details of the new bug $vars->{'mailrecipients'} = {'changer' => $user->login}; |