summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-02-09 01:51:02 +0100
committertravis%sedsystems.ca <>2005-02-09 01:51:02 +0100
commitf8aeecaf8cd33d87315c5a50be9a762e142062a4 (patch)
treec92dc215a4f6780005bacf825fb6fbdc39552ae1 /post_bug.cgi
parentc0df359943e8b746f02f5c43d25e5ffea99f8d19 (diff)
downloadbugzilla-f8aeecaf8cd33d87315c5a50be9a762e142062a4.tar.gz
bugzilla-f8aeecaf8cd33d87315c5a50be9a762e142062a4.tar.xz
Bug 257315 : type of delta_ts in bugs table should not be timestamp
Patch by Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, LpSolit a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi20
1 files changed, 11 insertions, 9 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 97f788dc6..0f5abddb2 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -321,9 +321,14 @@ if (UserInGroup("editbugs") && defined($::FORM{'dependson'})) {
}
}
+# get current time
+SendSQL("SELECT NOW()");
+my $timestamp = FetchOneColumn();
+my $sql_timestamp = SqlQuote($timestamp);
+
# Build up SQL string to add bug.
my $sql = "INSERT INTO bugs " .
- "(" . join(",", @used_fields) . ", reporter, creation_ts, " .
+ "(" . join(",", @used_fields) . ", reporter, creation_ts, delta_ts, " .
"estimated_time, remaining_time, deadline) " .
"VALUES (";
@@ -337,7 +342,7 @@ $comment = trim($comment);
# OK except for the fact that it causes e-mail to be suppressed.
$comment = $comment ? $comment : " ";
-$sql .= "$::userid, now(), ";
+$sql .= "$::userid, $sql_timestamp, $sql_timestamp, ";
# Time Tracking
if (UserInGroup(Param("timetrackinggroup")) &&
@@ -414,9 +419,6 @@ while (MoreSQLData()) {
# Add the bug report to the DB.
SendSQL($sql);
-SendSQL("select now()");
-my $timestamp = FetchOneColumn();
-
# Get the bug ID back.
SendSQL("select LAST_INSERT_ID()");
my $id = FetchOneColumn();
@@ -434,8 +436,8 @@ if (Param("insidergroup") && UserInGroup(Param("insidergroup"))) {
}
SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext, isprivate)
- VALUES ($id, " . SqlQuote($user->id) . ", " . SqlQuote($timestamp) .
- ", " . SqlQuote($comment) . ", $privacy)");
+ VALUES ($id, " . SqlQuote($user->id) . ", $sql_timestamp, " .
+ SqlQuote($comment) . ", $privacy)");
# Insert the cclist into the database
foreach my $ccid (keys(%ccids)) {
@@ -456,8 +458,8 @@ if (UserInGroup("editbugs")) {
while (MoreSQLData()) {
push (@list, FetchOneColumn());
}
- SendSQL("UPDATE bugs SET keywords = " .
- SqlQuote(join(', ', @list)) .
+ SendSQL("UPDATE bugs SET delta_ts = $sql_timestamp," .
+ " keywords = " . SqlQuote(join(', ', @list)) .
" WHERE bug_id = $id");
}
if (defined $::FORM{'dependson'}) {