diff options
author | lpsolit%gmail.com <> | 2005-04-20 00:55:09 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-04-20 00:55:09 +0000 |
commit | fcd963fcf1a72c5237739aa035be5d2f3bfa6ca8 (patch) | |
tree | c587ce50c25f228eb65dd974cff09da40e994bb8 /CGI.pl | |
parent | 6d044219d11a994b16ee4af0a90cca75b57bee69 (diff) | |
download | bugs-fcd963fcf1a72c5237739aa035be5d2f3bfa6ca8.tar bugs-fcd963fcf1a72c5237739aa035be5d2f3bfa6ca8.tar.gz bugs-fcd963fcf1a72c5237739aa035be5d2f3bfa6ca8.tar.bz2 bugs-fcd963fcf1a72c5237739aa035be5d2f3bfa6ca8.tar.xz bugs-fcd963fcf1a72c5237739aa035be5d2f3bfa6ca8.zip |
Bug 272623: FindWrapPoint is misplaced in process_bug.cgi - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'CGI.pl')
-rw-r--r-- | CGI.pl | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -48,6 +48,10 @@ 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. @@ -254,16 +258,16 @@ sub LogActivityEntry { # 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); + 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) > 254) { - my $commaposition = FindWrapPoint($added, 254); + 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 |