From: lpsolit%gmail.com <> Date: Wed, 22 Feb 2006 00:42:47 +0000 (+0000) Subject: Bug 315317: DBI placeholders break AppendComment's default timestamp - Patch by Frédé... X-Git-Tag: bugzilla-2.20.2~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fd2d5506f7d79e602d5b3255bbcd199dea4de14;p=thirdparty%2Fbugzilla.git Bug 315317: DBI placeholders break AppendComment's default timestamp - Patch by Frédéric Buclin r=mkanat a=justdave --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 3a9a64ddc0..543734e400 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -23,7 +23,7 @@ # Bradley Baetz # Dave Miller # Max Kanat-Alexander -# Frédéric Buclin +# Frédéric Buclin package Bugzilla::Bug; @@ -704,7 +704,7 @@ sub AppendComment ($$$;$$$) { # Use the date/time we were given if possible (allowing calling code # to synchronize the comment's timestamp with those of other records). - $timestamp = "NOW()" unless $timestamp; + $timestamp ||= $dbh->selectrow_array('SELECT NOW()'); $comment =~ s/\r\n/\n/g; # Handle Windows-style line endings. $comment =~ s/\r/\n/g; # Handle Mac-style line endings. @@ -724,7 +724,7 @@ sub AppendComment ($$$;$$$) { $dbh->do("UPDATE bugs SET delta_ts = ? WHERE bug_id = ?", undef, $timestamp, $bugid); } - + # This method is private and is not to be used outside of the Bug class. sub EmitDependList { my ($myfield, $targetfield, $bug_id) = (@_);