summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-10 17:20:41 +0100
committermkanat%kerio.com <>2005-03-10 17:20:41 +0100
commit9ffc6eb52bb9c549dae85a51aaf2b29750b7ba14 (patch)
treeb2ab207281d8d55fbfd057acd88e63ea38e39d79 /globals.pl
parent7bfeeb6381c49662a58d6e8fe679ad4e8dbda013 (diff)
downloadbugzilla-9ffc6eb52bb9c549dae85a51aaf2b29750b7ba14.tar.gz
bugzilla-9ffc6eb52bb9c549dae85a51aaf2b29750b7ba14.tar.xz
Bug 283561: Move AppendComment out of globals.pl
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=vladd, a=justdave
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl29
1 files changed, 0 insertions, 29 deletions
diff --git a/globals.pl b/globals.pl
index 13542dcac..b0a8feca8 100644
--- a/globals.pl
+++ b/globals.pl
@@ -109,35 +109,6 @@ $::SIG{PIPE} = 'IGNORE';
#}
#$::SIG{__DIE__} = \&die_with_dignity;
-sub AppendComment {
- my ($bugid, $who, $comment, $isprivate, $timestamp, $work_time) = @_;
- $work_time ||= 0;
-
- if ($work_time) {
- require Bugzilla::Bug;
- Bugzilla::Bug::ValidateTime($work_time, "work_time");
- }
-
- # Use the date/time we were given if possible (allowing calling code
- # to synchronize the comment's timestamp with those of other records).
- $timestamp = ($timestamp ? SqlQuote($timestamp) : "NOW()");
-
- $comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings.
- $comment =~ s/\r/\n/g; # Get rid of mac-style line endings.
-
- if ($comment =~ /^\s*$/) { # Nothin' but whitespace
- return;
- }
-
- my $whoid = DBNameToIdAndCheck($who);
- my $privacyval = $isprivate ? 1 : 0 ;
- SendSQL("INSERT INTO longdescs (bug_id, who, bug_when, thetext, isprivate, work_time) " .
- "VALUES($bugid, $whoid, $timestamp, " . SqlQuote($comment) . ", " .
- $privacyval . ", " . SqlQuote($work_time) . ")");
-
- SendSQL("UPDATE bugs SET delta_ts = $timestamp WHERE bug_id = $bugid");
-}
-
sub GetFieldID {
my ($f) = (@_);
SendSQL("SELECT fieldid FROM fielddefs WHERE name = " . SqlQuote($f));