diff options
author | travis%sedsystems.ca <> | 2005-02-10 02:30:17 +0100 |
---|---|---|
committer | travis%sedsystems.ca <> | 2005-02-10 02:30:17 +0100 |
commit | 6db4590f9bc598179bbed35b66a3e583a04984c0 (patch) | |
tree | 59be5eafc7bb24cc931fcdf3b960c7d7830db935 /attachment.cgi | |
parent | 6a20f783538986e8caf60b31a659248dd552f63f (diff) | |
download | bugzilla-6db4590f9bc598179bbed35b66a3e583a04984c0.tar.gz bugzilla-6db4590f9bc598179bbed35b66a3e583a04984c0.tar.xz |
Bug 11901 : Change Bugzilla comments line-wrapping policy
Patch by Max Kanat-Alexander <mkanat@kerio.com> r=gerv,justdave a=justdave
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-x | attachment.cgi | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/attachment.cgi b/attachment.cgi index a5407e8b0..d58395efc 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -893,11 +893,6 @@ sub insert my $comment = "Created an attachment (id=$attachid)\n$::FORM{'description'}\n"; $comment .= ("\n" . $::FORM{'comment'}) if $::FORM{'comment'}; - use Text::Wrap; - $Text::Wrap::columns = 80; - $Text::Wrap::huge = 'overflow'; - $comment = Text::Wrap::wrap('', '', $comment); - AppendComment($::FORM{'bugid'}, Bugzilla->user->login, $comment, @@ -1151,35 +1146,17 @@ sub update # add the comment to the bug. if ( $::FORM{'comment'} ) { - use Text::Wrap; - $Text::Wrap::columns = 80; - $Text::Wrap::huge = 'wrap'; - # Prepend a string to the comment to let users know that the comment came from # the "edit attachment" screen. my $comment = qq|(From update of attachment $::FORM{'id'})\n| . $::FORM{'comment'}; - my $wrappedcomment = ""; - foreach my $line (split(/\r\n|\r|\n/, $comment)) - { - if ( $line =~ /^>/ ) - { - $wrappedcomment .= $line . "\n"; - } - else - { - $wrappedcomment .= wrap('', '', $line) . "\n"; - } - } - # Get the user's login name since the AppendComment function needs it. my $who = DBID_to_name($::userid); # Mention $::userid again so Perl doesn't give me a warning about it. my $neverused = $::userid; # Append the comment to the list of comments in the database. - AppendComment($bugid, $who, $wrappedcomment, $::FORM{'isprivate'}, $timestamp); - + AppendComment($bugid, $who, $comment, $::FORM{'isprivate'}, $timestamp); } # Define the variables and functions that will be passed to the UI template. |