diff options
author | bugreport%peshkin.net <> | 2002-10-17 13:31:49 +0200 |
---|---|---|
committer | bugreport%peshkin.net <> | 2002-10-17 13:31:49 +0200 |
commit | dc892b1118b931cb2b616a7c5158995f97960d22 (patch) | |
tree | aaf3b348692d622fb638048dc0756679ffdaadb0 /CGI.pl | |
parent | d69b9a45e9b7031fc569ca1970abd012a84fede1 (diff) | |
download | bugzilla-dc892b1118b931cb2b616a7c5158995f97960d22.tar.gz bugzilla-dc892b1118b931cb2b616a7c5158995f97960d22.tar.xz |
Bug 112373 you should be able to enter bug dependencies/blockers when you enter a bug.
patch by jhedlund
r,2xr=joel
Diffstat (limited to 'CGI.pl')
-rw-r--r-- | CGI.pl | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -894,6 +894,37 @@ sub CheckIfVotedConfirmed { } } +sub LogActivityEntry { + my ($i,$col,$removed,$added,$whoid,$timestamp) = @_; + # in the case of CCs, deps, and keywords, there's a possibility that someone # might try to add or remove a lot of them at once, which might take more + # space than the activity table allows. We'll solve this by splitting it + # into multiple entries if it's too long. + while ($removed || $added) { + my ($removestr, $addstr) = ($removed, $added); + if (length($removestr) > 254) { + my $commaposition = FindWrapPoint($removed, 254); + $removestr = substr($removed,0,$commaposition); + $removed = substr($removed,$commaposition); + $removed =~ s/^[,\s]+//; # remove any comma or space + } else { + $removed = ""; # no more entries + } + if (length($addstr) > 254) { + my $commaposition = FindWrapPoint($added, 254); + $addstr = substr($added,0,$commaposition); + $added = substr($added,$commaposition); + $added =~ s/^[,\s]+//; # remove any comma or space + } else { + $added = ""; # no more entries + } + $addstr = SqlQuote($addstr); + $removestr = SqlQuote($removestr); + my $fieldid = GetFieldID($col); + SendSQL("INSERT INTO bugs_activity " . + "(bug_id,who,bug_when,fieldid,removed,added) VALUES " . + "($i,$whoid," . SqlQuote($timestamp) . ",$fieldid,$removestr,$addstr)"); + } +} sub GetBugActivity { my ($id, $starttime) = (@_); |