diff options
author | lpsolit%gmail.com <> | 2005-07-20 22:58:44 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-07-20 22:58:44 +0000 |
commit | b0d0cb1523a0d6742ededb3cd1fc26e483cfc0fa (patch) | |
tree | 1e23663cfeece9ed7317be4a80f0815fd6360d3c /CGI.pl | |
parent | f0a9bdd03c1a9e8fb55870143995165595f386af (diff) | |
download | bugs-b0d0cb1523a0d6742ededb3cd1fc26e483cfc0fa.tar bugs-b0d0cb1523a0d6742ededb3cd1fc26e483cfc0fa.tar.gz bugs-b0d0cb1523a0d6742ededb3cd1fc26e483cfc0fa.tar.bz2 bugs-b0d0cb1523a0d6742ededb3cd1fc26e483cfc0fa.tar.xz bugs-b0d0cb1523a0d6742ededb3cd1fc26e483cfc0fa.zip |
Bug 301440: Move LogActivityEntry out of CGI.pl - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Diffstat (limited to 'CGI.pl')
-rw-r--r-- | CGI.pl | 37 |
1 files changed, 0 insertions, 37 deletions
@@ -40,10 +40,6 @@ use Bugzilla::BugMail; use Bugzilla::Bug; use Bugzilla::User; -# Used in LogActivityEntry(). Gives the max length of lines in the -# activity table. -use constant MAX_LINE_LENGTH => 254; - # Shut up misguided -w warnings about "used only once". For some reason, # "use vars" chokes on me when I try it here. @@ -128,39 +124,6 @@ sub PutFooter { || ThrowTemplateError($::template->error()); } -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) > MAX_LINE_LENGTH) { - my $commaposition = find_wrap_point($removed, MAX_LINE_LENGTH); - $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) > MAX_LINE_LENGTH) { - my $commaposition = find_wrap_point($added, MAX_LINE_LENGTH); - $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)"); - } -} - ############# Live code below here (that is, not subroutine defs) ############# use Bugzilla; |