summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/CGI.pl b/CGI.pl
index db8b8e27f..ec0d8909c 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -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