summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi12
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};