summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2002-10-17 13:31:49 +0200
committerbugreport%peshkin.net <>2002-10-17 13:31:49 +0200
commitdc892b1118b931cb2b616a7c5158995f97960d22 (patch)
treeaaf3b348692d622fb638048dc0756679ffdaadb0 /CGI.pl
parentd69b9a45e9b7031fc569ca1970abd012a84fede1 (diff)
downloadbugzilla-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.pl31
1 files changed, 31 insertions, 0 deletions
diff --git a/CGI.pl b/CGI.pl
index 24c006c03..6ca5f2588 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -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) = (@_);